ci-platforms / darwin amd64 smoke (push) Skipped
GitHub / linux amd64 native GitHub-hosted native CI: success
ci-platforms / windows amd64 smoke (push) Skipped
GitHub / windows amd64 native GitHub-hosted native CI: success
GitHub / darwin arm64 native GitHub-hosted native CI: success
GitHub / darwin amd64 native GitHub-hosted native CI: success
ci / checks (push) Failing after 1h21m34s
ci / native-authoring (push) Skipped
ci-platforms / darwin arm64 smoke (push) Skipped
github-native / gitea-pending (push) Skipped
github-native / darwin amd64 native (push) Skipped
github-native / linux amd64 native (push) Skipped
github-native / windows amd64 native (push) Skipped
github-native / darwin arm64 native (push) Skipped
github-native / gitea-result (push) Skipped
ci / build (amd64, linux, ubuntu-24.04) (push) Successful in 12m4s
ci / release (push) Skipped
Add dockable Art tools, animation and previews, guarded asset workflows, and the Web Asset Studio built on the shared Art Core. Expand English and Russian documentation, interactive Try scenes, examples and editor icons. Add audio waveform navigation, source analysis, guarded previews and a browser Worker mixer. Preserve source changes and recovery with bounded checks, and strengthen native, browser and interoperability CI. Prepare version 0.12.5 and manually built native artifact candidates. Fix the production site image demo build dependency. Reuse immutable scene indices when capturing keyframes. Wait for real Persist save/load completion in component tests. Stabilize browser Game View captures outside pointer hover. Aseprite interchange and persistent Audio EDL recovery remain limited; the artifact workflow does not publish releases or change stable.
85 lines
3.6 KiB
JavaScript
85 lines
3.6 KiB
JavaScript
'use strict';
|
|
const assert = require('node:assert/strict');
|
|
const fs = require('node:fs');
|
|
const path = require('node:path');
|
|
const vm = require('node:vm');
|
|
const test = require('node:test');
|
|
|
|
// Fault-injection at the presentation transport boundary. The separate HTTP
|
|
// GPU E2E gate exercises real WebGL2, shaders, particles and context restore.
|
|
function fixture() {
|
|
const elements = new Map(), raf = [], intervals = [];
|
|
function element(id) {
|
|
if (elements.has(id)) return elements.get(id);
|
|
const classes = new Set();
|
|
const item = {value: id === 'gpu-mode' ? 'lit' : 1, checked: false,
|
|
textContent: '', title: '', options: [{value:'pixels'}, {value:'lit'}],
|
|
addEventListener() {}, classList: {
|
|
add(name) { classes.add(name); },
|
|
toggle(name, on) { if (on) classes.add(name); else classes.delete(name); },
|
|
contains(name) { return classes.has(name); }
|
|
}};
|
|
elements.set(id, item); return item;
|
|
}
|
|
let current = {state:'ready', revision:1, sequence:1, mode:'lit', renderer:'transport-test'};
|
|
let failure = 'publish';
|
|
const api = {
|
|
start() { return JSON.stringify({status:current}); },
|
|
publish(sequence, revision) {
|
|
if (failure === 'publish') return JSON.stringify({error:'Prepared pixels exceed the resource budget'});
|
|
current = {...current, revision, sequence};
|
|
return JSON.stringify({status:current});
|
|
},
|
|
configure() {
|
|
if (failure === 'configure') return JSON.stringify({error:'Invalid preview parameters'});
|
|
return JSON.stringify({status:current});
|
|
},
|
|
status() { return JSON.stringify({status:current}); }, close() {}
|
|
};
|
|
const context = {
|
|
document:{getElementById:element, documentElement:{lang:'en'}, body:element('body')},
|
|
requestAnimationFrame(fn) { raf.push(fn); }, setInterval(fn) { intervals.push(fn); },
|
|
fetch:async () => ({ok:true, clone() { return this; }, arrayBuffer:async () => new ArrayBuffer(0)}),
|
|
WebAssembly:{instantiateStreaming:async () => ({instance:{}})},
|
|
Go:class { constructor() { this.importObject = {}; } run() { return Promise.resolve(); } },
|
|
Uint8Array, JSON, Number, Promise
|
|
};
|
|
context.window = {aegoArtPreview:api, addEventListener() {}};
|
|
vm.createContext(context);
|
|
vm.runInContext(fs.readFileSync(path.join(__dirname, '../../web/gpu-preview.js'), 'utf8'), context);
|
|
return {
|
|
async update(revision = 2) {
|
|
context.window.AegoGPUPreview.update({documentKey:'doc', revision, frame:'frame', gesture:false,
|
|
api:{snapshotBytes() { return {handle:'doc', revision, bytes:new Uint8Array(1)}; }}});
|
|
await raf.shift()();
|
|
},
|
|
poll() { intervals[0](); },
|
|
failAt(value) { failure = value; },
|
|
get message() { return element('gpu-status').textContent; },
|
|
get failed() { return element('gpu-preview').classList.contains('gpu-failed'); }
|
|
};
|
|
}
|
|
|
|
test('a rejected snapshot remains an error while the renderer reports its old ready frame', async () => {
|
|
const f = fixture();
|
|
await f.update();
|
|
assert.equal(f.failed, true);
|
|
assert.match(f.message, /resource budget/);
|
|
for (let i = 0; i < 5; i++) f.poll();
|
|
assert.equal(f.failed, true);
|
|
assert.match(f.message, /resource budget/);
|
|
f.failAt(''); await f.update();
|
|
assert.equal(f.failed, false);
|
|
assert.match(f.message, /Ready/);
|
|
});
|
|
|
|
test('a configuration failure clears only after successful reconfiguration', async () => {
|
|
const f = fixture(); f.failAt('configure');
|
|
await f.update(); f.poll();
|
|
assert.equal(f.failed, true);
|
|
assert.match(f.message, /parameters/);
|
|
f.failAt(''); await f.update(); f.poll();
|
|
assert.equal(f.failed, false);
|
|
assert.match(f.message, /Ready/);
|
|
});
|