forked from glormph/nf-core-labelcheck
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_tests.sh
45 lines (35 loc) · 916 Bytes
/
run_tests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env bash
red=$(tput setaf 1)
green=$(tput setaf 2)
reset=$(tput sgr0)
export NXF_VER=22.10.5
rundir=$(pwd)
export repodir=$(dirname "$(realpath -s "$0")")
export testdir="${repodir}/tests/"
export testdata="${rundir}/static-resources/test-data/nf-labelcheck"
if [ -e "${testdata}" ]
then
cd "${testdata}" && git checkout labelcheck_test_data && cd "${rundir}"
else
git clone --single-branch --branch labelcheck_test_data https://github.com/lehtiolab/static-resources
fi
[ -e test_output ] && rm -r test_output
declare -A results
test_names=(
pooled
)
echo ${testdata}
for testname in ${test_names[@]}
do
bash "${testdir}/${testname}.sh"
results["$testname"]="$?"
done
for testname in ${test_names[@]}
do
if [[ ${results["$testname"]} == 0 ]]
then
echo ${green}"$testname" - SUCCESS ${reset}
else
echo ${red}"$testname" - FAIL ${reset}
fi
done