mirror of
https://github.com/sigmasternchen/macrofuck
synced 2025-03-15 07:08:56 +00:00
test: Make test script work relatively to any location
This commit is contained in:
parent
481eafda5d
commit
2d41031965
2 changed files with 5 additions and 2 deletions
|
@ -14,6 +14,7 @@ BUILTINS = obj/builtins/builtins.o obj/builtins/numbers.o \
|
|||
obj/builtins/io.o
|
||||
OBJS = obj/lex.yy.o obj/y.tab.o obj/codegen.o obj/codegen_expr.o \
|
||||
obj/codegen_stat.o obj/ast.o obj/band.o obj/plugins.o obj/scope.o \
|
||||
obj/preprocessor.o \
|
||||
$(PLUGINS) $(BUILTINS) obj/main.o
|
||||
DEPS = $(OBJS:%.o=%.d)
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#/bin/sh
|
||||
|
||||
executable="$1"
|
||||
executable="$(realpath "$1")"
|
||||
|
||||
cd "$(dirname "$0")"/cases/
|
||||
|
||||
tmpfile="/tmp/$$.tmp"
|
||||
resultsfile="/tmp/$$.results"
|
||||
|
@ -26,7 +28,7 @@ run_testcase() {
|
|||
rm "$tmpfile";
|
||||
}
|
||||
|
||||
ls cases/*.in test/cases/*.in | sed -E 's/.in$//g' | while read test; do
|
||||
ls *.in | sed -E 's/.in$//g' | while read test; do
|
||||
run_testcase "$test"
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in a new issue