-
Notifications
You must be signed in to change notification settings - Fork 519
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
47db632
commit cb4693d
Showing
5 changed files
with
51 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,68 @@ | ||
# Dummy test target that imports various targets from the | ||
# "@nodejs" repository. If a target of the repository is | ||
# misconfigured, Bazel will complain about missing input files. | ||
sh_test( | ||
name = "test_default", | ||
srcs = ["test.sh"], | ||
data = [ | ||
"@nodejs//:node", | ||
"@nodejs//:node_bin", | ||
"@nodejs//:node_files", | ||
"@nodejs//:npm", | ||
"@nodejs//:npm_bin", | ||
"@nodejs//:npm_files", | ||
], | ||
) | ||
|
||
# Additional targets to test the use of parallel node toolchains | ||
[ | ||
sh_test( | ||
name = "test_" + id, | ||
name = "test_%s" % node_toolchain, | ||
srcs = ["test.sh"], | ||
data = [ | ||
"@%s_host//:node" % id, | ||
"@%s_host//:node_bin" % id, | ||
"@%s_host//:node_files" % id, | ||
"@%s_host//:npm" % id, | ||
"@%s_host//:npm_bin" % id, | ||
"@%s_host//:npm_files" % id, | ||
"@%s_host//:npx_bin" % id, | ||
"@%s//:node" % node_toolchain, | ||
"@%s//:node_bin" % node_toolchain, | ||
"@%s//:node_files" % node_toolchain, | ||
"@%s//:npm" % node_toolchain, | ||
"@%s//:npm_bin" % node_toolchain, | ||
"@%s//:npm_files" % node_toolchain, | ||
"@%s//:npx" % node_toolchain, | ||
"@%s//:npx_bin" % node_toolchain, | ||
], | ||
) | ||
for id in [ | ||
for node_toolchain in [ | ||
"nodejs", | ||
"node16", | ||
"node16_nvmrc", | ||
] | ||
] | ||
|
||
[ | ||
sh_test( | ||
name = "test_node_version_%s_%s" % (bin, id), | ||
name = "test_%s_node_version_%s" % (node_toolchain, tool), | ||
srcs = ["version_test.sh"], | ||
args = select({ | ||
"@bazel_tools//src/conditions:linux_x86_64": [ | ||
"%s_linux_amd64/bin" % id, | ||
bin, | ||
"%s_linux_amd64/bin" % node_toolchain, | ||
tool, | ||
], | ||
"@bazel_tools//src/conditions:darwin": [ | ||
"%s_darwin_arm64/bin" % id, | ||
bin, | ||
"%s_darwin_arm64/bin" % node_toolchain, | ||
tool, | ||
], | ||
"@bazel_tools//src/conditions:windows": [ | ||
"%s_windows_amd64/bin" % id, | ||
bin, | ||
"%s_windows_amd64/bin" % node_toolchain, | ||
tool, | ||
".cmd", | ||
], | ||
}), | ||
data = [ | ||
"@%s_host//:%s" % (id, bin), | ||
"@%s_host//:node" % id, | ||
"@%s//:%s" % (node_toolchain, tool), | ||
"@%s//:node" % node_toolchain, | ||
"@bazel_tools//tools/bash/runfiles", | ||
], | ||
tags = tags, | ||
) | ||
for (id, bin) in [ | ||
("node16", "npm"), | ||
("node16", "npx"), | ||
("node16_nvmrc", "npm"), | ||
("node16_nvmrc", "npx"), | ||
for (node_toolchain, tool, tags) in [ | ||
( | ||
"nodejs", | ||
"npm", | ||
["skip-on-bazelci-ubuntu"], # fails on Bazel CI Ubuntu on latest Node.js due to GLIBC version on runner: "GLIBC_2.28 not found" (https://buildkite.com/bazel/rules-nodejs-nodejs/builds/13451#018feffd-4878-46e4-8582-ae94648a2d74) | ||
), | ||
( | ||
"nodejs", | ||
"npx", | ||
["skip-on-bazelci-ubuntu"], # fails on Bazel CI Ubuntu on latest Node.js due to GLIBC version on runner: "GLIBC_2.28 not found" (https://buildkite.com/bazel/rules-nodejs-nodejs/builds/13451#018feffd-4878-46e4-8582-ae94648a2d74) | ||
), | ||
("node16", "npm", []), | ||
("node16", "npx", []), | ||
("node16_nvmrc", "npm", []), | ||
("node16_nvmrc", "npx", []), | ||
] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters