Skip to content

Commit 0110b87

Browse files
update vitest pools for ci
1 parent 9d76db9 commit 0110b87

File tree

4 files changed

+38
-18
lines changed

4 files changed

+38
-18
lines changed

packages/platform/vitest.config.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,17 @@ import { createFridaPool } from "@efffrida/vitest-pool";
55

66
const config: ViteUserConfig = {
77
test: {
8-
pool: createFridaPool({
9-
device: "local",
10-
preSpawn: true,
11-
spawn: ["sleep", "infinity"],
12-
}),
8+
pool:
9+
"CI" in process.env
10+
? createFridaPool({
11+
device: "local",
12+
spawn: ["/usr/bin/sleep", "infinity"],
13+
})
14+
: createFridaPool({
15+
device: "local",
16+
preSpawn: true,
17+
spawn: ["sleep", "infinity"],
18+
}),
1319
},
1420
};
1521

packages/sql/vitest.config.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,17 @@ import { createFridaPool } from "@efffrida/vitest-pool";
55

66
const config: ViteUserConfig = {
77
test: {
8-
pool: createFridaPool({
9-
device: "local",
10-
preSpawn: true,
11-
spawn: ["sleep", "infinity"],
12-
}),
8+
pool:
9+
"CI" in process.env
10+
? createFridaPool({
11+
device: "local",
12+
spawn: ["/usr/bin/sleep", "infinity"],
13+
})
14+
: createFridaPool({
15+
device: "local",
16+
preSpawn: true,
17+
spawn: ["sleep", "infinity"],
18+
}),
1319
},
1420
};
1521

packages/vitest-pool/vitest.config.ts

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,21 @@ const config: ViteUserConfig = {
1111
// sequence: {
1212
// concurrent: true,
1313
// },
14-
pool: createFridaPool({
15-
device: "local",
16-
preSpawn: true,
17-
spawn: ["sleep", "infinity"],
18-
platform: Frida.JsPlatform.Gum,
19-
runtime: Frida.ScriptRuntime.Default,
20-
}),
14+
pool:
15+
"CI" in process.env
16+
? createFridaPool({
17+
device: "local",
18+
spawn: ["/usr/bin/sleep", "infinity"],
19+
platform: Frida.JsPlatform.Gum,
20+
runtime: Frida.ScriptRuntime.Default,
21+
})
22+
: createFridaPool({
23+
device: "local",
24+
preSpawn: true,
25+
spawn: ["sleep", "infinity"],
26+
platform: Frida.JsPlatform.Gum,
27+
runtime: Frida.ScriptRuntime.Default,
28+
}),
2129
},
2230
};
2331

vitest.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ import { defineConfig } from "vitest/config";
22

33
export default defineConfig({
44
test: {
5-
projects: ["packages/frida-tools/vitest.config.ts"],
5+
projects: ["packages/*/vitest.config.ts"],
66
},
77
});

0 commit comments

Comments
 (0)