- added priority-donate-chain test which tests 8-level deep nested donation
[pintos-anon] / src / tests / filesys / extended / Make.tests
1 # -*- makefile -*-
2
3 raw_tests = dir-empty-name dir-mk-tree dir-mkdir dir-open               \
4 dir-over-file dir-rm-cwd dir-rm-parent dir-rm-root dir-rm-tree          \
5 dir-rmdir dir-under-file dir-vine grow-create grow-dir-lg               \
6 grow-file-size grow-root-lg grow-root-sm grow-seq-lg grow-seq-sm        \
7 grow-sparse grow-tell grow-two-files syn-rw
8
9 tests/filesys/extended_TESTS = $(patsubst %,tests/filesys/extended/%,$(raw_tests))
10 tests/filesys/extended_EXTRA_GRADES = $(patsubst %,tests/filesys/extended/%-persistence,$(raw_tests))
11
12 tests/filesys/extended_PROGS = $(tests/filesys/extended_TESTS) \
13 tests/filesys/extended/child-syn-rw tests/filesys/extended/tar
14
15 $(foreach prog,$(tests/filesys/extended_PROGS),                 \
16         $(eval $(prog)_SRC += $(prog).c tests/lib.c tests/filesys/seq-test.c))
17 $(foreach prog,$(tests/filesys/extended_TESTS),         \
18         $(eval $(prog)_SRC += tests/main.c))
19 $(foreach prog,$(tests/filesys/extended_TESTS),         \
20         $(eval $(prog)_PUTFILES += tests/filesys/extended/tar))
21 # The version of GNU make 3.80 on vine barfs if this is split at
22 # the last comma.
23 $(foreach test,$(tests/filesys/extended_TESTS),$(eval $(test).output: FSDISK = tmp.dsk))
24
25 tests/filesys/extended/dir-mk-tree_SRC += tests/filesys/extended/mk-tree.c
26 tests/filesys/extended/dir-rm-tree_SRC += tests/filesys/extended/mk-tree.c
27
28 tests/filesys/extended/syn-rw_PUTFILES += tests/filesys/extended/child-syn-rw
29
30 GETTIMEOUT = 60
31
32 GETCMD = pintos -v -k -T $(GETTIMEOUT)
33 GETCMD += $(PINTOSOPTS)
34 GETCMD += $(SIMULATOR)
35 GETCMD += --fs-disk=$(FSDISK)
36 GETCMD += -g fs.tar -a $(TEST).tar
37 ifeq ($(filter vm, $(KERNEL_SUBDIRS)), vm)
38 GETCMD += --swap-disk=4
39 endif
40 GETCMD += -- -q
41 GETCMD += $(KERNELFLAGS)
42 GETCMD += run 'tar fs.tar /'
43 GETCMD += < /dev/null
44 GETCMD += 2> $(TEST)-persistence.errors $(if $(VERBOSE),|tee,>) $(TEST)-persistence.output
45
46 tests/filesys/extended/%.output: os.dsk
47         rm -f tmp.dsk
48         pintos-mkdisk tmp.dsk 2
49         $(TESTCMD)
50         $(GETCMD)
51         rm -f tmp.dsk
52 $(foreach raw_test,$(raw_tests),$(eval tests/filesys/extended/$(raw_test)-persistence.output: tests/filesys/extended/$(raw_test).output; ))
53 $(foreach raw_test,$(raw_tests),$(eval tests/filesys/extended/$(raw_test)-persistence.result: tests/filesys/extended/$(raw_test).result))
54
55 TARS = $(addsuffix .tar,$(tests/filesys/extended_TESTS))
56
57 clean::
58         rm -f $(TARS)
59         rm -f tests/filesys/extended/can-rmdir-cwd