adding multithreaded CTS run
This commit is contained in:
18
.github/workflows/Test.yml
vendored
18
.github/workflows/Test.yml
vendored
@@ -36,3 +36,21 @@ jobs:
|
|||||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
command: pages deploy cts_report --project-name=vulkan-driver-cts-report
|
command: pages deploy cts_report --project-name=vulkan-driver-cts-report
|
||||||
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
|
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Install Rust
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
targets: x86_64-unknown-linux-gnu,wasm32-unknown-unknown
|
||||||
|
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
cache-all-crates: "true"
|
||||||
|
cache-on-failure: "false"
|
||||||
|
|
||||||
|
- name: Install deqp-runner
|
||||||
|
run: cargo install deqp-runner
|
||||||
|
|
||||||
|
- name: Run multithreaded master Vulkan CTS
|
||||||
|
if: ${{ !cancelled() && steps.install.conclusion == 'success' }}
|
||||||
|
run: zig build test-conformance-multithreaded-soft
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,6 +1,7 @@
|
|||||||
.cache/
|
.cache/
|
||||||
.zig-cache/
|
.zig-cache/
|
||||||
zig-out/
|
zig-out/
|
||||||
|
cts/
|
||||||
cts_report/
|
cts_report/
|
||||||
scripts/__pycache__/
|
scripts/__pycache__/
|
||||||
*.o
|
*.o
|
||||||
|
|||||||
37
build.zig
37
build.zig
@@ -105,6 +105,8 @@ pub fn build(b: *std.Build) !void {
|
|||||||
|
|
||||||
(try addCTS(b, target, &impl, lib, false)).dependOn(&lib_install.step);
|
(try addCTS(b, target, &impl, lib, false)).dependOn(&lib_install.step);
|
||||||
(try addCTS(b, target, &impl, lib, true)).dependOn(&lib_install.step);
|
(try addCTS(b, target, &impl, lib, true)).dependOn(&lib_install.step);
|
||||||
|
|
||||||
|
(try addMultithreadedCTS(b, target, &impl, lib)).dependOn(&lib_install.step);
|
||||||
}
|
}
|
||||||
|
|
||||||
const autodoc_test = b.addObject(.{
|
const autodoc_test = b.addObject(.{
|
||||||
@@ -172,7 +174,7 @@ fn addCTestRunner(b: *std.Build, impl: *const ImplementationDesc, exe: *std.Buil
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn addCTS(b: *std.Build, target: std.Build.ResolvedTarget, impl: *const ImplementationDesc, impl_lib: *std.Build.Step.Compile, comptime gdb: bool) !*std.Build.Step {
|
fn addCTS(b: *std.Build, target: std.Build.ResolvedTarget, impl: *const ImplementationDesc, impl_lib: *std.Build.Step.Compile, comptime gdb: bool) !*std.Build.Step {
|
||||||
const cts = b.dependency("cts_bin", .{});
|
const cts = b.lazyDependency("cts_bin", .{}) orelse return error.CouldNotFetchCTS;
|
||||||
|
|
||||||
const cts_exe_name = cts.path(b.fmt("deqp-vk-{s}", .{
|
const cts_exe_name = cts.path(b.fmt("deqp-vk-{s}", .{
|
||||||
switch (if (target.query.os_tag) |tag| tag else builtin.target.os.tag) {
|
switch (if (target.query.os_tag) |tag| tag else builtin.target.os.tag) {
|
||||||
@@ -231,3 +233,36 @@ fn addCTS(b: *std.Build, target: std.Build.ResolvedTarget, impl: *const Implemen
|
|||||||
|
|
||||||
return &run.step;
|
return &run.step;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn addMultithreadedCTS(b: *std.Build, target: std.Build.ResolvedTarget, impl: *const ImplementationDesc, impl_lib: *std.Build.Step.Compile) !*std.Build.Step {
|
||||||
|
const cts = b.lazyDependency("cts_bin", .{}) orelse return error.CouldNotFetchCTS;
|
||||||
|
|
||||||
|
const cts_exe_name = cts.path(b.fmt("deqp-vk-{s}", .{
|
||||||
|
switch (if (target.query.os_tag) |tag| tag else builtin.target.os.tag) {
|
||||||
|
.linux => "linux.x86_64",
|
||||||
|
else => unreachable,
|
||||||
|
},
|
||||||
|
}));
|
||||||
|
|
||||||
|
const mustpass_path = try cts.path("mustpass/master/vk-default.txt").getPath3(b, null).toString(b.allocator);
|
||||||
|
const cts_exe_path = try cts_exe_name.getPath3(b, null).toString(b.allocator);
|
||||||
|
|
||||||
|
const run = b.addSystemCommand(&[_][]const u8{"deqp-runner"});
|
||||||
|
run.step.dependOn(&impl_lib.step);
|
||||||
|
|
||||||
|
run.addArg("run");
|
||||||
|
run.addArg("--deqp");
|
||||||
|
run.addArg(cts_exe_path);
|
||||||
|
run.addArg("--caselist");
|
||||||
|
run.addArg(mustpass_path);
|
||||||
|
run.addArg("--output");
|
||||||
|
run.addArg("./cts");
|
||||||
|
run.addArg("--");
|
||||||
|
run.addArg(b.fmt("--deqp-archive-dir={s}", .{try cts.path("").getPath3(b, null).toString(b.allocator)}));
|
||||||
|
run.addArg(b.fmt("--deqp-vk-library-path={s}", .{b.getInstallPath(.lib, impl_lib.out_lib_filename)}));
|
||||||
|
|
||||||
|
const run_step = b.step(b.fmt("test-conformance-multithreaded-{s}", .{impl.name}), b.fmt("Run Vulkan conformance tests in a multithreaded environment for libvulkan_{s}", .{impl.name}));
|
||||||
|
run_step.dependOn(&run.step);
|
||||||
|
|
||||||
|
return &run.step;
|
||||||
|
}
|
||||||
|
|||||||
@@ -26,8 +26,9 @@
|
|||||||
.hash = "zdt-0.8.1-xr0_vAxUDwCJRDh9pcAS_mdZBIsvcGTtN-K8JJSWY4I6",
|
.hash = "zdt-0.8.1-xr0_vAxUDwCJRDh9pcAS_mdZBIsvcGTtN-K8JJSWY4I6",
|
||||||
},
|
},
|
||||||
.cts_bin = .{
|
.cts_bin = .{
|
||||||
.url = "git+https://github.com/Kbz-8/Vulkan-CTS-bin#964760c8348ca61c1c63d951821d94016ed0c99a",
|
.url = "git+https://github.com/Kbz-8/Vulkan-CTS-bin#606ee47675ac1ba7a260983f020d6460efe05d2c",
|
||||||
.hash = "N-V-__8AAIz9twSI7YE7QOGYizFRF14Kp9K-JLkYAsr3aH24",
|
.hash = "N-V-__8AAHqjQhpVdUurt2jQc9gRHwT3_pugIvimGEu8iyrQ",
|
||||||
|
.lazy = true,
|
||||||
},
|
},
|
||||||
.cpuinfo = .{
|
.cpuinfo = .{
|
||||||
.url = "git+https://github.com/Kbz-8/cpuinfo#4883954cfcec3f6c9ca9c4aaddfc26107e08726f",
|
.url = "git+https://github.com/Kbz-8/cpuinfo#4883954cfcec3f6c9ca9c4aaddfc26107e08726f",
|
||||||
|
|||||||
Reference in New Issue
Block a user