Skip to content

Commit

Permalink
Merge pull request #1637: Use shared setup script for all Cram tests
Browse files Browse the repository at this point in the history
  • Loading branch information
victorlin authored Sep 24, 2024
2 parents d10c3fb + 4bc6cfc commit 9c92458
Show file tree
Hide file tree
Showing 34 changed files with 37 additions and 49 deletions.
2 changes: 2 additions & 0 deletions tests/functional/_setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pushd "$TESTDIR" > /dev/null
export AUGUR="${AUGUR:-../../bin/augur}"
3 changes: 1 addition & 2 deletions tests/functional/clades.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Integration tests for augur clades.

$ pushd "$TESTDIR" > /dev/null
$ export AUGUR="${AUGUR:-../../bin/augur}"
$ source "$TESTDIR"/_setup.sh

Test augur clades with simple Zika input files and hierarchical clades.

Expand Down
3 changes: 1 addition & 2 deletions tests/functional/mask.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Integration tests for augur mask.

$ pushd "$TESTDIR" > /dev/null
$ export AUGUR="${AUGUR:-../../bin/augur}"
$ source "$TESTDIR"/_setup.sh

Try masking a VCF without any specified mask.

Expand Down
1 change: 1 addition & 0 deletions tests/functional/merge/cram/_setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
2 changes: 1 addition & 1 deletion tests/functional/merge/cram/merge.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SETUP

$ export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
$ source "$TESTDIR"/_setup.sh
$ set -o pipefail


Expand Down
3 changes: 1 addition & 2 deletions tests/functional/parse.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Integration tests for augur parse.

$ pushd "$TESTDIR" > /dev/null
$ export AUGUR="${AUGUR:-../../bin/augur}"
$ source "$TESTDIR"/_setup.sh

Try to parse Zika sequences without specifying fields.
This should fail.
Expand Down
2 changes: 2 additions & 0 deletions tests/functional/titers/cram/_setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pushd "$TESTDIR" > /dev/null
export AUGUR="${AUGUR:-../../../../bin/augur}"
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Setup

$ pushd "$TESTDIR" > /dev/null
$ export AUGUR="${AUGUR:-../../../../bin/augur}"
$ source "$TESTDIR"/_setup.sh

Test titer substitution model with alignment and tree inputs and a custom prefix for the node data attributes in the output.

Expand Down
3 changes: 1 addition & 2 deletions tests/functional/titers/cram/titers-sub-with-tree.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Setup

$ pushd "$TESTDIR" > /dev/null
$ export AUGUR="${AUGUR:-../../../../bin/augur}"
$ source "$TESTDIR"/_setup.sh

Test titer substitution model with alignment and tree inputs.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Setup

$ pushd "$TESTDIR" > /dev/null
$ export AUGUR="${AUGUR:-../../../../bin/augur}"
$ source "$TESTDIR"/_setup.sh

Test titer tree model with a custom prefix for the node data attributes in the output.

Expand Down
3 changes: 1 addition & 2 deletions tests/functional/titers/cram/titers-tree.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Setup

$ pushd "$TESTDIR" > /dev/null
$ export AUGUR="${AUGUR:-../../../../bin/augur}"
$ source "$TESTDIR"/_setup.sh

Test titer tree model.

Expand Down
3 changes: 1 addition & 2 deletions tests/functional/traits.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Integration tests for augur traits.

$ pushd "$TESTDIR" > /dev/null
$ export AUGUR="${AUGUR:-../../bin/augur}"
$ source "$TESTDIR"/_setup.sh

Infer the ancestral region for a given tree and metadata.

Expand Down
2 changes: 2 additions & 0 deletions tests/functional/translate/cram/_setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
export SCRIPTS="$TESTDIR/../../../../scripts"
3 changes: 1 addition & 2 deletions tests/functional/translate/cram/basic-error-checking.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Setup

$ export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
$ export SCRIPTS="$TESTDIR/../../../../scripts"
$ source "$TESTDIR"/_setup.sh
$ export ANC_DATA="$TESTDIR/../../ancestral/data/simple-genome"
$ export DATA="$TESTDIR/../data/simple-genome"

Expand Down
2 changes: 1 addition & 1 deletion tests/functional/translate/cram/genbank.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Setup

$ export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
$ source "$TESTDIR"/_setup.sh
$ export ANC_DATA="$TESTDIR/../../ancestral/data/simple-genome"
$ export DATA="$TESTDIR/../data/simple-genome"

Expand Down
3 changes: 1 addition & 2 deletions tests/functional/translate/cram/general.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Setup

$ export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
$ export SCRIPTS="$TESTDIR/../../../../scripts"
$ source "$TESTDIR"/_setup.sh
$ export ANC_DATA="$TESTDIR/../../ancestral/data/simple-genome"
$ export DATA="$TESTDIR/../data/simple-genome"

Expand Down
3 changes: 1 addition & 2 deletions tests/functional/translate/cram/genes.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Setup

$ export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
$ export SCRIPTS="$TESTDIR/../../../../scripts"
$ source "$TESTDIR"/_setup.sh
$ export ANC_DATA="$TESTDIR/../../ancestral/data/simple-genome"
$ export DATA="$TESTDIR/../data/simple-genome"

