diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2009-10-09 18:17:02 +0000 |
---|---|---|
committer | <> | 2013-09-20 15:53:04 +0000 |
commit | e6a27c468cae77ce26f6aa924b22bd39055892fe (patch) | |
tree | 5799c05ec62d99e582db411ed0fe5ffd2ba519db /libaio-0.3.109/harness/Makefile | |
download | libaio-tarball-e6a27c468cae77ce26f6aa924b22bd39055892fe.tar.gz |
Imported from /home/lorry/working-area/delta_libaio-tarball/libaio_0.3.109.orig.tar.gz.HEADlibaio_0.3.109.origmaster
Diffstat (limited to 'libaio-0.3.109/harness/Makefile')
-rw-r--r-- | libaio-0.3.109/harness/Makefile | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/libaio-0.3.109/harness/Makefile b/libaio-0.3.109/harness/Makefile new file mode 100644 index 0000000..0bb8e3d --- /dev/null +++ b/libaio-0.3.109/harness/Makefile @@ -0,0 +1,56 @@ +# foo. +TEST_SRCS:=$(shell find cases/ -name \*.t | sort -n -t/ -k2) +EXTRAPROGS:=cases/8.p cases/10.p +PARTPROGS:=$(filter-out $(EXTRAPROGS), $(patsubst %.t,%.p,$(TEST_SRCS))) +PROGS:=$(PARTPROGS) $(EXTRAPROGS) +HARNESS_SRCS:=main.c +# io_queue.c + +CFLAGS=-Wall -Werror -I../src -g -O +#-lpthread -lrt + +all: $(PROGS) + +$(PROGS): %.p: %.t $(HARNESS_SRCS) + $(CC) $(CFLAGS) -DTEST_NAME=\"$<\" -o $@ main.c ../src/libaio.a + +clean: + rm -f $(PROGS) *.o runtests.out rofile wofile rwfile + +.PHONY: + +testdir/rofile: testdir .PHONY + rm -f $@ + echo "test" >$@ + chmod 400 $@ + +testdir/wofile: testdir .PHONY + rm -f $@ + echo "test" >$@ + chmod 200 $@ + +testdir/rwfile: testdir .PHONY + rm -f $@ + echo "test" >$@ + chmod 600 $@ + +testdir testdir.enospc testdir.ext2: + mkdir $@ + +root: .PHONY + @if [ `id -u` -ne 0 ]; then echo Need root for check, try partcheck >&2; exit 1; fi + +partcheck: $(PARTPROGS) testdir/rofile testdir/rwfile testdir/wofile + ./runtests.sh $(PARTPROGS) + +ext2.img: + dd if=/dev/zero bs=1M count=10 of=$@ + mke2fs -F -b 4096 $@ + +extracheck: $(EXTRAPROGS) root testdir.ext2 testdir.enospc ext2.img + mount -o loop -t ext2 ext2-enospc.img testdir.enospc + ./runtests.sh cases/10.p; ret=$$?; umount testdir.enospc; exit $$ret + mount -o loop -t ext2 ext2.img testdir.ext2 + ./runtests.sh cases/8.p; ret=$$?; umount testdir.ext2; exit $$ret + +check: partcheck extracheck |