Also verify that running "make clean" deletes all the files in the
authorBen Pfaff <blp@cs.stanford.edu>
Sat, 11 Nov 2006 14:41:59 +0000 (14:41 +0000)
committerBen Pfaff <blp@cs.stanford.edu>
Sat, 11 Nov 2006 14:41:59 +0000 (14:41 +0000)
build directory except for the Makefile itself.

tests/Makefile

index f8cd3579f69aad5289f9d69fa9ec96e3076c0f29..c2f8b018d3ebec2830bc09b9281f542db64dd7e8 100644 (file)
@@ -32,6 +32,11 @@ define compile
 cd $@/src/$(PROJECT) && $(MAKE)
 endef
 
+define test-clean
+cd $@/src/$(PROJECT)/build && $(MAKE) clean
+cd $@/src/$(PROJECT)/build && set `find -type f` > /dev/null && test $$# = 1
+endef
+
 define clean
 rm -rf $@
 endef
@@ -51,8 +56,14 @@ threads::
        $(mk-sandbox)
        $(compile)
        $(run-tests) TESTS=tests/threads/alarm-single
+       $(test-clean)
+       $(clean)
+userprog vm filesys::
+       $(mk-sandbox)
+       $(compile)
+       $(test-clean)
        $(clean)
-examples userprog vm filesys::
+examples::
        $(mk-sandbox)
        $(compile)
        $(clean)
@@ -63,4 +74,5 @@ p1 p2 p3 p4::
        $(apply-patch)
        $(run-tests)
        $(grade-tests)
+       $(test-clean)
        $(clean)