Add more tests.
[pintos-anon] / grading / userprog / Makefile
index d085aae85f34e01b5cc43295569bfc2439c51bb0..85ee607f51184d7938a681052e8f7aff7212de00 100644 (file)
@@ -1,12 +1,31 @@
 SRCDIR = ../../src
 
-SINGLETONS = create-normal create-empty create-null create-invalid create-long 
+SINGLETONS = \
+       $(addprefix args-, argc argv0 argvn single multiple dbl-space) \
+       $(addprefix sc-, bad-sp bad-arg boundary) \
+       halt exit \
+       $(addprefix create-, normal empty null bad-ptr long exists bound) \
+       $(addprefix open-, normal missing boundary empty null bad-ptr twice) \
+       $(addprefix close-, normal twice stdin stdout bad-fd) \
+       $(addprefix read-, normal bad-ptr boundary zero stdout bad-fd) \
+       $(addprefix write-, normal bad-ptr boundary zero stdin bad-fd)
 
 define SINGLETON_PROG
 PROGS += $(1)
-$(1)_SRC = $(1).c
+$(subst -,_,$(1))_SRC = $(1).c
 endef
 
 $(foreach prog,$(SINGLETONS),$(eval $(call SINGLETON_PROG,$(prog))))
+DISKS = $(patsubst %,%.dsk,$(PROGS))
+
+disks: $(DISKS)
+
+%.dsk: %
+       ./prep-disk $<
+
+clean::
+       rm -f $(DISKS)
 
 include $(SRCDIR)/Makefile.userprog
+
+CFLAGS += -Werror