Skip to content

Commit

Permalink
tools/test [nfc]: Write down a big gotcha.
Browse files Browse the repository at this point in the history
As Greg explains; see
  zulip#4700 (comment).
  • Loading branch information
chrisbobbe committed Apr 28, 2021
1 parent 4299827 commit ee01be9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tools/test
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
#!/usr/bin/env bash

# Careful! This doesn't do everything you'd think it does. In fact, we
# don't get its benefit in any of the `run_foo` functions. That's
# because our logic to catch a failing suite, add it to a list, and
# continue to the other suites, puts a bunch of commands in a list
# before a `||`. That puts them in a special case, as the Bash manual
# says:
#
# """
# The shell does not exit if the command that fails is [...] part of
# any command executed in a `&&` or `||` list except the command
# following the final `&&` or `||` [...].
# """
#
# For now our workaround is to put `|| return` in the `run_foo` just
# after each nontrivial command that isn't the final command in the
# function.
set -e

## CLI PARSING
Expand Down

0 comments on commit ee01be9

Please sign in to comment.