forge
Explore
Log in

Don't you dare go Hollow

project_note

Clone
★ 0

0 watching0 forksRust3.6 MiBc49f5e7Tahinli1 month ago2 commits

fuzz.ts36 lines, 865 bytesHistoryRawDownload
1import * as path from "https://deno.land/std@0.105.0/path/mod.ts";
2const __dirname = path.dirname(path.fromFileUrl(import.meta.url));
3import { resolve } from "https://deno.land/std@0.198.0/path/mod.ts";
4
5const validTargets = Array.from(
6 Deno.readDirSync(resolve(__dirname, "../fuzz/fuzz_targets")),
7).map((x) => x.name.replace(/.rs$/, ""));
8
9const targets =
10 Deno.args.length === 0
11 ? validTargets
12 : Deno.args.filter((x) => validTargets.includes(x));
13
14const promises = [];
15for (const target of targets) {
16 const cmd = [
17 "cargo",
18 "+nightly",
19 "fuzz",
20 "run",
21 target,
22 "--",
23 "-max_total_time=1",
24 ];
25 console.log("🔨" + cmd.join(" "));
26 promises.push(
27 Deno.run({
28 cmd,
29 stdout: "inherit",
30 stderr: "inherit",
31 cwd: resolve(__dirname, ".."),
32 }).status(),
33 );
34}
35
36await Promise.allSettled(promises);