Fix tests on remote
This commit is contained in:
parent
502544f1f1
commit
494d9e7bfb
5 changed files with 30 additions and 7 deletions
|
|
@ -42,7 +42,7 @@ oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")
|
||||||
oci.pull(
|
oci.pull(
|
||||||
name = "debian",
|
name = "debian",
|
||||||
image = "docker.io/library/python",
|
image = "docker.io/library/python",
|
||||||
platforms = ["linux/arm64/v8"],
|
platforms = ["linux/arm64/v8", "linux/amd64"],
|
||||||
# 'latest' is not reproducible, but it's convenient.
|
# 'latest' is not reproducible, but it's convenient.
|
||||||
# During the build we print a WARNING message that includes recommended 'digest' and 'platforms'
|
# During the build we print a WARNING message that includes recommended 'digest' and 'platforms'
|
||||||
# values which you can use here in place of 'tag' to pin for reproducibility.
|
# values which you can use here in place of 'tag' to pin for reproducibility.
|
||||||
|
|
|
||||||
|
|
@ -409,7 +409,7 @@
|
||||||
"@@rules_oci+//oci:extensions.bzl%oci": {
|
"@@rules_oci+//oci:extensions.bzl%oci": {
|
||||||
"general": {
|
"general": {
|
||||||
"bzlTransitiveDigest": "8fB61KHYOU4XHH65DqVw59ZIDGO29I2WIbVHxii4slA=",
|
"bzlTransitiveDigest": "8fB61KHYOU4XHH65DqVw59ZIDGO29I2WIbVHxii4slA=",
|
||||||
"usagesDigest": "Tv86j1zFNsYhAktbkhrrqXqeKOuY5MkeuoLawY/PY/w=",
|
"usagesDigest": "ODhFrEQ2CPXo09/Bj4hN8YP6s+1rYpgY/ecJv8DR1+8=",
|
||||||
"recordedFileInputs": {},
|
"recordedFileInputs": {},
|
||||||
"recordedDirentsInputs": {},
|
"recordedDirentsInputs": {},
|
||||||
"envVariables": {},
|
"envVariables": {},
|
||||||
|
|
@ -427,6 +427,19 @@
|
||||||
"bazel_tags": []
|
"bazel_tags": []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"debian_linux_amd64": {
|
||||||
|
"repoRuleId": "@@rules_oci+//oci/private:pull.bzl%oci_pull",
|
||||||
|
"attributes": {
|
||||||
|
"www_authenticate_challenges": {},
|
||||||
|
"scheme": "https",
|
||||||
|
"registry": "index.docker.io",
|
||||||
|
"repository": "library/python",
|
||||||
|
"identifier": "3.12-bookworm",
|
||||||
|
"platform": "linux/amd64",
|
||||||
|
"target_name": "debian_linux_amd64",
|
||||||
|
"bazel_tags": []
|
||||||
|
}
|
||||||
|
},
|
||||||
"debian": {
|
"debian": {
|
||||||
"repoRuleId": "@@rules_oci+//oci/private:pull.bzl%oci_alias",
|
"repoRuleId": "@@rules_oci+//oci/private:pull.bzl%oci_alias",
|
||||||
"attributes": {
|
"attributes": {
|
||||||
|
|
@ -437,7 +450,8 @@
|
||||||
"repository": "library/python",
|
"repository": "library/python",
|
||||||
"identifier": "3.12-bookworm",
|
"identifier": "3.12-bookworm",
|
||||||
"platforms": {
|
"platforms": {
|
||||||
"@@platforms//cpu:arm64": "@debian_linux_arm64_v8"
|
"@@platforms//cpu:arm64": "@debian_linux_arm64_v8",
|
||||||
|
"@@platforms//cpu:x86_64": "@debian_linux_amd64"
|
||||||
},
|
},
|
||||||
"bzlmod_repository": "debian",
|
"bzlmod_repository": "debian",
|
||||||
"reproducible": true
|
"reproducible": true
|
||||||
|
|
@ -560,7 +574,8 @@
|
||||||
"moduleExtensionMetadata": {
|
"moduleExtensionMetadata": {
|
||||||
"explicitRootModuleDirectDeps": [
|
"explicitRootModuleDirectDeps": [
|
||||||
"debian",
|
"debian",
|
||||||
"debian_linux_arm64_v8"
|
"debian_linux_arm64_v8",
|
||||||
|
"debian_linux_amd64"
|
||||||
],
|
],
|
||||||
"explicitRootModuleDirectDevDeps": [],
|
"explicitRootModuleDirectDevDeps": [],
|
||||||
"useAllRepos": "NO",
|
"useAllRepos": "NO",
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,19 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
rm -rf /tmp/databuild_test/examples/basic_graph
|
||||||
|
mkdir -p /tmp/databuild_test/examples/basic_graph/generated_number
|
||||||
|
mkdir -p /tmp/databuild_test/examples/basic_graph/sum
|
||||||
|
|
||||||
# Test configure
|
# Test configure
|
||||||
sum_job.cfg pippin_salem_sadie
|
sum_job.cfg /tmp/databuild_test/examples/basic_graph/sum/pippin_salem_sadie
|
||||||
|
|
||||||
# Test run
|
# Test run
|
||||||
echo -n 83 > /tmp/databuild_test/examples/basic_graph/generated_number/pippin
|
echo -n 83 > /tmp/databuild_test/examples/basic_graph/generated_number/pippin
|
||||||
echo -n 34 > /tmp/databuild_test/examples/basic_graph/generated_number/salem
|
echo -n 34 > /tmp/databuild_test/examples/basic_graph/generated_number/salem
|
||||||
echo -n 19 > /tmp/databuild_test/examples/basic_graph/generated_number/sadie
|
echo -n 19 > /tmp/databuild_test/examples/basic_graph/generated_number/sadie
|
||||||
|
|
||||||
sum_job.cfg pippin_salem_sadie | jq -c ".[0]" | sum_job.exec
|
sum_job.cfg /tmp/databuild_test/examples/basic_graph/sum/pippin_salem_sadie | jq -c ".[0]" | sum_job.exec
|
||||||
|
|
||||||
# Validate that contents of output is 136
|
# Validate that contents of output is 136
|
||||||
if [[ "$(cat /tmp/databuild_test/examples/basic_graph/sum/pippin_salem_sadie)" != "136" ]]; then
|
if [[ "$(cat /tmp/databuild_test/examples/basic_graph/sum/pippin_salem_sadie)" != "136" ]]; then
|
||||||
|
|
@ -17,3 +21,4 @@ if [[ "$(cat /tmp/databuild_test/examples/basic_graph/sum/pippin_salem_sadie)" !
|
||||||
cat /tmp/databuild_test/examples/basic_graph/sum/pippin_salem_sadie
|
cat /tmp/databuild_test/examples/basic_graph/sum/pippin_salem_sadie
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
4
scripts/bb_remote_test_all
Executable file
4
scripts/bb_remote_test_all
Executable file
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
eval $(bb_tmp)
|
||||||
|
ssh $BUILD_HOST "cd $REMOTE_BUILD_PATH; . ~/.bash_profile; bash scripts/bb_test_all"
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
ROOT_DIR=$(pwd)
|
ROOT_DIR=$(pwd)
|
||||||
eval $(bb_tmp)
|
|
||||||
bazel test //...
|
bazel test //...
|
||||||
ANY_FAILED=0
|
ANY_FAILED=0
|
||||||
for EXAMPLE in $(ls examples); do
|
for EXAMPLE in $(ls examples); do
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue