chiark / gitweb /
jstest: Include script plumbing
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 8 Jul 2021 12:19:46 +0000 (13:19 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 8 Jul 2021 12:19:46 +0000 (13:19 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Makefile
jstest/run
jstest/wasmtest.nodejs
templates/script.ts

index 5e5e58fc91ff7236f5bd38a03ba2231dccc9a021..1b9b02aab074a69706764903ae5dca620513ff03 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -256,7 +256,8 @@ docs/html/examples/%.toml: specs/%.toml
 .PHONY: jstest
 jstest: stamp/jstest
 
-stamp/jstest: jstest/run jstest/wasmtest.nodejs stamp/wasm-bindgen-jstest
+stamp/jstest: jstest/run jstest/wasmtest.nodejs templates/script.js \
+               stamp/wasm-bindgen-jstest
        $(NAILING_CARGO_JUST_RUN) $(abspath $(filter-out stamp/%,$^))
        $(stamp)
 
index 109466a39c0f44aed386f2d058dc3405ffefa3c4..ad48de725f9aa3cd31a89e63a88e952da4508c1f 100755 (executable)
@@ -9,4 +9,9 @@ cd target/jstest
 export NODE_PATH=.
 ln -sf "$@" .
 
-nodejs wasmtest.nodejs
+exec 3>run.js
+sed >&3 <script.js '/^\/\/@@notest/,/^\/\/@@/d'
+cat >&3 wasmtest.nodejs
+exec 3>&-
+
+nodejs run.js
index 67fc8507613a0ed887e65e7cc285e8630e50c18a..ea39d71b32ec0e661701a6c1de2c77bd4f0016c8 100644 (file)
@@ -6,7 +6,5 @@
 const fs = require('fs');
 let wasm_bindgen = require('otter_wasm.js');
 
-//eval(fs.readFileSync('./otter_wasm.js')+'');
-
 let dc = wasm_bindgen.def_zcoord();
 console.log(dc);
index d8cd1b0cf322c78207e123b1afc4ba4c283411c6..2eaa8d7226ba8ee558bd877990e40ce00ba00b21 100644 (file)
@@ -2151,4 +2151,5 @@ function loaded(xhr: XMLHttpRequest){
 // todo scroll of log messages to bottom did not always work somehow
 //    think I have fixed this with approximation
 
+//@@notest
 doload();