diff options
-rwxr-xr-x | subx/run_one_test.sh | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/subx/run_one_test.sh b/subx/run_one_test.sh index 7ac3e5d0..caecd63c 100755 --- a/subx/run_one_test.sh +++ b/subx/run_one_test.sh @@ -4,9 +4,10 @@ if [[ $2 == 'test-'* ]] then - export TEST_NAME=$2 - echo $TEST_NAME > /tmp/last_test_run -elif [[ -e /tmp/last_test_run ]] + TEST_NAME=$2 envsubst '$TEST_NAME' < run_one_test.subx > /tmp/run_one_test.subx + FILES=$(ls [0-9]*.subx apps/subx-common.subx $1 |sort |uniq) + echo $FILES > /tmp/last_run_files +elif [[ -e /tmp/last_run_files ]] then FILES=`cat /tmp/last_run_files` else @@ -15,12 +16,7 @@ else fi set -e -if [[ $1 == */* ]] -then - CFLAGS=$CFLAGS ./subx --debug translate [0-9]*.subx apps/subx-common.subx $1 /tmp/run_one_test.subx -o /tmp/a.elf -else - # don't mention files twice - CFLAGS=$CFLAGS ./subx --debug translate [0-9]*.subx apps/subx-common.subx /tmp/run_one_test.subx -o /tmp/a.elf -fi + # turn newlines into spaces +CFLAGS=$CFLAGS ./subx --debug translate $(echo $FILES) /tmp/run_one_test.subx -o /tmp/a.elf ./subx --debug --trace run /tmp/a.elf |