Skip to content

Commit

Permalink
Set pipefail in setup scripts
Browse files Browse the repository at this point in the history
This was added in places where it's been necessary. Setting it in shared
setup scripts simplifies tests and allows future tests to use pipes
without the need to set pipefail explicitly.
  • Loading branch information
victorlin committed Sep 23, 2024
1 parent 4bc6cfc commit 7bf664b
Show file tree
Hide file tree
Showing 13 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions tests/functional/_setup.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pushd "$TESTDIR" > /dev/null
export AUGUR="${AUGUR:-../../bin/augur}"
set -o pipefail
1 change: 1 addition & 0 deletions tests/functional/ancestral/cram/_setup.sh
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
set -o pipefail
1 change: 1 addition & 0 deletions tests/functional/curate/cram/_setup.sh
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
set -o pipefail
1 change: 0 additions & 1 deletion tests/functional/curate/cram/validate-records.t
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ error when it encounters the record with mismatched fields.
Passing the records through multiple augur curate commands should raise the
same error when it encounters the record with mismatched fields.

$ set -o pipefail
$ cat records.ndjson \
> | ${AUGUR} curate passthru \
> | ${AUGUR} curate passthru \
Expand Down
1 change: 1 addition & 0 deletions tests/functional/export_v2/cram/_setup.sh
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
set -o pipefail
1 change: 1 addition & 0 deletions tests/functional/filter/cram/_setup.sh
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
set -o pipefail
1 change: 1 addition & 0 deletions tests/functional/frequencies/cram/_setup.sh
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
set -o pipefail
1 change: 1 addition & 0 deletions tests/functional/merge/cram/_setup.sh
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
set -o pipefail
1 change: 0 additions & 1 deletion tests/functional/merge/cram/merge.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
SETUP

$ source "$TESTDIR"/_setup.sh
$ set -o pipefail


BASIC USAGE
Expand Down
1 change: 1 addition & 0 deletions tests/functional/refine/cram/_setup.sh
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
set -o pipefail
1 change: 1 addition & 0 deletions tests/functional/titers/cram/_setup.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pushd "$TESTDIR" > /dev/null
export AUGUR="${AUGUR:-../../../../bin/augur}"
set -o pipefail
1 change: 1 addition & 0 deletions tests/functional/translate/cram/_setup.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
export SCRIPTS="$TESTDIR/../../../../scripts"
set -o pipefail
1 change: 1 addition & 0 deletions tests/functional/tree/cram/_setup.sh
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
set -o pipefail

0 comments on commit 7bf664b

Please sign in to comment.