Enable ASAN with linux-x64-asan in CI

This commit is contained in:
Jarred Sumner
2025-05-02 10:44:09 -07:00
committed by GitHub
parent 32c1dcb70d
commit d8a69d6823
32 changed files with 615 additions and 144 deletions

View File

@@ -31,6 +31,7 @@ export const isVerbose = process.env.DEBUG === "1";
// test.todoIf(isFlaky && isMacOS)("this test is flaky");
export const isFlaky = isCI;
export const isBroken = isCI;
export const isASAN = basename(process.execPath).includes("bun-asan");
export const bunEnv: NodeJS.ProcessEnv = {
...process.env,
@@ -49,6 +50,10 @@ export const bunEnv: NodeJS.ProcessEnv = {
const ciEnv = { ...bunEnv };
if (isASAN) {
bunEnv.ASAN_OPTIONS ??= "allow_user_segv_handler=1";
}
if (isWindows) {
bunEnv.SHELLOPTS = "igncr"; // Ignore carriage return
}
@@ -875,6 +880,7 @@ export function osSlashes(path: string) {
}
import * as child_process from "node:child_process";
import { basename } from "node:path";
class WriteBlockedError extends Error {
constructor(time) {