about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xsubx/run_one_test.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/subx/run_one_test.sh b/subx/run_one_test.sh
index ded3e6e5..c81bd0c4 100755
--- a/subx/run_one_test.sh
+++ b/subx/run_one_test.sh
@@ -5,14 +5,17 @@
 if [[ $2 == 'test-'* ]]
 then
   TEST_NAME=$2 envsubst '$TEST_NAME' < run_one_test.subx > /tmp/run_one_test.subx
-elif [[ ! -e /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
   echo "no test found"
   exit 0  # don't open trace
 fi
 
 set -e
-FILES=$(ls [0-9]*.subx apps/subx-common.subx $1 |sort |uniq)
                                       # turn newlines into spaces
 CFLAGS=$CFLAGS subx --debug translate $(echo $FILES) /tmp/run_one_test.subx -o /tmp/a.elf