From 79f46c0d5da116834c1bffa2871794f6f4ce5df2 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 8 Jul 2021 13:19:46 +0100 Subject: [PATCH] jstest: Include script plumbing Signed-off-by: Ian Jackson --- Makefile | 3 ++- jstest/run | 7 ++++++- jstest/wasmtest.nodejs | 2 -- templates/script.ts | 1 + 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 5e5e58fc..1b9b02aa 100644 --- 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) diff --git a/jstest/run b/jstest/run index 109466a3..ad48de72 100755 --- a/jstest/run +++ b/jstest/run @@ -9,4 +9,9 @@ cd target/jstest export NODE_PATH=. ln -sf "$@" . -nodejs wasmtest.nodejs +exec 3>run.js +sed >&3 &3 wasmtest.nodejs +exec 3>&- + +nodejs run.js diff --git a/jstest/wasmtest.nodejs b/jstest/wasmtest.nodejs index 67fc8507..ea39d71b 100644 --- a/jstest/wasmtest.nodejs +++ b/jstest/wasmtest.nodejs @@ -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); diff --git a/templates/script.ts b/templates/script.ts index d8cd1b0c..2eaa8d72 100644 --- a/templates/script.ts +++ b/templates/script.ts @@ -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(); -- 2.30.2