expand tests and directory creation - geomyidae-tests - geomyidae tests
HTML git clone git://bitreich.org/geomyidae-tests/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/geomyidae-tests/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
DIR LICENSE
---
DIR commit 0432b0f21312c4a26d4933a863293725e853a95a
DIR parent c03621053824e4cc1beaa704ea9623e986be4d79
HTML Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Fri, 21 Jul 2023 16:13:19 +0200
expand tests and directory creation
Diffstat:
M Makefile | 2 --
M run.sh | 10 ++++++----
M tests | 2 ++
3 files changed, 8 insertions(+), 6 deletions(-)
---
DIR diff --git a/Makefile b/Makefile
@@ -1,7 +1,5 @@
build: clean
${CC} -o test.cgi test.c -static -Wall
- mkdir -p deepah
- cp test.cgi deepah/test.cgi
clean-results:
rm -rf results
DIR diff --git a/run.sh b/run.sh
@@ -19,7 +19,6 @@ run_tests() {
echo "request path was: $line, tls=$tls, chroot=$chroot" >> "$f"
counter=$((counter + 1))
fi
-
done < tests
}
@@ -34,12 +33,15 @@ rm -rf results
mkdir -p results
chown "$user:$group" results
rm -f test_counter.txt
-
+# subdirectory
mkdir -p deepah
chown "$user:$group" deepah
cd deepah || exit 1
-ln -sf ../results results
-ln -sf ../test_counter.txt test_counter.txt
+# remove previous symlinks.
+# recreate symlinks.
+test -e test.cgi || ln -sf ../test.cgi test.cgi
+test -e results || ln -sf ../results results
+test -e test_counter.txt || ln -sf ../test_counter.txt test_counter.txt
cd ../ || exit 1
"$bin" -4 -d -b "$base" -p "$port" -o "$port" -h "$host" -u "$user" -g "$group" &
DIR diff --git a/tests b/tests
@@ -3,6 +3,7 @@
/test.cgi/rest
/test.cgi?query
/test.cgi?query=test
+/test.cgi?query=test&query2=test2
/test.cgi?query=/test
/test.cgi search
/deepah/test.cgi
@@ -11,5 +12,6 @@
//deepah//test.cgi
/deepah/test.cgi?query
/deepah/test.cgi?query=test
+/deepah/test.cgi?query=test&query2=test2
/deepah/test.cgi?query=/test
/deepah/test.cgi search