Move test binaries to tests/bins/

This commit is contained in:
jD91mZM2
2018-07-29 10:04:11 +02:00
parent f82b48b839
commit 3eb7b99799
2 changed files with 6 additions and 89 deletions
+1 -76
View File
@@ -1,79 +1,4 @@
# Automatically generated by 'make ignore'
/*.out
/gen/
args
arpainet
assert
ctype
error
fcntl/create
fcntl/fcntl
locale
math
setjmp
signal
stdio/all
stdio/freopen
stdio/fwrite
stdio/getc_unget
stdio/printf
stdio/rename
stdio/scanf
stdio/sprintf
stdlib/a64l
stdlib/atof
stdlib/atoi
stdlib/env
stdlib/mkostemps
stdlib/rand
stdlib/strtol
stdlib/strtoul
stdlib/system
string/mem
string/strchr
string/strcspn
string/strncmp
string/strpbrk
string/strrchr
string/strspn
string/strstr
string/strtok
string/strtok_r
strings
time/asctime
time/gmtime
time/localtime
time/mktime
time/strftime
time/time
unistd/brk
unistd/dup
unistd/exec
unistd/fchdir
unistd/fsync
unistd/ftruncate
unistd/getopt
unistd/isatty
unistd/pipe
unistd/rmdir
unistd/sleep
unistd/write
waitpid
wchar/mbrtowc
wchar/mbsrtowcs
wchar/putwchar
wchar/wcrtomb
dirent
pwd
resource/getrusage
stdlib/alloc
stdlib/bsearch
stdlib/mktemp
time/gettimeofday
time/times
unistd/chdir
unistd/gethostname
unistd/getid
unistd/link
unistd/setid
unistd/stat
/bins/
+5 -13
View File
@@ -86,20 +86,11 @@ all: $(BINS)
clean:
rm -f $(BINS) *.out
ignore: $(BINS)
echo "# Automatically generated by 'make ignore'" > .gitignore
echo "/*.out" >> .gitignore
echo "/gen/" >> .gitignore
for bin in $^; \
do \
echo "$${bin}" >> .gitignore; \
done
run: $(BINS)
for bin in $^; \
do \
echo "# $${bin} #"; \
"./$${bin}" test args || exit $$?; \
"bins/$${bin}" test args || exit $$?; \
done
expected: $(EXPECT_BINS)
@@ -109,7 +100,7 @@ expected: $(EXPECT_BINS)
do \
echo "# $${bin} #"; \
mkdir -p expected/`dirname $${bin}`; \
"./$${bin}" test args > "expected/$${bin}.stdout" 2> "expected/$${bin}.stderr" || exit $$?; \
"bins/$${bin}" test args > "expected/$${bin}.stdout" 2> "expected/$${bin}.stderr" || exit $$?; \
done
verify: $(EXPECT_BINS)
@@ -119,7 +110,7 @@ verify: $(EXPECT_BINS)
do \
echo "# $${bin} #"; \
mkdir -p gen/`dirname $${bin}`; \
"./$${bin}" test args > "gen/$${bin}.stdout" 2> "gen/$${bin}.stderr" || exit $$?; \
"bins/$${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 $$?; \
done
@@ -140,4 +131,5 @@ TAILLIBS=\
../target/openlibm/libopenlibm.a
%: %.c $(HEADLIBS) $(TAILLIBS)
gcc -fno-builtin -fno-stack-protector -Wall -g $(CFLAGS) $(HEADLIBS) "$<" $(TAILLIBS) -o "$@"
mkdir -p "bins/$$(dirname "$@")"
gcc -fno-builtin -fno-stack-protector -Wall -g $(CFLAGS) $(HEADLIBS) "$<" $(TAILLIBS) -o "bins/$@"