Skip to content

Commit aa77957

Browse files
authored
Also test docker exec test without bzlmod (#297)
1 parent 6d25c38 commit aa77957

File tree

4 files changed

+19
-15
lines changed

4 files changed

+19
-15
lines changed

tests/WORKSPACE

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,20 @@ llvm_toolchain(
122122
},
123123
)
124124

125-
http_archive(
126-
name = "bazel_skylib",
127-
sha256 = "cd55a062e763b9349921f0f5db8c3933288dc8ba4f76dd9416aac68acee3cb94",
128-
urls = [
129-
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.5.0/bazel-skylib-1.5.0.tar.gz",
130-
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.5.0/bazel-skylib-1.5.0.tar.gz",
131-
],
132-
)
133-
134-
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
135-
136-
bazel_skylib_workspace()
125+
llvm_toolchain(
126+
name = "llvm_toolchain_linux_exec",
127+
exec_arch = "amd64",
128+
# Option 2:
129+
# distribution = "clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz",
130+
exec_os = "linux",
131+
llvm_version = "17.0.6",
132+
# Option 1:
133+
sha256 = {"": "884ee67d647d77e58740c1e645649e29ae9e8a6fe87c1376be0f3a30f3cc9ab3"},
134+
strip_prefix = {"": "clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04"},
135+
urls = {"": ["https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz"]},
136+
)
137+
138+
## Test dependencies.
137139

138140
# Well known repos; present here only for testing.
139141

tests/scripts/run_docker_exec_test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ source "${scripts_dir}/bazel.sh"
3434
cd "${scripts_dir}"
3535

3636
base_image="debian:stable-slim"
37-
binpath="$("${bazel}" info bazel-bin)/stdlib_test"
37+
binpath="$("${bazel}" info "${common_args[@]}" bazel-bin)/stdlib_test"
3838

3939
docker build --platform=linux/amd64 --pull --tag=bazel-docker-sandbox - <<-EOF
4040
FROM ${base_image}
@@ -44,6 +44,7 @@ docker build --platform=linux/amd64 --pull --tag=bazel-docker-sandbox - <<-EOF
4444
EOF
4545

4646
build_args=(
47+
"${common_args[@]}"
4748
# Platforms
4849
"--platforms=@toolchains_llvm//platforms:linux-x86_64"
4950
"--extra_execution_platforms=@toolchains_llvm//platforms:linux-x86_64"

tests/scripts/run_xcompile_tests.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ source "${scripts_dir}/bazel.sh"
2121

2222
cd "${scripts_dir}"
2323

24-
binpath="$("${bazel}" info bazel-bin)/stdlib_test"
24+
binpath="$("${bazel}" info "${common_args[@]}" bazel-bin)/stdlib_test"
2525

2626
check_with_image() {
2727
if "${CI:-false}"; then
@@ -36,6 +36,7 @@ check_with_image() {
3636
echo ""
3737
echo "Testing static linked user libraries and dynamic linked system libraries"
3838
build_args=(
39+
"${common_args[@]}"
3940
--platforms=@toolchains_llvm//platforms:linux-x86_64
4041
--extra_toolchains=@llvm_toolchain_with_sysroot//:cc-toolchain-x86_64-linux
4142
--symlink_prefix=/

toolchain/internal/release_name.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def _linux(llvm_version, distname, version, arch):
137137
major_llvm_version = _major_llvm_version(llvm_version)
138138

139139
# NOTE: Many of these systems are untested because I do not have access to them.
140-
# If you find this mapping wrong, please send a Pull Request on Github.
140+
# If you find this mapping wrong, please send a Pull Request on GitHub.
141141
os_name = None
142142
if arch in ["aarch64", "armv7a", "mips", "mipsel"]:
143143
os_name = "linux-gnu"

0 commit comments

Comments
 (0)