Skip to content

Commit 3a21390

Browse files
committed
suite: workaround for toml patching issue
1 parent 40fbd90 commit 3a21390

3 files changed

Lines changed: 10 additions & 14 deletions

File tree

harness-suite/projects-rust/wgpu/huh.patch

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,6 @@ index 32461ed..677d560 100644
2727
"naga/hlsl-snapshots",
2828
"player",
2929
"tests",
30-
diff --git a/naga/Cargo.toml b/naga/Cargo.toml
31-
index 4458405..0a28e01 100644
32-
--- a/naga/Cargo.toml
33-
+++ b/naga/Cargo.toml
34-
@@ -74,7 +74,7 @@ hlsl-out-if-target-windows = []
35-
compact = []
36-
37-
[dependencies]
38-
-arbitrary = { version = "1.4", features = ["derive"], optional = true }
39-
+arbitrary = { git = "https://github.com/rust-fuzz/arbitrary.git", rev = "ef80790c5bbcd24f342967e2388aa14f2c0d4a6b", features = ["derive"], optional = true }
40-
arrayvec.workspace = true
41-
bitflags.workspace = true
42-
bit-set.workspace = true
4330
diff --git a/naga/fuzz/Cargo.toml b/naga/fuzz/Cargo.toml
4431
index 5d8647f..e44f3e4 100644
4532
--- a/naga/fuzz/Cargo.toml

harness-suite/scripts/build-rust-harness.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,13 @@ def replace_dep(name, dep, add_if_missing=False):
7474
if name not in deps and not add_if_missing:
7575
return
7676
was_optional = name in deps and not isinstance(deps[name], str) and deps[name].get("optional", None)
77-
deps.update({name: make_inline(dep)})
77+
if name in deps and not isinstance(deps[name], str):
78+
deps[name].update(dep)
79+
for k in list(deps[name].keys()):
80+
if k not in dep:
81+
del deps[name][k]
82+
else:
83+
deps.update({name: make_inline(dep)})
7884
if was_optional is not None:
7985
deps[name]["optional"] = was_optional
8086

harness-suite/suite-run.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
DEFAULT_TIMEOUTS = ["8m", "22m", "1h30m", "2h"]
2020
parser.add_argument('--timeout', default=DEFAULT_TIMEOUTS[:], action='append')
2121
parser.add_argument('--cores-per-harness', default=8)
22+
parser.add_argument('--cores', default=None)
2223
parser.add_argument('--harness-dir', default="./out")
2324
parser.add_argument('--corpus-dir', default="./corpus")
2425

@@ -30,6 +31,8 @@
3031

3132
available_parallelism = math.ceil((os.cpu_count() or 1) * 0.98)
3233
cores_available = available_parallelism
34+
if args.cores:
35+
cores_available = int(args.cores)
3336
cores_cond = asyncio.Condition()
3437
@contextlib.asynccontextmanager
3538
async def cores(n):

0 commit comments

Comments
 (0)