aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranklin Wei <me@fwei.tk>2018-07-02 14:31:20 -0400
committerFranklin Wei <me@fwei.tk>2018-07-02 14:31:20 -0400
commit4d780768c7fd6378b30ef5a1fee348b2c925b20d (patch)
tree0e02d45a4f36c144d41f5b399dc1c0f277c334ff
parent09dda04a8e64c308cf25e5078bcf1056affb5703 (diff)
downloadcsaa-4d780768c7fd6378b30ef5a1fee348b2c925b20d.zip
csaa-4d780768c7fd6378b30ef5a1fee348b2c925b20d.tar.gz
csaa-4d780768c7fd6378b30ef5a1fee348b2c925b20d.tar.bz2
csaa-4d780768c7fd6378b30ef5a1fee348b2c925b20d.tar.xz
Clean up test scripts a little
-rwxr-xr-xtestall.sh15
-rwxr-xr-xtestcreate.sh1
-rwxr-xr-xtestdummy.sh7
-rwxr-xr-xtestmodify.sh1
-rwxr-xr-xtestmodifyenc.sh3
-rwxr-xr-xtestretrieve.sh3
6 files changed, 20 insertions, 10 deletions
diff --git a/testall.sh b/testall.sh
index 2c75bf2..42df4f5 100755
--- a/testall.sh
+++ b/testall.sh
@@ -1,19 +1,18 @@
#!/bin/bash
+if [[ $# -ne 1 ]]
+then
+ echo "Usage: "$0" LOGLEAVES"
+ exit 1
+fi
+echo "Initializing..."
./server $1 csaa.db --overwrite > /dev/null &
pid=$!
sleep 5
-echo "Create:"
time ./testcreate.sh ./client
-
-echo "Modify:"
time ./testmodify.sh ./client
-
-echo "Retrieve:"
time ./testretrieve.sh ./client
-
-echo "Modify (encrypted):"
time ./testmodifyenc.sh ./client
-echo "Retrieve (encrypted):"
+echo "Encrypted retrieve: "
time ./testretrieve.sh ./client
kill -SIGINT $!
diff --git a/testcreate.sh b/testcreate.sh
index 45a7df2..93fc617 100755
--- a/testcreate.sh
+++ b/testcreate.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+echo "Create:"
for i in $(seq 1 100)
do
$1 -u 1 -k a create > /dev/null
diff --git a/testdummy.sh b/testdummy.sh
index 2623601..547c510 100755
--- a/testdummy.sh
+++ b/testdummy.sh
@@ -1,7 +1,14 @@
#!/bin/bash
+if [[ $# -ne 1 ]]
+then
+ echo "Usage: "$0" LOGLEAVES"
+ exit 1
+fi
+echo "Initializing..."
./dummy_server 10 csaa.db --overwrite > /dev/null &
pid=$!
sleep 5
time ./testcreate.sh ./dummy_client
time ./testmodify.sh ./dummy_client
+time ./testretrieve.sh ./dummy_client
kill -SIGINT $!
diff --git a/testmodify.sh b/testmodify.sh
index ed69998..98fbe2d 100755
--- a/testmodify.sh
+++ b/testmodify.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+echo "Modify:"
$1 -u 1 -k a create > /dev/null
for i in $(seq 1 100)
do
diff --git a/testmodifyenc.sh b/testmodifyenc.sh
index 60d6aec..d942ea1 100755
--- a/testmodifyenc.sh
+++ b/testmodifyenc.sh
@@ -1,6 +1,7 @@
#!/bin/bash
+echo "Modify (encrypted):"
$1 -u 1 -k a create > /dev/null
for i in $(seq 1 100)
do
- $1 -u 1 -k a modifyfile -e -f 1 -i container1/hello-world.tar
+ $1 -u 1 -k a modifyfile -e -f 1 -i container1/hello-world.tar > /dev/null
done
diff --git a/testretrieve.sh b/testretrieve.sh
index 24d0430..dbc18dd 100755
--- a/testretrieve.sh
+++ b/testretrieve.sh
@@ -1,5 +1,6 @@
#!/bin/bash
+echo "Retrieve:"
for i in $(seq 1 100)
do
- $1 -u 1 -k a retrievefile -f 1 -o out
+ $1 -u 1 -k a retrievefile -f 1 -o out > /dev/null
done