Skip to content

Commit 3f9e037

Browse files
authored
Re-enable integration tests (TraceMachina#1915)
1 parent 6180146 commit 3f9e037

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

deployment-examples/docker-compose/docker-compose.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
version: '3.4'
16-
1715
services:
1816
nativelink_local_cas:
1917
image: trace_machina/nativelink:latest
@@ -52,6 +50,8 @@ services:
5250
ports: [ "50052:50052/tcp" ]
5351
command: |
5452
nativelink /root/scheduler.json5
53+
depends_on:
54+
- nativelink_local_cas
5555

5656
nativelink_executor:
5757
image: trace_machina/nativelink:latest
@@ -72,3 +72,6 @@ services:
7272
SCHEDULER_ENDPOINT: nativelink_scheduler
7373
command: |
7474
nativelink /root/worker.json5
75+
depends_on:
76+
- nativelink_local_cas
77+
- nativelink_scheduler

run_integration_tests.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Usage:
4040
run_integration_tests.sh [TEST_PATTERNS...]
4141
4242
TEST_PATTERNS: Name of test you wish to execute. Wildcard (*) supported.
43-
Default: '*'
43+
Default: '*.sh'
4444
EOT
4545
;;
4646
-*)
@@ -60,7 +60,7 @@ if ! docker --version; then
6060
fi
6161

6262
if [[ ${#TEST_PATTERNS[@]} -eq 0 ]]; then
63-
TEST_PATTERNS=("*")
63+
TEST_PATTERNS=("*.sh")
6464
fi
6565

6666
SELF_DIR=$(realpath "$(dirname "$0")")
@@ -96,7 +96,7 @@ export NATIVELINK_DIR="$CACHE_DIR/nativelink"
9696
mkdir -p "$NATIVELINK_DIR"
9797

9898
for pattern in "${TEST_PATTERNS[@]}"; do
99-
find "$SELF_DIR/integration_tests/" -name "$pattern" -type f -print0 | grep -v buildstream | while IFS= read -r -d $'\0' fullpath; do
99+
find "$SELF_DIR/integration_tests/" -name "$pattern" -type f -print0 | while IFS= read -r -d $'\0' fullpath; do
100100
# Cleanup.
101101
echo "Cleaning up cache directories NATIVELINK_DIR: $NATIVELINK_DIR"
102102
echo "Checking for existence of the NATIVELINK_DIR"
@@ -109,11 +109,13 @@ for pattern in "${TEST_PATTERNS[@]}"; do
109109
bazel --output_base="$BAZEL_CACHE_DIR" clean
110110
FILENAME=$(basename "$fullpath")
111111
echo "Running test $FILENAME"
112-
sudo docker compose up -d
112+
sudo env RUST_LOG=info docker compose up -d
113113
if perl -e 'alarm shift; exec @ARGV' 30 bash -c 'until sudo docker compose logs | grep -q "Ready, listening on"; do sleep 1; done'; then
114114
echo "String 'Ready, listening on' found in the logs."
115115
else
116116
echo "String 'Ready, listening on' not found in the logs within the given time."
117+
sudo docker compose logs
118+
exit 1
117119
fi
118120
set +e
119121
bash -euo pipefail "$fullpath"

0 commit comments

Comments
 (0)