Skip to content

Commit

Permalink
cargo_build_script: Add regression for revert #2925
Browse files Browse the repository at this point in the history
Existing test passes with #2911 and #2922.
However even #2922 was breaking something.
I suspect case like this is the cause.
  • Loading branch information
vitalybuka committed Oct 14, 2024
1 parent 131867d commit f4808a6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/cargo_build_script/cc_args_and_env/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ load(
"isystem_absolute_test",
"isystem_relative_test",
"sysroot_absolute_test",
"sysroot_absolute2_test",
"sysroot_relative_test",
)

sysroot_relative_test(name = "sysroot_relative_test")

sysroot_absolute_test(name = "sysroot_absolute_test")

sysroot_absolute2_test(name = "sysroot_absolute2_test")

isystem_relative_test(name = "isystem_relative_test")

isystem_absolute_test(name = "isystem_absolute_test")
11 changes: 11 additions & 0 deletions test/cargo_build_script/cc_args_and_env/cc_args_and_env_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,17 @@ def sysroot_absolute_test(name):
expected_cflags = ["--sysroot=/test/absolute/sysroot"],
)

def sysroot_absolute2_test(name):
cargo_build_script_with_extra_cc_compile_flags(
name = "%s/cargo_build_script" % name,
extra_cc_compile_flags = ["--sysroot=/test/absolute/sysroot", "test/relative/another"],
)
cc_args_and_env_analysis_test(
name = name,
target_under_test = "%s/cargo_build_script" % name,
expected_cflags = ["--sysroot=/test/absolute/sysroot", "test/relative/another"],
)

def isystem_relative_test(name):
cargo_build_script_with_extra_cc_compile_flags(
name = "%s/cargo_build_script" % name,
Expand Down

0 comments on commit f4808a6

Please sign in to comment.