about summary refs log tree commit diff stats
path: root/subx/run_one_test.sh
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-06-12 00:14:21 -0700
committerKartik Agaram <vc@akkartik.com>2019-06-12 00:14:21 -0700
commitab107e184fca36e221d619745f3a6149b252541c (patch)
tree3781c3f3284a1b7a5162a8f80c2fe8846df5e807 /subx/run_one_test.sh
parent66bce436b328171cfbfa02c2e16dafc49343de08 (diff)
downloadmu-ab107e184fca36e221d619745f3a6149b252541c.tar.gz
.
Fix a bug when running tests singly in the 'SubX standard library'.
Diffstat (limited to 'subx/run_one_test.sh')
-rwxr-xr-xsubx/run_one_test.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/subx/run_one_test.sh b/subx/run_one_test.sh
index eb99a8b5..3aa424ae 100755
--- a/subx/run_one_test.sh
+++ b/subx/run_one_test.sh
@@ -16,5 +16,12 @@ fi
 
 envsubst '$TEST_NAME' < run_one_test.subx > /tmp/run_one_test.subx
 
-subx --debug translate [0-9]*.subx apps/subx-common.subx $1 /tmp/run_one_test.subx -o /tmp/a.elf
+if [[ $1 == */* ]]
+then
+  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
+  subx --debug translate [0-9]*.subx apps/subx-common.subx    /tmp/run_one_test.subx -o /tmp/a.elf
+fi
+
 subx --debug --trace run /tmp/a.elf