Browse Source

move test scripts into tests dir

Pi 1 year ago
parent
commit
0d2a905819

+ 0 - 6
test.sh

@@ -1,6 +0,0 @@
-#!/bin/bash
-set -euo pipefail
-
-./test-signup.sh
-./test-cropswap@shandan.one.sh
-./test-cropswap-members@shandan.one.sh

+ 1 - 1
test-cropswap-members@shandan.one.sh → tests/test-cropswap-members@shandan.one.sh

@@ -10,7 +10,7 @@ trap cleanup EXIT
 
 export MAILDROPDIR
 
-SCRIPTDIR=$(readlink -e "${BASH_SOURCE[0]%/*}")
+SCRIPTDIR=$(readlink -e "${BASH_SOURCE[0]%/*}/../")
 cd "$MAILDROPDIR"
 
 #

+ 1 - 1
test-cropswap@shandan.one.sh → tests/test-cropswap@shandan.one.sh

@@ -10,7 +10,7 @@ trap cleanup EXIT
 
 export MAILDROPDIR
 
-SCRIPTDIR=$(readlink -e "${BASH_SOURCE[0]%/*}")
+SCRIPTDIR=$(readlink -e "${BASH_SOURCE[0]%/*}/../")
 cd "$MAILDROPDIR"
 
 #

+ 1 - 1
test-signup.sh → tests/test-signup.sh

@@ -10,7 +10,7 @@ trap cleanup EXIT
 
 export MAILDROPDIR
 
-SCRIPTDIR=$(readlink -e "${BASH_SOURCE[0]%/*}")
+SCRIPTDIR=$(readlink -e "${BASH_SOURCE[0]%/*}/../")
 cd "$MAILDROPDIR"
 
 #

+ 8 - 0
tests/test.sh

@@ -0,0 +1,8 @@
+#!/bin/bash
+set -euo pipefail
+
+SCRIPTDIR=$(readlink -e "${BASH_SOURCE[0]%/*}")
+
+${SCRIPTDIR}/test-signup.sh
+${SCRIPTDIR}/test-cropswap@shandan.one.sh
+${SCRIPTDIR}/test-cropswap-members@shandan.one.sh