diff --git a/tests/Makefile b/tests/Makefile index 8a626402c063dec9558d912e76b33b1d0906d024..1feb14bb75672a73d87113aa136419394c452b1e 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,5 +1,5 @@ -BINS=\ - alloc \ +# Binaries that should generate the same output every time +EXPECT_BINS=\ atof \ atoi \ brk \ @@ -13,14 +13,12 @@ BINS=\ fcntl \ fsync \ ftruncate \ - getid \ link \ math \ mem \ pipe \ printf \ rmdir \ - setid \ sleep \ sprintf \ stdlib/strtol \ @@ -33,32 +31,39 @@ BINS=\ unlink \ write +# Binaries that may generate varied output +BINS=\ + $(EXPECT_BINS) \ + alloc \ + getid \ + setid + all: $(BINS) clean: rm -f $(BINS) *.out run: $(BINS) - for bin in $(BINS); \ + for bin in $^; \ do \ echo "# $${bin} #"; \ "./$${bin}" test args; \ done -expected: $(BINS) +expected: $(EXPECT_BINS) rm -rf expected mkdir -p expected - for bin in $(BINS); \ + for bin in $^; \ do \ echo "# $${bin} #"; \ mkdir -p expected/`dirname $${bin}`; \ "./$${bin}" test args > "expected/$${bin}.stdout" 2> "expected/$${bin}.stderr"; \ done -verify: $(BINS) +verify: $(EXPECT_BINS) rm -rf gen mkdir -p gen - for bin in $(BINS); \ + for bin in $^; \ do \ echo "# $${bin} #"; \ mkdir -p gen/`dirname $${bin}`; \ diff --git a/tests/expected/alloc.stderr b/tests/expected/alloc.stderr deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/tests/expected/alloc.stdout b/tests/expected/alloc.stdout deleted file mode 100644 index e6f5022ade16576e46d611632163d82875ad4734..0000000000000000000000000000000000000000 --- a/tests/expected/alloc.stdout +++ /dev/null @@ -1,2 +0,0 @@ -malloc 0x560fde600618 -calloc 0x560fde600618 diff --git a/tests/expected/getid.stderr b/tests/expected/getid.stderr deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/tests/expected/getid.stdout b/tests/expected/getid.stdout deleted file mode 100644 index 5ef0956cf2c19e199dd9bec80ebd7fad7d05ad8a..0000000000000000000000000000000000000000 --- a/tests/expected/getid.stdout +++ /dev/null @@ -1 +0,0 @@ -egid: 1000, euid: 1000, gid: 1000, pgid: 31979, pid: 32027, ppid 31982, uid 1000 diff --git a/tests/expected/setid.stderr b/tests/expected/setid.stderr deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/tests/expected/setid.stdout b/tests/expected/setid.stdout deleted file mode 100644 index 269cd844e68e403962387798abe06693ee97b2f1..0000000000000000000000000000000000000000 --- a/tests/expected/setid.stdout +++ /dev/null @@ -1,3 +0,0 @@ -32050 belongs to process group 32050 -32050 has egid 1000 and gid 1000 -32050 has euid 1000 and uid 1000