aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2021-06-15 19:09:37 +0200
committerLouis Burda <quent.burda@gmail.com>2021-06-15 19:10:46 +0200
commit06f34bb4c7136e66306fdb41466bccbdd8f62ffd (patch)
treeea212ab7dca7e190051a7c1d6d349278305d2efe /tests
parente13e2c357356887b9b0b5886ba7c0003e7225791 (diff)
downloadenowars5-service-stldoctor-06f34bb4c7136e66306fdb41466bccbdd8f62ffd.tar.gz
enowars5-service-stldoctor-06f34bb4c7136e66306fdb41466bccbdd8f62ffd.zip
test script: clean data directory with env var flag instead of every req
Diffstat (limited to 'tests')
-rw-r--r--tests/test.sh10
1 files changed, 3 insertions, 7 deletions
diff --git a/tests/test.sh b/tests/test.sh
index 159e435..f2b9d86 100644
--- a/tests/test.sh
+++ b/tests/test.sh
@@ -56,9 +56,9 @@ cleanuploads() {
mkdir -p "$RESULTDIR"
}
-if [ "$1" == "stl-leaks" ]; then
- cleanuploads
+[ ! -z "$CLEAN" ] && cleanuploads
+if [ "$1" == "stl-leaks" ]; then
announce "Testing ASCII STL Parsing"
(
echo "echo"
@@ -78,8 +78,6 @@ if [ "$1" == "stl-leaks" ]; then
) | checkleaks
elif [ "$1" == "stl-upload" ]; then
- cleanuploads
-
popd
file="$(realpath $2)"
if [ ! -e "$file" ]; then
@@ -95,11 +93,9 @@ elif [ "$1" == "stl-upload" ]; then
cat "$file" | wc -c
cat "$file"
echo "$name"
- ) | checkleaks
+ ) | connect
elif [ "$1" == "auth-upload" ]; then
- cleanuploads
-
(
echo "echo"