Skip to content
Snippets Groups Projects
Verified Commit 3eb7b997 authored by jD91mZM2's avatar jD91mZM2
Browse files

Move test binaries to tests/bins/

parent f82b48b8
No related branches found
No related tags found
No related merge requests found
# Automatically generated by 'make ignore' # Automatically generated by 'make ignore'
/*.out /*.out
/gen/ /gen/
args /bins/
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
...@@ -86,20 +86,11 @@ all: $(BINS) ...@@ -86,20 +86,11 @@ all: $(BINS)
clean: clean:
rm -f $(BINS) *.out 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) run: $(BINS)
for bin in $^; \ for bin in $^; \
do \ do \
echo "# $${bin} #"; \ echo "# $${bin} #"; \
"./$${bin}" test args || exit $$?; \ "bins/$${bin}" test args || exit $$?; \
done done
expected: $(EXPECT_BINS) expected: $(EXPECT_BINS)
...@@ -109,7 +100,7 @@ expected: $(EXPECT_BINS) ...@@ -109,7 +100,7 @@ expected: $(EXPECT_BINS)
do \ do \
echo "# $${bin} #"; \ echo "# $${bin} #"; \
mkdir -p expected/`dirname $${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 done
verify: $(EXPECT_BINS) verify: $(EXPECT_BINS)
...@@ -119,7 +110,7 @@ verify: $(EXPECT_BINS) ...@@ -119,7 +110,7 @@ verify: $(EXPECT_BINS)
do \ do \
echo "# $${bin} #"; \ echo "# $${bin} #"; \
mkdir -p gen/`dirname $${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}.stdout" "expected/$${bin}.stdout" || exit $$?; \
diff -u "gen/$${bin}.stderr" "expected/$${bin}.stderr" || exit $$?; \ diff -u "gen/$${bin}.stderr" "expected/$${bin}.stderr" || exit $$?; \
done done
...@@ -140,4 +131,5 @@ TAILLIBS=\ ...@@ -140,4 +131,5 @@ TAILLIBS=\
../target/openlibm/libopenlibm.a ../target/openlibm/libopenlibm.a
%: %.c $(HEADLIBS) $(TAILLIBS) %: %.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/$@"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment