Skip to content

Commit

Permalink
Fixed test assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum committed Jan 19, 2025
1 parent 2129d34 commit 3df50ad
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -806,21 +806,24 @@ def _impl(ctx):
my_cc_test(
name = "my_test",
exec_compatible_with = [
"//platform:has_fast_cpu",
],
exec_group_compatible_with = {
"cpp_link": ["//platform:has_fast_cpu"],
"test": ["//platform:has_gpu"],
},
)
""");

useConfiguration(
"--platforms=//platform:default_platform", "--extra_execution_platforms=//platform:all");
"--platforms=//platform:default_platform",
"--extra_execution_platforms=//platform:fast_cpu_platform,//platform:gpu_platform");

ConfiguredTarget target = getConfiguredTarget("//test:my_test");

assertThat(getGeneratingAction(target, "test/my_test.o").getExecProperties()).containsExactly();
assertThat(getGeneratingAction(target, "test/my_test").getExecProperties())
assertThat(getGeneratingAction(target, "test/my_test.o").getExecProperties())
.containsExactly("require_fast_cpu", "true");
assertThat(getGeneratingAction(target, "test/my_test").getExecProperties()).containsExactly();
Action testAction =
getActions("//test:my_test").stream()
.filter(action -> action.getMnemonic().equals("TestRunner"))
Expand Down

0 comments on commit 3df50ad

Please sign in to comment.