Read QuickJS from the built bundle and print the unavailable esbuild fixture skip

This commit is contained in:
2026-11-12 14:13:34 +00:00
parent e7b7cf113c
commit cc3ff75a67
+8 -1
View File
@@ -231,7 +231,10 @@ async fn poll_preserves_input_and_returns_clock() {
#[tokio::test(flavor = "multi_thread")]
async fn userland_files() {
let qjs = module(&Path::new(env!("CARGO_MANIFEST_DIR")).join("../userland/qjs/qjs.wasm"));
let bundle = std::env::var_os("SAUSAGE_USERLAND")
.map(std::path::PathBuf::from)
.unwrap_or_else(|| Path::new(env!("CARGO_MANIFEST_DIR")).join("../target/userland/bundle"));
let qjs = module(&bundle.join("bin/qjs.wasm"));
let root = Arc::new(Memory::default());
let script = r#"
if (os.mkdir('/work') !== 0) throw Error('mkdir');
@@ -282,6 +285,10 @@ async fn userland_files() {
}
#[tokio::test(flavor = "multi_thread")]
async fn esbuild_bundle() {
if std::env::var_os("SAUSAGE_NIX_CHECK").is_some() {
eprintln!("SKIP preview1::esbuild_bundle: the removed spike fixture requires npm downloads and native Go tooling");
return;
}
let dir = tempfile::tempdir().unwrap();
let fixture = Path::new(env!("CARGO_MANIFEST_DIR")).join("../spikes/s6-esbuild");
for name in ["app.tsx", "check.mjs", "package.json", "package-lock.json"] {