Skip to content

Commit cdcc132

Browse files
committed
test_stxtyper.sh automatically downloads test/
1 parent 0a9e74a commit cdcc132

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

test_stxtyper.sh

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,28 @@ else
1111
STXTYPER=./stxtyper
1212
fi
1313

14+
if [ ! -e "test/basic.expected" ]
15+
then
16+
echo "test/basic.expected not found, downloading new test data"
17+
echo "from https://raw.githubusercontent.com/ncbi/stxtyper/main/"
18+
mkdir test
19+
pushd test
20+
curl --location --silent -O https://raw.githubusercontent.com/ncbi/stxtyper/main/test/amrfinder_integration.expected \
21+
-O https://raw.githubusercontent.com/ncbi/stxtyper/main/test/amrfinder_integration.fa \
22+
-O https://raw.githubusercontent.com/ncbi/stxtyper/main/test/amrfinder_integration2.expected \
23+
-O https://raw.githubusercontent.com/ncbi/stxtyper/main/test/amrfinder_integration2.fa \
24+
-O https://raw.githubusercontent.com/ncbi/stxtyper/main/test/basic.expected \
25+
-O https://raw.githubusercontent.com/ncbi/stxtyper/main/test/basic.fa \
26+
-O https://raw.githubusercontent.com/ncbi/stxtyper/main/test/basic.nuc_out.expected \
27+
-O https://raw.githubusercontent.com/ncbi/stxtyper/main/test/cases.expected \
28+
-O https://raw.githubusercontent.com/ncbi/stxtyper/main/test/cases.fa \
29+
-O https://raw.githubusercontent.com/ncbi/stxtyper/main/test/synthetics.expected \
30+
-O https://raw.githubusercontent.com/ncbi/stxtyper/main/test/synthetics.fa \
31+
-O https://raw.githubusercontent.com/ncbi/stxtyper/main/test/virulence_ecoli.expected \
32+
-O https://raw.githubusercontent.com/ncbi/stxtyper/main/test/virulence_ecoli.fa
33+
popd
34+
fi
35+
1436
# globals updated by function test_input_file
1537
FAILURES=0
1638
TESTS=0
@@ -19,7 +41,7 @@ TEST_TEXT=''
1941
echo "TERM=$TERM"
2042

2143
# some color macros
22-
if [ "$TERM" == "" || "$TERM" == "dumb" ]
44+
if [ "$TERM" == "" ] || [ "$TERM" == "dumb" ]
2345
then
2446
green='' # no colors
2547
red=''

0 commit comments

Comments
 (0)