Newer
Older
# Binaries that should generate the same output every time
EXPECT_BINS=\
string/strcspn \
string/strchr \
# Binaries that may generate varied output
BINS=\
$(EXPECT_BINS) \
alloc \
"./$${bin}" test args || exit $$?; \
"./$${bin}" test args > "expected/$${bin}.stdout" 2> "expected/$${bin}.stderr" || exit $$?; \
"./$${bin}" test args > "gen/$${bin}.stdout" 2> "gen/$${bin}.stderr" || exit $$?; \
diff -u "gen/$${bin}.stdout" "expected/$${bin}.stdout" || exit $$?; \
diff -u "gen/$${bin}.stderr" "expected/$${bin}.stderr" || exit $$?; \
GCCHEAD=\
-nostdinc \
-nostdlib \
-I ../include \
-I ../target/include \
-I ../openlibm/include \
-I ../openlibm/src \
../target/debug/libcrt0.a
GCCTAIL=\
../target/debug/libc.a \
../openlibm/libopenlibm.a
gcc -fno-stack-protector -Wall $(GCCHEAD) "$<" $(GCCTAIL) -o "$@"