about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-09-04 17:35:37 -0700
committerKartik Agaram <vc@akkartik.com>2019-09-04 17:35:37 -0700
commitc2d60fbe87e0eb817563f053faef5b64e4b64c03 (patch)
tree1b4647a7c054caec6e80392a3caf1d938ad2a83c
parent5a0a0005cca8e40189c106db6292169263b80a9f (diff)
downloadmu-c2d60fbe87e0eb817563f053faef5b64e4b64c03.tar.gz
5618
-rwxr-xr-xrun_one_test12
-rw-r--r--vimrc.vim2
2 files changed, 11 insertions, 3 deletions
diff --git a/run_one_test b/run_one_test
index 8d69ad69..05c7d751 100755
--- a/run_one_test
+++ b/run_one_test
@@ -1,6 +1,8 @@
 #!/usr/bin/env zsh
 # Either run the test with the given name, or rerun the most recently run test.
 # Intended to be called from within Vim. Check out the vimrc.vim file.
+# Unfortunately this only works with Linux at the moment. Some compiler passes
+# take too long to run in emulated mode.
 
 if [[ $2 == 'test-'* ]]
 then
@@ -16,7 +18,11 @@ else
 fi
 
 set -e
-                                                   # turn newlines into spaces
-ONLY_CPP=1 CFLAGS=$CFLAGS ./subx --debug translate $(echo $FILES) /tmp/run_one_test.subx -o /tmp/a.elf
 
-ONLY_CPP=1 ./subx --debug --trace run /tmp/a.elf
+echo "$(date) translating"
+# can't just use ntranslate; we need good error messages in the debug cycle
+# so we run what we must natively, and emulate the rest
+cat $(echo $FILES) /tmp/run_one_test.subx  |apps/sigils   > a.sigils
+ONLY_CPP=1 CFLAGS=$CFLAGS ./subx --debug translate a.sigils -o a.elf
+echo "$(date) running"
+ONLY_CPP=1 CFLAGS=$CFLAGS ./subx --debug --trace run a.elf
diff --git a/vimrc.vim b/vimrc.vim
index 4710d971..b84df46f 100644
--- a/vimrc.vim
+++ b/vimrc.vim
@@ -75,6 +75,8 @@ endif
 command! -nargs=0 L exec "%!grep -a label |grep -v clear-stream:loop"
 
 " run test cursor around cursor
+" Unfortunately this only works with Linux at the moment.
+" Some compiler passes take too long to run in emulated mode.
 " this solution is unfortunate, but seems forced:
 "   can't put initial cursor movement inside function because we rely on <C-r><C-w> to grab word at cursor
 "   can't put final cursor movement out of function because that disables the wait for <CR> prompt; function must be final operation of map