logiguard fork v3: full patch set on verified 8c74db0 tree
Includes prior-session patches (carry forward so the app compiles): - crates/gpui/build.rs: cross-compile manifest fix - crates/gpui/src/platform.rs: PlatformWindow::activate_with_token trait method - crates/gpui/src/window.rs: Window::activate_with_token public API - crates/gpui_linux/src/linux/wayland/window.rs: WaylandWindow::activate_with_token + activate() keyboard-serial fix Plus the focus-serial fix: - serial.rs: SerialKind::KeyboardEnter - client.rs: store wl_keyboard.enter serial; latest_serial_of() Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
70
script/randomized-test-ci
Executable file
70
script/randomized-test-ci
Executable file
@@ -0,0 +1,70 @@
|
||||
#!/usr/bin/env node --redirect-warnings=/dev/null
|
||||
|
||||
const fs = require("fs");
|
||||
const { randomBytes } = require("crypto");
|
||||
const { execFileSync } = require("child_process");
|
||||
const {
|
||||
minimizeTestPlan,
|
||||
buildTests,
|
||||
runTests,
|
||||
} = require("./randomized-test-minimize");
|
||||
|
||||
const { ZED_SERVER_URL } = process.env;
|
||||
if (!ZED_SERVER_URL) throw new Error("Missing env var `ZED_SERVER_URL`");
|
||||
|
||||
main();
|
||||
|
||||
async function main() {
|
||||
buildTests();
|
||||
|
||||
const seed = randomU64();
|
||||
const commit = execFileSync("git", ["rev-parse", "HEAD"], {
|
||||
encoding: "utf8",
|
||||
}).trim();
|
||||
|
||||
console.log("commit:", commit);
|
||||
console.log("starting seed:", seed);
|
||||
|
||||
const planPath = "target/test-plan.json";
|
||||
const minPlanPath = "target/test-plan.min.json";
|
||||
const failingSeed = runTests({
|
||||
SEED: seed,
|
||||
SAVE_PLAN: planPath,
|
||||
ITERATIONS: 50000,
|
||||
OPERATIONS: 200,
|
||||
});
|
||||
|
||||
if (!failingSeed) {
|
||||
console.log("tests passed");
|
||||
return;
|
||||
}
|
||||
|
||||
console.log("found failure at seed", failingSeed);
|
||||
const minimizedSeed = minimizeTestPlan(planPath, minPlanPath);
|
||||
const minimizedPlan = fs.readFileSync(minPlanPath, "utf8");
|
||||
|
||||
console.log("minimized plan:\n", minimizedPlan);
|
||||
|
||||
const url = `${ZED_SERVER_URL}/api/randomized_test_failure`;
|
||||
const body = {
|
||||
seed: minimizedSeed,
|
||||
plan: JSON.parse(minimizedPlan),
|
||||
commit: commit,
|
||||
};
|
||||
await fetch(url, {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify(body),
|
||||
});
|
||||
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
function randomU64() {
|
||||
const bytes = randomBytes(8);
|
||||
const hexString = bytes.reduce(
|
||||
(string, byte) => string + byte.toString(16),
|
||||
"",
|
||||
);
|
||||
return BigInt("0x" + hexString).toString(10);
|
||||
}
|
||||
Reference in New Issue
Block a user