Skip to content

Commit

Permalink
Merge #66538
Browse files Browse the repository at this point in the history
66538: build: don't swallow exit status in teamcity-weekly-roachtest.sh r=stevendanna a=tbg

The assignment to exit_status would always assign 0:

```
$ if [ false ]; then echo $?; fi
0
```

Now we do this:

```
$ false || echo $?
1
```

(This also works under `set -e`, as in that script).

Release note: None


Co-authored-by: Tobias Grieger <[email protected]>
  • Loading branch information
craig[bot] and tbg committed Jun 16, 2021
2 parents 8308b93 + bb4ac95 commit 14bd70c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions build/teamcity-weekly-roachtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ chmod o+rwx "${artifacts}"
# by default. This reserves us-east1-b (the roachprod default zone) for use
# by manually created clusters.
exit_status=0
if ! timeout -s INT $((7800*60)) bin/roachtest run \
timeout -s INT $((7800*60)) bin/roachtest run \
tag:weekly \
--build-tag "${build_tag}" \
--cluster-id "${TC_BUILD_ID}" \
Expand All @@ -55,9 +55,7 @@ if ! timeout -s INT $((7800*60)) bin/roachtest run \
--artifacts "$artifacts" \
--parallelism 5 \
--encrypt=random \
--teamcity; then
exit_status=$?
fi
--teamcity || exit_status=$?

# Upload any stats.json files to the cockroach-nightly bucket.
for file in $(find ${artifacts#${PWD}/} -name stats.json); do
Expand Down

0 comments on commit 14bd70c

Please sign in to comment.