aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranklin Wei <me@fwei.tk>2018-07-31 22:12:10 -0400
committerFranklin Wei <me@fwei.tk>2018-07-31 22:12:10 -0400
commit52b153210ec564c54b45365629f000995ad6cf09 (patch)
treee2a1abe943953dc74c2a63cf1d4f6f7c85b7e994
parentccf72af40f4f476f1291e466c094c96e3c33b190 (diff)
downloadcsaa-52b153210ec564c54b45365629f000995ad6cf09.zip
csaa-52b153210ec564c54b45365629f000995ad6cf09.tar.gz
csaa-52b153210ec564c54b45365629f000995ad6cf09.tar.bz2
csaa-52b153210ec564c54b45365629f000995ad6cf09.tar.xz
Make test scripts take logleaves range and trial count on command line
This was long overdue.
-rwxr-xr-xtabulate.sh13
-rwxr-xr-xtestmain_preinit.sh16
2 files changed, 23 insertions, 6 deletions
diff --git a/tabulate.sh b/tabulate.sh
index 136bcce..b01a2eb 100755
--- a/tabulate.sh
+++ b/tabulate.sh
@@ -1,7 +1,14 @@
#!/bin/bash
-logleaves_start=10
-logleaves_end=25
-trials=1
+if [[ $# -ne 3 ]]
+then
+ echo "Usage: "$0" START END TRIALS"
+ exit 1
+fi
+
+logleaves_start=$1
+logleaves_end=$2
+trials=$3
+
runs_test=500
rm -f all_*.txt dummy_all_*.txt
diff --git a/testmain_preinit.sh b/testmain_preinit.sh
index 1c49ff3..89d5895 100755
--- a/testmain_preinit.sh
+++ b/testmain_preinit.sh
@@ -1,12 +1,22 @@
#!/bin/bash
-mkdir -p results
-trials=1
+if [[ $# -ne 3 ]]
+then
+ echo "Usage: "$0" START END TRIALS"
+ exit 1
+fi
+
+logleaves_start=$1
+logleaves_end=$2
+trials=$3
+
runs_test=500
+mkdir -p results
+
# minimum is ceil(lg(runs_test)), otherwise modify will fail
for j in $(seq 1 $trials)
do
- for i in `seq 10 12`
+ for i in `seq $logleaves_start $logleaves_end`
do
echo "logleaves "$i