aboutsummaryrefslogtreecommitdiff
path: root/testdummy.sh
diff options
context:
space:
mode:
authorFranklin Wei <me@fwei.tk>2018-07-08 14:51:34 -0400
committerFranklin Wei <me@fwei.tk>2018-07-08 14:51:34 -0400
commit945f11f3f70ead44cff2ac76faf68f328a968abc (patch)
tree2b54422f0150c1de8df6ffa5910b77f6d5881372 /testdummy.sh
parent3e7b74359f56c0518abcd420e85a5e3e778e8fd1 (diff)
downloadcsaa-945f11f3f70ead44cff2ac76faf68f328a968abc.zip
csaa-945f11f3f70ead44cff2ac76faf68f328a968abc.tar.gz
csaa-945f11f3f70ead44cff2ac76faf68f328a968abc.tar.bz2
csaa-945f11f3f70ead44cff2ac76faf68f328a968abc.tar.xz
Refactor and optimize
Diffstat (limited to 'testdummy.sh')
-rwxr-xr-xtestdummy.sh24
1 files changed, 16 insertions, 8 deletions
diff --git a/testdummy.sh b/testdummy.sh
index 7050655..a10d621 100755
--- a/testdummy.sh
+++ b/testdummy.sh
@@ -1,11 +1,19 @@
#!/bin/bash
-echo "Initializing..."
-rm csaa.db
-sqlite3 csaa.db < sqlinit.txt
-./dummy_server 10 csaa.db > /dev/null &
+if [[ $# -ne 2 ]]
+then
+ echo "Usage: "$0" LOGLEAVES RUNS"
+ exit 1
+fi
+
+runs=$2
+
+echo "Initializing dummy..."
+rm files -rf
+
+./dummy_server $1 csaa.db --overwrite > /dev/null &
pid=$!
-sleep 1
-/usr/bin/time -v ./testcreate.sh ./dummy_client
-/usr/bin/time -v ./testmodify.sh ./dummy_client
-/usr/bin/time -v ./testretrieve.sh ./dummy_client
+sleep .2
+/usr/bin/time -v ./testcreate.sh ./dummy_client $runs
+/usr/bin/time -v ./testmodify.sh ./dummy_client $runs
+/usr/bin/time -v ./testretrieve.sh ./dummy_client $runs
kill -SIGINT $!