A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
Strengthen import and native release verification
yhhbc5469ccc0c6
diff --git a/.github/workflows/build.yml b/.github/workflows/build.ymlindex 9aa6d2ff3..5346972a5 100644--- a/.github/workflows/build.yml+++ b/.github/workflows/build.yml@@ -27,11 +27,12 @@ env:test_ecs test_events test_particle test_tilemap test_sparse_settest_resource_pool test_shader_variant test_log_format test_registry_safetytest_registry_ondestroy test_view_api_matrix+ test_hierarchy_links test_entity_activity test_transform_traversal test_tween_activitytest_shader_device test_draw_params test_per_draw_blocks test_texture_fb test_buffer_device- test_compressed_format test_batch_builder test_boundary_span test_webgpu_device+ test_compressed_format test_batch_builder test_skeletal_batch_color test_boundary_span test_webgpu_devicetest_clip_depth test_sort_key test_sprite_mask_range test_sprite_draw_mode test_shadow_atlas test_particle_shapes test_lod_selection test_hdr_format test_probe_store test_occlusion_view test_reflection_storetest_text_edit test_render_graph test_device_loss test_physics_interpolation- test_bitmap_font test_texture_cache test_mesh_recovery test_aot_host test_aot_conformance+ test_bitmap_font test_texture_cache test_material_shader_lifetime test_mesh_recovery test_aot_host test_aot_conformancetest_touch_streamtest_frame_lifecyclediff --git a/bench/aot-native/README.md b/bench/aot-native/README.mdindex a8d80bd12..236ca7079 100644--- a/bench/aot-native/README.md+++ b/bench/aot-native/README.md@@ -200,7 +200,7 @@ different deltas, move different distances, and have no differential between the| `BENCH_ENTITIES` | 5000 | entities the startup system spawns || `BENCH_FRAMES` | 300 | timed frames || `BENCH_WARMUP` | 120 | untimed frames first — assets land, pools fill, and a lazily-bound compiled system gets bound before it is timed |-| `BENCH_REPS` | 3 | processes per configuration; the fastest is kept |+| `BENCH_REPS` | 3 | requested processes per configuration; pairs use at least 3, and the fastest is kept || `BENCH_BODIES` | `thin` | any of `thin`, `thick`, `heavy`, `script` || `BENCH_IDLE` | off | also run the scene with no body, so a system's own cost can be read off it || `BENCH_SPRITES` | on | `0` drops the `Sprite`, which is most of the idle floor — needed to resolve a compiled system at all |@@ -210,6 +210,7 @@ different deltas, move different distances, and have no differential between the| `BENCH_RENDER_ENTITIES` | 128000 | the pair's entity count || `BENCH_MIN_BUSY` | 0.5 | the share of a frame's span that must be CPU for the span to be about the engine || `BENCH_KEEP` | off | keep the exported apps for poking at |+| `BENCH_TIMEOUT_MS` | 300000 | maximum time for each host process; a timeout or nonzero exit rejects its printed measurements |## What drawing costs, in timediff --git a/bench/aot-native/frame-bench.mjs b/bench/aot-native/frame-bench.mjsindex 65dc70db2..8d75f4a80 100644--- a/bench/aot-native/frame-bench.mjs+++ b/bench/aot-native/frame-bench.mjs@@ -42,6 +42,7 @@ import path from 'node:path';import { fileURLToPath } from 'node:url';import { installedTemplateDir } from '../../build-tools/utils/nativeTemplate.js';import { desktopExecutableIn } from '../../build-tools/utils/desktopApp.js';+import { requireNativeHostSuccess } from '../../tools/lib/nativeHostResult.mjs';const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', '..');/** The one source both AOT benchmarks measure. */@@ -282,6 +283,7 @@ function exportApp(project, out, compiled) {function run(exe, label) {const r = spawnSync(exe, [], {encoding: 'utf8', cwd: path.dirname(exe),+ timeout: Number(process.env.BENCH_TIMEOUT_MS ?? 300_000),env: {...process.env,ESTELLA_BENCH_FRAMES: String(FRAMES),@@ -290,6 +292,7 @@ function run(exe, label) {ESTELLA_BENCH_DT: String(1 / 60),},});+ requireNativeHostSuccess(r, label);const log = `${r.stdout ?? ''}${r.stderr ?? ''}`;const line = /bench: (\{.*\})/.exec(log);if (line === null) {@@ -366,7 +369,7 @@ try {// --------------------------------------------------------------------- reportconsole.log(`\nno-JIT frame — QuickJS-ng in the native host, ${ENTITIES} entities, `- + `${FRAMES} frames after ${WARMUP}, best of ${REPS}\n`);+ + `${FRAMES} frames after ${WARMUP}, best of ${PAIR_REPS}\n`);// `tick` is the microtask drain, not the `update` call: that one only schedules an// async tick. `draws` is a column because a body can move the render's cost —// `heavy` writes `position.z`, which breaks sprite batching into one draw each.diff --git a/build-tools/utils/emscripten.d.ts b/build-tools/utils/emscripten.d.tsindex 53e4cc26e..55779b835 100644--- a/build-tools/utils/emscripten.d.ts+++ b/build-tools/utils/emscripten.d.ts@@ -5,6 +5,11 @@/** The `emcc` to run, or null where no activated emsdk was found. */export function emccPath(): string | null;+export function runCommand(command: string, args: readonly string[], options?: {+ cwd?: string;+ silent?: boolean;+ env?: Record<string, string | undefined>;+}): Promise<{ stdout: string; stderr: string; code: number }>;export const NO_EMCC: string;export function proveEmcc(suite: string): void;diff --git a/build-tools/utils/emscripten.js b/build-tools/utils/emscripten.jsindex de2222ecc..676f29076 100644--- a/build-tools/utils/emscripten.js+++ b/build-tools/utils/emscripten.js@@ -249,7 +249,11 @@ export function runCommand(command, args, options = {}) {const shell = process.platform === 'win32';const quoted = (s) => (shell && /\s/.test(s) && !/^".*"$/.test(s) ? `"${s}"` : s);- const proc = spawn(quoted(command), args.map(quoted), {+ // Keep CMake's MSVC prefix probe and Ninja's /showIncludes parser on+ // the same console encoding, including installations with only a+ // localized compiler language pack. English VSLANG cannot fix those.+ const executable = shell ? `chcp 65001>nul && ${quoted(command)}` : command;+ const proc = spawn(executable, args.map(quoted), {cwd,env: { ...process.env, ...env },stdio: silent ? 'pipe' : 'inherit',diff --git a/pipeline/src/assets/gltfImport.ts b/pipeline/src/assets/gltfImport.tsindex 9a981d22b..1b2f0c109 100644--- a/pipeline/src/assets/gltfImport.ts+++ b/pipeline/src/assets/gltfImport.ts@@ -499,10 +499,22 @@ function readTexture(ctx: MaterialContext, cache: Map<number, ImportedImageRef |ref: GltfTextureRef, label: string): ImportedImageRef | null {// The mesh carries a second set; a MATERIAL still samples the first, so a// texture asking for another one is the loss to report — not the UVs.- if (ref.texCoord) {- ctx.warnings.push(`${label}: samples TEXCOORD_${ref.texCoord}; materials read the first set, so it will sample UV0`);+ const transform = ref.extensions?.KHR_texture_transform as {+ offset?: number[]; scale?: number[]; rotation?: number; texCoord?: number;+ } | undefined;+ const texCoord = transform?.texCoord ?? ref.texCoord ?? 0;+ if (texCoord) {+ ctx.warnings.push(`${label}: samples TEXCOORD_${texCoord}; materials read the first set, so it will sample UV0`);}for (const name of Object.keys(ref.extensions ?? {})) {+ // Exporters also emit this extension when it only selects UV0. Nothing+ // is lost in that case; warn only when the source needs a UV rewrite.+ if (name === 'KHR_texture_transform' && transform+ && (transform.rotation ?? 0) === 0+ && (transform.offset === undefined || (transform.offset.length === 2+ && transform.offset[0] === 0 && transform.offset[1] === 0))+ && (transform.scale === undefined || (transform.scale.length === 2+ && transform.scale[0] === 1 && transform.scale[1] === 1))) continue;ctx.warnings.push(`${label}: ${name} not imported (uvs are used as authored)`);}const cached = cache.get(ref.index);@@ -564,7 +576,9 @@ function readMaterial(ctx: MaterialContext, textureCache: Map<number, ImportedImif (src.normalTexture?.scale !== undefined && src.normalTexture.scale !== 1) {unused.push(`normal-map scale ${src.normalTexture.scale}`);}- for (const name of Object.keys(src.extensions ?? {})) unused.push(name);+ for (const name of Object.keys(src.extensions ?? {})) {+ if (name !== 'KHR_materials_emissive_strength') unused.push(name);+ }if (unused.length > 0) ctx.warnings.push(`${label}: ${unused.join(', ')} not imported`);const texture = pbr.baseColorTexture@@ -577,7 +591,16 @@ function readMaterial(ctx: MaterialContext, textureCache: Map<number, ImportedIm? readTexture(ctx, textureCache, src.occlusionTexture, label) : null;const metalRoughMap = pbr.metallicRoughnessTexture? readTexture(ctx, textureCache, pbr.metallicRoughnessTexture, label) : null;- const emissive = src.emissiveFactor ?? (emissiveMap ? [1, 1, 1] : [0, 0, 0]);+ const strengthExtension = src.extensions?.KHR_materials_emissive_strength as+ { emissiveStrength?: unknown } | undefined;+ const strengthValue = strengthExtension?.emissiveStrength === undefined+ ? 1 : strengthExtension.emissiveStrength;+ const validStrength = typeof strengthValue === 'number'+ && Number.isFinite(strengthValue) && strengthValue >= 0;+ if (!validStrength) ctx.warnings.push(`${label}: invalid emissiveStrength; using 1`);+ const strength = validStrength ? strengthValue : 1;+ const emissive = (src.emissiveFactor ?? (emissiveMap ? [1, 1, 1] : [0, 0, 0]))+ .map(value => value * strength);// glTF defaults both factors to 1 — a material that says nothing is a fully// rough metal, and writing that out is what makes a product say so.const metallic = pbr.metallicFactor ?? 1;@@ -1213,4 +1236,4 @@ export async function importGltfMeshes(meshes, textures, externalFiles, nodes, warnings,animations: readAnimations(json, src, nodes, meshes, stem, warnings),};-}\ No newline at end of file+}diff --git a/pipeline/tests/gltf-import.test.ts b/pipeline/tests/gltf-import.test.tsindex 56d4055f5..66273c6f3 100644--- a/pipeline/tests/gltf-import.test.ts+++ b/pipeline/tests/gltf-import.test.ts@@ -359,6 +359,28 @@ describe('glTF material import', () => {expect(warnings.join('\n')).toContain('KHR_texture_transform not imported');});+ it.each([{}, { texCoord: 0 }, { offset: [0, 0], scale: [1, 1], rotation: 0 }])+ ('accepts an identity UV transform from a model exporter: %j', async transform => {+ const doc = withInlineImage();+ (doc.materials as { pbrMetallicRoughness: { baseColorTexture: Record<string, unknown> } }[])[0]!+ .pbrMetallicRoughness.baseColorTexture.extensions = { KHR_texture_transform: transform };+ const { meshes, warnings } = await importGltfMeshes(gltf(doc), 'model');+ expect(warnings).toEqual([]);+ expect(texCoords(meshes[0]!)).toEqual([0, 1, 1, 1, 0, 0]);+ });++ it.each([0, 1])('reports the effective UV set after an extension override to %s', async texCoord => {+ const doc = withInlineImage();+ const texture = (doc.materials as { pbrMetallicRoughness: { baseColorTexture: Record<string, unknown> } }[])[0]!+ .pbrMetallicRoughness.baseColorTexture;+ texture.texCoord = 1;+ texture.extensions = { KHR_texture_transform: { texCoord } };+ const { warnings } = await importGltfMeshes(gltf(doc), 'model');+ expect(warnings).toEqual(texCoord === 0 ? [] : [+ 'material "Base": samples TEXCOORD_1; materials read the first set, so it will sample UV0',+ ]);+ });+it("flips V, because glTF's uv origin is the image's top-left", async () => {const { meshes } = await importGltfMeshes(gltf(withInlineImage()), 'model');expect(texCoords(meshes[0]!)).toEqual([0, 1, 1, 1, 0, 0]);@@ -418,6 +440,48 @@ describe('glTF material products', () => {expect(meshRenderer.normalMap).toBeUndefined();});+ it('preserves HDR emission through imported material products', async () => {+ const doc = shaded({+ emissiveFactor: [1, 0.5, 0.125], emissiveTexture: { index: 0 },+ extensions: { KHR_materials_emissive_strength: { emissiveStrength: 24 } },+ });+ const { meshes, warnings } = await importGltfMeshes(gltf(doc), 'model');+ expect(warnings).toEqual([]);+ expect(meshes[0]!.material?.emissive).toEqual([24, 12, 3]);+ const products = materialProducts(meshes, 'model');+ expect(products[0]!.data.properties.u_emissive).toEqual({ r: 24, g: 12, b: 3, a: 1 });+ expect(products[0]!.data.properties.u_emissiveMap).toBe('model_0.png');+ });++ it.each([0, 0.5, 1])('preserves an emission multiplier of %s', async strength => {+ const { products } = await productsOf(shaded({+ emissiveFactor: [1, 0.5, 0], emissiveTexture: { index: 0 },+ extensions: { KHR_materials_emissive_strength: { emissiveStrength: strength } },+ }));+ expect(products[0]!.data.properties.u_emissive).toEqual(strength === 0+ ? undefined : { r: strength, g: strength * 0.5, b: 0, a: 1 });+ });++ it('defaults an omitted strength to one and still reports unsupported extensions', async () => {+ const doc = shaded({+ emissiveFactor: [1, 0.5, 0],+ extensions: { KHR_materials_emissive_strength: {}, KHR_materials_clearcoat: {} },+ });+ const { meshes, warnings } = await importGltfMeshes(gltf(doc), 'model');+ expect(meshes[0]!.material?.emissive).toEqual([1, 0.5, 0]);+ expect(warnings).toEqual(['material "Shaded": KHR_materials_clearcoat not imported']);+ });++ it.each([-1, '24', null])('reports an invalid emission strength %s', async strength => {+ const doc = shaded({+ emissiveFactor: [1, 0.5, 0],+ extensions: { KHR_materials_emissive_strength: { emissiveStrength: strength } },+ });+ const { meshes, warnings } = await importGltfMeshes(gltf(doc), 'model');+ expect(meshes[0]!.material?.emissive).toEqual([1, 0.5, 0]);+ expect(warnings).toContain('material "Shaded": invalid emissiveStrength; using 1');+ });+it('says the render state the draw would otherwise have said itself', async () => {// A material REPLACES the draw's blend/depth/cull, so a model told to// occlude itself must keep saying so through the material.diff --git a/tools/baselines/sdk-test-types.json b/tools/baselines/sdk-test-types.jsonindex f2be030a7..c91227cc4 100644--- a/tools/baselines/sdk-test-types.json+++ b/tools/baselines/sdk-test-types.json@@ -241,9 +241,6 @@"tests/ui-slider-dropdown.test.ts": {"TS2724|'\"../src/ui\"' has no exported member named 'UIRect'. Did you mean 'Rect'?": 1},- "tests/ui-text-submit.test.ts": {- "TS2554|Expected 9-10 arguments, but got 8.": 1- },"tests/utf8.test.ts": {"TS2307|Cannot find module '../src/util/utf8?fallback' or its corresponding type declarations.": 1},diff --git a/tools/check-cpp-tests.mjs b/tools/check-cpp-tests.mjsindex a71146ed5..abc6e576f 100644--- a/tools/check-cpp-tests.mjs+++ b/tools/check-cpp-tests.mjs@@ -199,15 +199,20 @@ function harnessBinary(target) {const built = [];const absent = [];for (const target of buildable) {- const run = spawnSync('cmake', ['--build', BUILD, '-j', '8', '--target', target], { encoding: 'utf8' });+ const run = spawnSync('cmake', ['--build', BUILD, '--config', 'Release', '-j', '8', '--target', target], { encoding: 'utf8' });const out = `${run.stdout ?? ''}${run.stderr ?? ''}`;if (run.status === 0) {+ // Release is explicit: multi-config generators otherwise build Debug.// Compiling is half the claim. A harness that builds and then fails its// assertions is a red CI job this gate would otherwise call green — which// is how two stale shader-variant assertions sat behind a broken build.const binary = harnessBinary(target);- const ran = binary ? spawnSync(binary, [], { encoding: 'utf8' }) : null;- if (ran && ran.status !== 0) {+ if (!binary) {+ console.error('check-cpp-tests: ' + target + ' built but its executable was not found; no assertions ran.');+ process.exit(1);+ }+ const ran = spawnSync(binary, [], { encoding: 'utf8' });+ if (ran.status !== 0) {console.error(`check-cpp-tests: ${target} builds but does not pass.\n`);console.error(`${ran.stdout ?? ''}${ran.stderr ?? ''}`.split('\n').filter((l) => /FAIL|error|assert/i.test(l)).slice(0, 12).join('\n'));diff --git a/tools/launchers/launch-export.mjs b/tools/launchers/launch-export.mjsindex 3db93aaed..a69df30dc 100644--- a/tools/launchers/launch-export.mjs+++ b/tools/launchers/launch-export.mjs@@ -16,6 +16,8 @@** electron desktop/scripts/launch-export.mjs --dir <exportDir> [options]* --out <file.png> write the captured frame+ * --canvas-out <file.png> also read the game canvas at a frame boundary,+ * to distinguish a renderer failure from compositor capture* --w / --h surface size (default 640x360)* --settle <n> frames to let run before capturing (default 30)* --timeout <ms> how long to wait for the first frame (default 30000)@@ -96,6 +98,7 @@ const has = (name) => argv.includes(`--${name}`);const DIR = path.resolve(flag('dir', ''));const OUT = flag('out', '');+const CANVAS_OUT = flag('canvas-out', '');const W = Number(flag('w', '640'));const H = Number(flag('h', '360'));const SETTLE = Number(flag('settle', '30'));@@ -458,6 +461,24 @@ const SCENE = flag('scene', '');return (await still()) >= 0;})();+ if (CANVAS_OUT) {+ // Read inside rAF: a non-preserved WebGL drawing buffer may be discarded+ // after presentation. A compositor screenshot alone cannot tell whether a+ // partial copy was what the engine drew or what Chromium copied later.+ const dataUrl = await win.webContents.executeJavaScript(`+ new Promise((resolve, reject) => requestAnimationFrame(() => {+ try {+ const canvas = [...document.querySelectorAll('canvas')]+ .sort((a, b) => b.width * b.height - a.width * a.height)[0];+ if (!canvas || !canvas.width || !canvas.height) throw new Error('no game canvas');+ resolve(canvas.toDataURL('image/png'));+ } catch (e) { reject(e); }+ }))+ `);+ const prefix = 'data:image/png;base64,';+ if (!dataUrl.startsWith(prefix)) throw new Error('game canvas did not return a PNG');+ await writeFile(CANVAS_OUT, Buffer.from(dataUrl.slice(prefix.length), 'base64'));+ }const image = await captureFrame(win);if (OUT) await writeFile(OUT, image.toPNG());stop();diff --git a/tools/lib/nativeHostResult.mjs b/tools/lib/nativeHostResult.mjsnew file mode 100644index 000000000..a1441367c--- /dev/null+++ b/tools/lib/nativeHostResult.mjs@@ -0,0 +1,16 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team++/** A printed frame or benchmark is only acceptable after a clean host exit. */+export function requireNativeHostSuccess(result, label) {+ const reason = result.error+ ? `${result.error.code ?? 'launch error'}: ${result.error.message}`+ : result.signal+ ? `terminated by ${result.signal}`+ : result.status !== 0+ ? `exit ${result.status ?? 'unknown'}`+ : null;+ if (reason === null) return;+ const tail = `${result.stdout ?? ''}${result.stderr ?? ''}`.trim().split('\n').slice(-15).join('\n');+ throw new Error(`${label}: native host failed (${reason})${tail ? '\n' + tail : ''}`);+}diff --git a/tools/tests/native-host-result.test.ts b/tools/tests/native-host-result.test.tsnew file mode 100644index 000000000..2d08b7b3d--- /dev/null+++ b/tools/tests/native-host-result.test.ts@@ -0,0 +1,36 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+import { describe, it, expect } from 'vitest';+import { spawnSync } from 'node:child_process';+import path from 'node:path';+import { tmpdir } from 'node:os';+import { randomUUID } from 'node:crypto';+// @ts-expect-error plain JS verifier helper+import { requireNativeHostSuccess } from '../lib/nativeHostResult.mjs';++const successLog = 'bench: {"cpu":{"p50":1}}\n"rendered":true\nAOT: BenchThin is running compiled';+const child = (code: string, timeout = 5000) => spawnSync(process.execPath, ['-e', code], {+ encoding: 'utf8', timeout,+});++describe('native host acceptance requires process completion', () => {+ it('accepts results from a cleanly exited real child', () => {+ const result = child(`console.log(${JSON.stringify(successLog)})`);+ expect(result.stdout).toContain('bench:');+ expect(() => requireNativeHostSuccess(result, 'fixture')).not.toThrow();+ });+ it('rejects successful-looking output followed by a real nonzero exit', () => {+ const result = child(`console.log(${JSON.stringify(successLog)}); process.exit(7)`);+ expect(result.stdout).toContain('"rendered":true');+ expect(() => requireNativeHostSuccess(result, 'fixture')).toThrow(/fixture.*exit 7/);+ });+ it('rejects a real timeout even after successful-looking output', () => {+ const result = child(`console.log(${JSON.stringify(successLog)}); setInterval(()=>{},1000)`, 1000);+ expect(result.stdout).toContain('bench:');+ expect(() => requireNativeHostSuccess(result, 'fixture')).toThrow(/ETIMEDOUT/);+ });+ it('rejects a missing executable rather than accepting absent exit status', () => {+ const result = spawnSync(path.join(tmpdir(), randomUUID(), 'missing-host.exe'), [], { encoding: 'utf8' });+ expect(() => requireNativeHostSuccess(result, 'fixture')).toThrow(/ENOENT/);+ });+});diff --git a/tools/verify-aot-native.mjs b/tools/verify-aot-native.mjsindex 0df6b2be1..83845b762 100644--- a/tools/verify-aot-native.mjs+++ b/tools/verify-aot-native.mjs@@ -24,6 +24,7 @@ import path from 'node:path';import { fileURLToPath } from 'node:url';import { installedTemplateDir } from '../build-tools/utils/nativeTemplate.js';import { desktopExecutableIn } from '../build-tools/utils/desktopApp.js';+import { requireNativeHostSuccess } from './lib/nativeHostResult.mjs';const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');/** The example whose system carries the marker. */@@ -75,6 +76,7 @@ try {const run = spawnSync(exe, [], {encoding: 'utf8',+ timeout: 120_000,cwd: path.dirname(exe),env: {...process.env,@@ -83,6 +85,7 @@ try {ESTELLA_SHOT_QUIT: '1',},});+ requireNativeHostSuccess(run, 'aot native');const log = `${run.stdout ?? ''}${run.stderr ?? ''}`;const installed = /AOT: (\d+) compiled system\(s\) installed/.exec(log);diff --git a/tools/verify-desktop-render.mjs b/tools/verify-desktop-render.mjsindex db2b22c58..13b44918a 100644--- a/tools/verify-desktop-render.mjs+++ b/tools/verify-desktop-render.mjs@@ -28,6 +28,7 @@ import { tmpdir } from 'node:os';import path from 'node:path';import { fileURLToPath } from 'node:url';import { installedTemplateDir } from '../build-tools/utils/nativeTemplate.js';+import { requireNativeHostSuccess } from './lib/nativeHostResult.mjs';import { atTier, projectDir, GOLDEN, desktopPixels, desktopPixelsSkip } from './goldenProjects.mjs';const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');@@ -110,6 +111,7 @@ function packageAndRun(project, templateDir, work) {timeout: 120_000,});const output = `${run.stdout ?? ''}${run.stderr ?? ''}`;+ requireNativeHostSuccess(run, path.basename(project));return { verdict: verdictIn(output), status: run.status, output, raw: path.join(out, 'frame.raw') };}diff --git a/tools/verify-native-conformance.mjs b/tools/verify-native-conformance.mjsindex f72b7b30f..cfa44dabe 100644--- a/tools/verify-native-conformance.mjs+++ b/tools/verify-native-conformance.mjs@@ -28,6 +28,7 @@ import path from 'node:path';import { fileURLToPath } from 'node:url';import { installedTemplateDir } from '../build-tools/utils/nativeTemplate.js';import { desktopExecutableIn } from '../build-tools/utils/desktopApp.js';+import { requireNativeHostSuccess } from './lib/nativeHostResult.mjs';import { bytecodeMatchesBundle } from './lib/nativeBytecode.mjs';const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');@@ -120,6 +121,7 @@ function play(compiled) {const run = spawnSync(exe, [], {encoding: 'utf8',+ timeout: 120_000,cwd: path.dirname(exe),env: {...process.env,@@ -132,6 +134,7 @@ function play(compiled) {ESTELLA_BENCH_LABEL: compiled ? 'conformance-aot' : 'conformance-interpreted',},});+ requireNativeHostSuccess(run, compiled ? 'compiled conformance' : 'interpreted conformance');return { log: `${run.stdout ?? ''}${run.stderr ?? ''}`, status: run.status };} finally {rmSync(out, { recursive: true, force: true, maxRetries: 10, retryDelay: 50 });