Skip to content

Commit

Permalink
test: remove platform specific system_tar from test snapshots (#1866)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbedard authored Jul 24, 2024
1 parent 356b211 commit 83195fc
Show file tree
Hide file tree
Showing 4 changed files with 166 additions and 142 deletions.
14 changes: 13 additions & 1 deletion e2e/gyp_no_install_script/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,22 @@ js_test(
entry_point = "test.js",
)

# Strip the system-dependent 'system_tar' attribute from the generated repositories.bzl
genrule(
name = "npm_translate_lock_wksp-repositories",
srcs = ["@npm//:repositories.bzl"],
outs = ["wksp_repos_stripped.bzl"],
cmd = 'sed "s/system_tar = .*,/system_tar = \\"xxx\\",/" "$<" > "$@"',
target_compatible_with = select({
"@aspect_bazel_lib//lib:bzlmod": ["@platforms//:incompatible"],
"//conditions:default": [],
}),
)

write_source_files(
name = "write_npm_translate_lock_wksp",
files = {
"snapshots/wksp/repositories.bzl": "@npm//:repositories.bzl",
"snapshots/wksp/repositories.bzl": ":npm_translate_lock_wksp-repositories",
"snapshots/wksp/segfault-handler_defs.bzl": "@npm__segfault-handler__1.3.0__links//:defs.bzl",
},
target_compatible_with = select({
Expand Down
Loading

0 comments on commit 83195fc

Please sign in to comment.