diff --git a/Makefile b/Makefile index 7d76c0c1..2718c47a 100644 --- a/Makefile +++ b/Makefile @@ -297,27 +297,27 @@ build/integration-test-fs/fs.json: images/buildroot-bzimage68.bin ./tools/copy-to-sha256.py build/integration-test-fs/fs.tar build/integration-test-fs/flat rm build/integration-test-fs/fs.tar build/integration-test-fs/bzImage build/integration-test-fs/initrd -tests: build/libv86-debug.js build/v86-debug.wasm build/integration-test-fs/fs.json +tests: build/v86-debug.wasm build/integration-test-fs/fs.json LOG_LEVEL=3 ./tests/full/run.js tests-release: build/libv86.js build/v86.wasm build/integration-test-fs/fs.json TEST_RELEASE_BUILD=1 ./tests/full/run.js -nasmtests: build/libv86-debug.mjs build/v86-debug.wasm +nasmtests: build/v86-debug.wasm $(NASM_TEST_DIR)/create_tests.js $(NASM_TEST_DIR)/gen_fixtures.js $(NASM_TEST_DIR)/run.js -nasmtests-force-jit: build/libv86-debug.mjs build/v86-debug.wasm +nasmtests-force-jit: build/v86-debug.wasm $(NASM_TEST_DIR)/create_tests.js $(NASM_TEST_DIR)/gen_fixtures.js $(NASM_TEST_DIR)/run.js --force-jit -jitpagingtests: build/libv86-debug.mjs build/v86-debug.wasm +jitpagingtests: build/v86-debug.wasm $(MAKE) -C tests/jit-paging test-jit ./tests/jit-paging/run.js -qemutests: build/libv86-debug.mjs build/v86-debug.wasm +qemutests: build/v86-debug.wasm $(MAKE) -C tests/qemu test-i386 LOG_LEVEL=3 ./tests/qemu/run.js build/qemu-test-result ./tests/qemu/run-qemu.js > build/qemu-test-reference @@ -329,7 +329,7 @@ qemutests-release: build/libv86.mjs build/v86.wasm ./tests/qemu/run-qemu.js > build/qemu-test-reference diff build/qemu-test-result build/qemu-test-reference -kvm-unit-test: build/libv86-debug.mjs build/v86-debug.wasm +kvm-unit-test: build/v86-debug.wasm (cd tests/kvm-unit-tests && ./configure && make x86/realmode.flat) tests/kvm-unit-tests/run.mjs tests/kvm-unit-tests/x86/realmode.flat @@ -337,11 +337,11 @@ kvm-unit-test-release: build/libv86.mjs build/v86.wasm (cd tests/kvm-unit-tests && ./configure && make x86/realmode.flat) TEST_RELEASE_BUILD=1 tests/kvm-unit-tests/run.mjs tests/kvm-unit-tests/x86/realmode.flat -expect-tests: build/libv86-debug.mjs build/v86-debug.wasm build/libwabt.cjs +expect-tests: build/v86-debug.wasm build/libwabt.cjs make -C tests/expect/tests ./tests/expect/run.js -devices-test: build/libv86-debug.mjs build/v86-debug.wasm +devices-test: build/v86-debug.wasm ./tests/devices/virtio_9p.js ./tests/devices/virtio_console.js ./tests/devices/fetch_network.js @@ -356,7 +356,7 @@ rust-test: $(RUST_FILES) rust-test-intensive: QUICKCHECK_TESTS=100000000 make rust-test -api-tests: build/libv86-debug.mjs build/v86-debug.wasm +api-tests: build/v86-debug.wasm ./tests/api/clean-shutdown.js ./tests/api/state.js ./tests/api/reset.js diff --git a/src/main.js b/src/main.js index 8c476a61..ed1ba783 100644 --- a/src/main.js +++ b/src/main.js @@ -3,6 +3,7 @@ import { CPU } from "./cpu.js"; import { save_state, restore_state } from "./state.js"; export { V86 } from "./browser/starter.js"; +export { print_stats } from "./browser/print_stats.js"; /** * @constructor diff --git a/tests/Readme.md b/tests/Readme.md index 804380d3..deb063ec 100644 --- a/tests/Readme.md +++ b/tests/Readme.md @@ -19,7 +19,7 @@ following list is roughtly sorted from most interesting/useful to least. The following environmental variables are respected by most tests if applicable: - `TEST_RELEASE_BUILD=1`: Test the release build (libv86.js, v86.wasm) instead of the - debug build (libv86-debug.js, v86-debug.wasm) + debug build (source files with v86-debug.wasm) - `MAX_PARALLEL_TESTS=n`: Maximum number of tests to run in parallel. Defaults to the number of cores in your system or less. - `TEST_NAME="…"`: Run only the specified test (only expect, full, nasm) diff --git a/tests/api/clean-shutdown.js b/tests/api/clean-shutdown.js index a9b080f2..a9adbf52 100755 --- a/tests/api/clean-shutdown.js +++ b/tests/api/clean-shutdown.js @@ -8,8 +8,7 @@ const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); // listeners, so that the nodejs process cleanly and automatically exits. const TEST_RELEASE_BUILD = +process.env.TEST_RELEASE_BUILD; - -var { V86 } = await import(`../../build/${TEST_RELEASE_BUILD ? "libv86" : "libv86-debug"}.mjs`); +const { V86 } = await import(TEST_RELEASE_BUILD ? "../../build/libv86.mjs" : "../../src/main.js"); process.on("unhandledRejection", exn => { throw exn; }); diff --git a/tests/api/floppy-insert-eject.js b/tests/api/floppy-insert-eject.js index 176609be..13792408 100755 --- a/tests/api/floppy-insert-eject.js +++ b/tests/api/floppy-insert-eject.js @@ -1,14 +1,13 @@ #!/usr/bin/env node "use strict"; -import {setTimeout as pause} from "timers/promises"; + +import { setTimeout as pause } from "timers/promises"; import url from "node:url"; - const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); + const TEST_RELEASE_BUILD = +process.env.TEST_RELEASE_BUILD; - - -var { V86 } = await import(`../../build/${TEST_RELEASE_BUILD ? "libv86" : "libv86-debug"}.mjs`); +const { V86 } = await import(TEST_RELEASE_BUILD ? "../../build/libv86.mjs" : "../../src/main.js"); process.on("unhandledRejection", exn => { throw exn; }); diff --git a/tests/api/pic.js b/tests/api/pic.js index 69131158..f6227f45 100755 --- a/tests/api/pic.js +++ b/tests/api/pic.js @@ -1,12 +1,13 @@ #!/usr/bin/env node "use strict"; + import url from "node:url"; +import fs from "node:fs"; const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); -const TEST_RELEASE_BUILD = +process.env.TEST_RELEASE_BUILD; -import fs from "node:fs"; -const { V86 } = await import(`../../build/${TEST_RELEASE_BUILD ? "libv86" : "libv86-debug"}.mjs`); +const TEST_RELEASE_BUILD = +process.env.TEST_RELEASE_BUILD; +const { V86 } = await import(TEST_RELEASE_BUILD ? "../../build/libv86.mjs" : "../../src/main.js"); const root_path = __dirname + "/../.."; diff --git a/tests/api/reboot.js b/tests/api/reboot.js index 2fc33f07..89fe8afc 100755 --- a/tests/api/reboot.js +++ b/tests/api/reboot.js @@ -6,8 +6,7 @@ import url from "node:url"; const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); const TEST_RELEASE_BUILD = +process.env.TEST_RELEASE_BUILD; - -var { V86 } = await import(`../../build/${TEST_RELEASE_BUILD ? "libv86" : "libv86-debug"}.mjs`); +const { V86 } = await import(TEST_RELEASE_BUILD ? "../../build/libv86.mjs" : "../../src/main.js"); process.on("unhandledRejection", exn => { throw exn; }); diff --git a/tests/api/serial.js b/tests/api/serial.js index 63728201..2107cf0e 100755 --- a/tests/api/serial.js +++ b/tests/api/serial.js @@ -8,8 +8,7 @@ import crypto from "node:crypto"; const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); const TEST_RELEASE_BUILD = +process.env.TEST_RELEASE_BUILD; - -var { V86 } = await import(`../../build/${TEST_RELEASE_BUILD ? "libv86" : "libv86-debug"}.mjs`); +const { V86 } = await import(TEST_RELEASE_BUILD ? "../../build/libv86.mjs" : "../../src/main.js"); process.on("unhandledRejection", exn => { throw exn; }); diff --git a/tests/api/state.js b/tests/api/state.js index a6b992bb..ea33b9a1 100755 --- a/tests/api/state.js +++ b/tests/api/state.js @@ -8,8 +8,7 @@ const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); process.on("unhandledRejection", exn => { throw exn; }); const TEST_RELEASE_BUILD = +process.env.TEST_RELEASE_BUILD; - -var { V86 } = await import(`../../build/${TEST_RELEASE_BUILD ? "libv86" : "libv86-debug"}.mjs`); +const { V86 } = await import(TEST_RELEASE_BUILD ? "../../build/libv86.mjs" : "../../src/main.js"); const config_async_cdrom = { bios: { url: __dirname + "/../../bios/seabios.bin" }, diff --git a/tests/api/test.js b/tests/api/test.js index b354ac5b..0d193a0a 100755 --- a/tests/api/test.js +++ b/tests/api/test.js @@ -4,9 +4,9 @@ import url from "node:url"; const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); -const TEST_RELEASE_BUILD = +process.env.TEST_RELEASE_BUILD; -const { V86 } = await import(`../../build/${TEST_RELEASE_BUILD ? "libv86" : "libv86-debug"}.mjs`); +const TEST_RELEASE_BUILD = +process.env.TEST_RELEASE_BUILD; +const { V86 } = await import(TEST_RELEASE_BUILD ? "../../build/libv86.mjs" : "../../src/main.js"); process.on("unhandledRejection", exn => { throw exn; }); diff --git a/tests/benchmark/arch-bytemark.js b/tests/benchmark/arch-bytemark.js index dc3c9ebd..6eb6c82c 100755 --- a/tests/benchmark/arch-bytemark.js +++ b/tests/benchmark/arch-bytemark.js @@ -6,8 +6,7 @@ import url from "node:url"; const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); const BENCH_COLLECT_STATS = +process.env.BENCH_COLLECT_STATS; - -const { V86, print_stats } = await import(`../../build/${BENCH_COLLECT_STATS ? "libv86-debug" : "libv86"}.js`); +const { V86, print_stats } = await import(BENCH_COLLECT_STATS ? "../../src/main.js" : "../../build/libv86.mjs"); const V86_ROOT = path.join(__dirname, "../.."); diff --git a/tests/benchmark/arch-python.js b/tests/benchmark/arch-python.js index b1caff64..c2d87399 100755 --- a/tests/benchmark/arch-python.js +++ b/tests/benchmark/arch-python.js @@ -5,9 +5,9 @@ import path from "node:path"; import url from "node:url"; const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); -const BENCH_COLLECT_STATS = +process.env.BENCH_COLLECT_STATS; -const { V86, print_stats } = await import(`../../build/${BENCH_COLLECT_STATS ? "libv86-debug" : "libv86"}.js`); +const BENCH_COLLECT_STATS = +process.env.BENCH_COLLECT_STATS; +const { V86, print_stats } = await import(BENCH_COLLECT_STATS ? "../../src/main.js" : "../../build/libv86.mjs"); const V86_ROOT = path.join(__dirname, "../.."); diff --git a/tests/benchmark/linux-boot.js b/tests/benchmark/linux-boot.js index 883f2dc2..ed3c88fe 100755 --- a/tests/benchmark/linux-boot.js +++ b/tests/benchmark/linux-boot.js @@ -8,7 +8,7 @@ import url from "node:url"; const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); const BENCH_COLLECT_STATS = +process.env.BENCH_COLLECT_STATS; -const { V86, print_stats } = await import(`../../build/${BENCH_COLLECT_STATS ? "libv86-debug" : "libv86"}.js`).V86; +const { V86, print_stats } = await import(BENCH_COLLECT_STATS ? "../../src/main.js" : "../../build/libv86.mjs"); const V86_ROOT = path.join(__dirname, "../.."); diff --git a/tests/benchmark/snapshot.js b/tests/benchmark/snapshot.js index db53b814..c7d437d1 100755 --- a/tests/benchmark/snapshot.js +++ b/tests/benchmark/snapshot.js @@ -5,8 +5,7 @@ import path from "node:path"; import url from "node:url"; const BENCH_COLLECT_STATS = +process.env.BENCH_COLLECT_STATS; - -let { V86, print_stats } = await import(`../../build/${BENCH_COLLECT_STATS ? "libv86-debug" : "libv86"}.js`); +const { V86, print_stats } = await import(BENCH_COLLECT_STATS ? "../../src/main.js" : "../../build/libv86.mjs"); const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); const V86_ROOT = path.join(__dirname, "../.."); diff --git a/tests/devices/fetch_network.js b/tests/devices/fetch_network.js index b62b1f37..9b70e1e2 100755 --- a/tests/devices/fetch_network.js +++ b/tests/devices/fetch_network.js @@ -7,10 +7,11 @@ import url from "node:url"; const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); process.on("unhandledRejection", exn => { throw exn; }); -const TEST_RELEASE_BUILD = +process.env.TEST_RELEASE_BUILD; const USE_VIRTIO = !!process.env.USE_VIRTIO; -const { V86 } = await import(`../../build/${TEST_RELEASE_BUILD ? "libv86" : "libv86-debug"}.mjs`); +const TEST_RELEASE_BUILD = +process.env.TEST_RELEASE_BUILD; +const { V86 } = await import(TEST_RELEASE_BUILD ? "../../build/libv86.mjs" : "../../src/main.js"); + const SHOW_LOGS = false; function wait(time) { diff --git a/tests/devices/virtio_9p.js b/tests/devices/virtio_9p.js index 1dba5edf..73188968 100755 --- a/tests/devices/virtio_9p.js +++ b/tests/devices/virtio_9p.js @@ -5,10 +5,10 @@ import fs from "node:fs"; process.on("unhandledRejection", exn => { throw exn; }); -const TEST_RELEASE_BUILD = +process.env.TEST_RELEASE_BUILD; const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); -var { V86 } = await import(`../../build/${TEST_RELEASE_BUILD ? "libv86" : "libv86-debug"}.mjs`); +const TEST_RELEASE_BUILD = +process.env.TEST_RELEASE_BUILD; +const { V86 } = await import(TEST_RELEASE_BUILD ? "../../build/libv86.mjs" : "../../src/main.js"); const testfsjson = JSON.parse(fs.readFileSync(__dirname + "/testfs.json", "utf-8")); const SHOW_LOGS = false; diff --git a/tests/devices/virtio_balloon.js b/tests/devices/virtio_balloon.js index 89474aa0..b5f34711 100755 --- a/tests/devices/virtio_balloon.js +++ b/tests/devices/virtio_balloon.js @@ -7,8 +7,7 @@ const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); process.on("unhandledRejection", exn => { throw exn; }); const TEST_RELEASE_BUILD = +process.env.TEST_RELEASE_BUILD; - -const { V86 } = await import(`../../build/${TEST_RELEASE_BUILD ? "libv86" : "libv86-debug"}.mjs`); +const { V86 } = await import(TEST_RELEASE_BUILD ? "../../build/libv86.mjs" : "../../src/main.js"); const SHOW_LOGS = false; diff --git a/tests/devices/virtio_console.js b/tests/devices/virtio_console.js index c7efefd4..4ed81ab9 100755 --- a/tests/devices/virtio_console.js +++ b/tests/devices/virtio_console.js @@ -7,11 +7,10 @@ import url from "node:url"; const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); process.on("unhandledRejection", exn => { throw exn; }); -const TEST_RELEASE_BUILD = +process.env.TEST_RELEASE_BUILD; const SHOW_LOGS = false; -var { V86 } = await import(`../../build/${TEST_RELEASE_BUILD ? "libv86" : "libv86-debug"}.mjs`); - +const TEST_RELEASE_BUILD = +process.env.TEST_RELEASE_BUILD; +const { V86 } = await import(TEST_RELEASE_BUILD ? "../../build/libv86.mjs" : "../../src/main.js"); const emulator = new V86({ bios: { url: __dirname + "/../../bios/seabios.bin" }, diff --git a/tests/devices/wisp_network.js b/tests/devices/wisp_network.js index dadd5836..f70fb6dc 100755 --- a/tests/devices/wisp_network.js +++ b/tests/devices/wisp_network.js @@ -8,8 +8,7 @@ const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); process.on("unhandledRejection", exn => { throw exn; }); const TEST_RELEASE_BUILD = +process.env.TEST_RELEASE_BUILD; - -const { V86 } = await import(`../../build/${TEST_RELEASE_BUILD ? "libv86" : "libv86-debug"}.mjs`); +const { V86 } = await import(TEST_RELEASE_BUILD ? "../../build/libv86.mjs" : "../../src/main.js"); const SHOW_LOGS = false; diff --git a/tests/expect/run.js b/tests/expect/run.js index 0bf78c04..cea8cd34 100755 --- a/tests/expect/run.js +++ b/tests/expect/run.js @@ -6,23 +6,14 @@ import path from "node:path"; import assert from "node:assert/strict"; import url from "node:url"; import { spawnSync } from "node:child_process"; -import wabtfactory from "../../build/libwabt.cjs"; +import wabt from "../../build/libwabt.cjs"; const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); const TEST_RELEASE_BUILD = +process.env.TEST_RELEASE_BUILD; +const { V86 } = await import(TEST_RELEASE_BUILD ? "../../build/libv86.mjs" : "../../src/main.js"); -const libwabt = wabtfactory(); - -try { - var { V86 } = await import(`../../build/${TEST_RELEASE_BUILD ? "libv86" : "libv86-debug"}.mjs`); -} -catch(e) { - console.error(e); - console.error("Failed to import build/libv86-debug.js. Run " + - "`make build/libv86-debug.js` first."); - process.exit(1); -} +const libwabt = wabt(); const TEST_NAME = process.env.TEST_NAME; diff --git a/tests/full/run.js b/tests/full/run.js index cdc92e94..31f9a955 100755 --- a/tests/full/run.js +++ b/tests/full/run.js @@ -7,6 +7,9 @@ import os from "node:os"; import fs from "node:fs"; import url from "node:url"; +const TEST_RELEASE_BUILD = +process.env.TEST_RELEASE_BUILD; +const { V86 } = await import(TEST_RELEASE_BUILD ? "../../build/libv86.mjs" : "../../src/main.js"); + const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); process.on("unhandledRejection", exn => { throw exn; }); @@ -14,21 +17,11 @@ process.on("unhandledRejection", exn => { throw exn; }); var TIMEOUT_EXTRA_FACTOR = +process.env.TIMEOUT_EXTRA_FACTOR || 1; var MAX_PARALLEL_TESTS = +process.env.MAX_PARALLEL_TESTS || 4; var TEST_NAME = process.env.TEST_NAME; -const TEST_RELEASE_BUILD = +process.env.TEST_RELEASE_BUILD; const RUN_SLOW_TESTS = +process.env.RUN_SLOW_TESTS; const VERBOSE = false; const LOG_SCREEN = false; -try -{ - var { V86 } = await import(`../../build/${TEST_RELEASE_BUILD ? "libv86" : "libv86-debug"}.mjs`); -} -catch(e) -{ - console.error("Failed to import build/libv86-debug.js. Run `make build/libv86-debug.js first."); - process.exit(1); -} var root_path = __dirname + "/../.."; diff --git a/tests/jit-paging/run.js b/tests/jit-paging/run.js index fc4396a7..aa9e50b7 100755 --- a/tests/jit-paging/run.js +++ b/tests/jit-paging/run.js @@ -6,10 +6,9 @@ import url from "node:url"; process.on("unhandledRejection", exn => { throw exn; }); const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); + const TEST_RELEASE_BUILD = +process.env.TEST_RELEASE_BUILD; - -var { V86 } = await import(`../../build/${TEST_RELEASE_BUILD ? "libv86" : "libv86-debug"}.mjs`); - +const { V86 } = await import(TEST_RELEASE_BUILD ? "../../build/libv86.mjs" : "../../src/main.js"); var test_executable = new Uint8Array(fs.readFileSync(__dirname + "/test-jit")); diff --git a/tests/kvm-unit-tests/run.mjs b/tests/kvm-unit-tests/run.mjs index f8f64d46..29153af0 100755 --- a/tests/kvm-unit-tests/run.mjs +++ b/tests/kvm-unit-tests/run.mjs @@ -10,8 +10,7 @@ const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); process.on("unhandledRejection", exn => { throw exn; }); const TEST_RELEASE_BUILD = +process.env.TEST_RELEASE_BUILD; - -var { V86 } = await import(`../../build/${TEST_RELEASE_BUILD ? "libv86" : "libv86-debug"}.mjs`); +const { V86 } = await import(TEST_RELEASE_BUILD ? "../../build/libv86.mjs" : "../../src/main.js"); function readfile(path) { diff --git a/tests/nasm/run.js b/tests/nasm/run.js index 8926a824..9dcf72ab 100755 --- a/tests/nasm/run.js +++ b/tests/nasm/run.js @@ -8,6 +8,9 @@ import assert from "node:assert/strict"; import os from "node:os"; import cluster from "node:cluster"; +const TEST_RELEASE_BUILD = +process.env.TEST_RELEASE_BUILD; +const { V86 } = await import(TEST_RELEASE_BUILD ? "../../build/libv86.mjs" : "../../src/main.js"); + const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); process.on("unhandledRejection", exn => { throw exn; }); @@ -27,7 +30,6 @@ process.on("unhandledRejection", exn => { throw exn; }); const MAX_PARALLEL_TESTS = +process.env.MAX_PARALLEL_TESTS || 99; const TEST_NAME = new RegExp(process.env.TEST_NAME || "", "i"); const SINGLE_TEST_TIMEOUT = 10000; -const TEST_RELEASE_BUILD = +process.env.TEST_RELEASE_BUILD; const TEST_DIR = __dirname + "/build/"; const DONE_MSG = "DONE"; @@ -50,16 +52,6 @@ const FPU_TAG_ALL_INVALID = 0xAAAA; const FPU_STATUS_MASK = 0xFFFF & ~(1 << 9 | 1 << 5 | 1 << 3 | 1 << 1); // bits that are not correctly implemented by v86 const FP_COMPARISON_SIGNIFICANT_DIGITS = 7; -try { - var { V86 } = await import(`../../build/${TEST_RELEASE_BUILD ? "libv86" : "libv86-debug"}.mjs`); -} -catch(e) { - console.error(e); - console.error("Failed to import build/libv86-debug.js. Run " + - "`make build/libv86-debug.js` first."); - process.exit(1); -} - function float_equal(x, y) { assert(typeof x === "number"); diff --git a/tests/qemu/run.js b/tests/qemu/run.js index 877d4061..13138f01 100755 --- a/tests/qemu/run.js +++ b/tests/qemu/run.js @@ -3,14 +3,13 @@ process.on("unhandledRejection", exn => { throw exn; }); -const TEST_RELEASE_BUILD = +process.env.TEST_RELEASE_BUILD; - import { fileURLToPath } from "url"; import path from "path"; import fs from "fs"; const __dirname = path.dirname(fileURLToPath(import.meta.url)); -const { V86 } = await import(`../../build/${TEST_RELEASE_BUILD ? "libv86" : "libv86-debug"}.mjs`); +const TEST_RELEASE_BUILD = +process.env.TEST_RELEASE_BUILD; +const { V86 } = await import(TEST_RELEASE_BUILD ? "../../build/libv86.mjs" : "../../src/main.js"); var test_executable = new Uint8Array(fs.readFileSync(__dirname + "/test-i386"));