Expand Down
3 changes: 1 addition & 2 deletions tests/functional/translate/cram/gff.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Setup

$ export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
$ export SCRIPTS="$TESTDIR/../../../../scripts"
$ source "$TESTDIR"/_setup.sh
$ export ANC_DATA="$TESTDIR/../../ancestral/data/simple-genome"
$ export DATA="$TESTDIR/../data/simple-genome"

Expand Down
3 changes: 1 addition & 2 deletions tests/functional/translate/cram/invalid-args.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Setup

$ export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
$ export SCRIPTS="$TESTDIR/../../../../scripts"
$ source "$TESTDIR"/_setup.sh
$ export ANC_DATA="$TESTDIR/../../ancestral/data/simple-genome"
$ export DATA="$TESTDIR/../data/simple-genome"

Expand Down
3 changes: 1 addition & 2 deletions tests/functional/translate/cram/root-mutations.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Setup

$ export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
$ export SCRIPTS="$TESTDIR/../../../../scripts"
$ source "$TESTDIR"/_setup.sh
$ export ANC_DATA="$TESTDIR/../../ancestral/data/simple-genome"
$ export DATA="$TESTDIR/../data/simple-genome"

Expand Down
3 changes: 1 addition & 2 deletions tests/functional/translate/cram/translate-with-genbank.t
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
Setup

$ export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
$ source "$TESTDIR"/_setup.sh
$ export DATA="$TESTDIR/../data"
$ export SCRIPTS="$TESTDIR/../../../../scripts"

Translate amino acids for genes using a GenBank file.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
Setup

$ export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
$ source "$TESTDIR"/_setup.sh
$ export DATA="$TESTDIR/../data"
$ export SCRIPTS="$TESTDIR/../../../../scripts"

Translate amino acids for genes using a GFF3 file where the gene names are stored in a qualifier named "gene_name".

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
Setup

$ export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
$ source "$TESTDIR"/_setup.sh
$ export DATA="$TESTDIR/../data"
$ export SCRIPTS="$TESTDIR/../../../../scripts"

Translate amino acids for genes using a GFF3 file where the gene names are stored in a qualifier named "gene".

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
Setup

$ export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
$ source "$TESTDIR"/_setup.sh
$ export DATA="$TESTDIR/../data"
$ export SCRIPTS="$TESTDIR/../../../../scripts"

This is an identical test setup as `translate-with-gff-and-gene.t` but using locus_tag instead of gene in the GFF

Expand Down
3 changes: 1 addition & 2 deletions tests/functional/translate/cram/vcf-with-root-mutation.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Setup

$ export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
$ export SCRIPTS="$TESTDIR/../../../../scripts"
$ source "$TESTDIR"/_setup.sh
$ export ANC_DATA="$TESTDIR/../../ancestral/data/simple-genome"
$ export DATA="$TESTDIR/../data/simple-genome"

Expand Down
3 changes: 1 addition & 2 deletions tests/functional/translate/cram/vcf.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Setup

$ export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
$ export SCRIPTS="$TESTDIR/../../../../scripts"
$ source "$TESTDIR"/_setup.sh
$ export ANC_DATA="$TESTDIR/../../ancestral/data/simple-genome"
$ export DATA="$TESTDIR/../data/simple-genome"

Expand Down
1 change: 1 addition & 0 deletions tests/functional/tree/cram/_setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
2 changes: 1 addition & 1 deletion tests/functional/tree/cram/iqtree-compressed-input.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Setup

$ export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
$ source "$TESTDIR"/_setup.sh

Build a tree with excluded sites using a compressed input file.

Expand Down
2 changes: 1 addition & 1 deletion tests/functional/tree/cram/iqtree-extend-args.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Setup

$ export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
$ source "$TESTDIR"/_setup.sh

Build a tree, augmenting existing default arguments with custom arguments.

Expand Down
2 changes: 1 addition & 1 deletion tests/functional/tree/cram/iqtree-model-auto.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Setup

$ export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
$ source "$TESTDIR"/_setup.sh

Try building a tree with IQ-TREE using its ModelTest functionality, by supplying a substitution model of "auto".

Expand Down
2 changes: 1 addition & 1 deletion tests/functional/tree/cram/iqtree-more-threads.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Setup

$ export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
$ source "$TESTDIR"/_setup.sh

Try building a tree with IQ-TREE with more threads (4) than there are input sequences (3).

Expand Down
2 changes: 1 addition & 1 deletion tests/functional/tree/cram/iqtree-override-args.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Setup

$ export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
$ source "$TESTDIR"/_setup.sh

Build a tree, replacing existing default arguments with custom arguments.
Since the following custom arguments are incompatible with the default IQ-TREE arguments, this command will only work with the `--override-default-args` flag.
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/tree/cram/iqtree-preserve-fa.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Setup

$ export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
$ source "$TESTDIR"/_setup.sh

Build a tree with an input file that doesn't end in .fasta, and ensure it's not overwritten.

Expand Down
2 changes: 1 addition & 1 deletion tests/functional/tree/cram/iqtree.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Setup

$ export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}"
$ source "$TESTDIR"/_setup.sh

Try building a tree with IQ-TREE.

Expand Down

0 comments on commit 9c92458

Please sign in to comment.