summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2014-01-26 20:27:53 -0400
committerKali Kaneko <kali@leap.se>2014-01-26 20:27:53 -0400
commit5d5fd998d1bb4c8f1b20d7da1d47844700c824f0 (patch)
treedcdb7ba18481b53c28e8d1c064bb706acc8b2959 /mail
parente8560a95362a6c71340f37da6167754876757950 (diff)
Allow passing user and mbox as parameters
Increase default testing duration to 200 secs.
Diffstat (limited to 'mail')
-rwxr-xr-xmail/src/leap/mail/imap/tests/leap_tests_imap.zsh26
1 files changed, 22 insertions, 4 deletions
diff --git a/mail/src/leap/mail/imap/tests/leap_tests_imap.zsh b/mail/src/leap/mail/imap/tests/leap_tests_imap.zsh
index 7ba408cc..676d1a81 100755
--- a/mail/src/leap/mail/imap/tests/leap_tests_imap.zsh
+++ b/mail/src/leap/mail/imap/tests/leap_tests_imap.zsh
@@ -41,8 +41,10 @@
# Please provide also details about your system, and
# the type of hard disk setup you are running against.
#
-#
-# Edit these variables --------------------------
+
+# ------------------------------------------------
+# Edit these variables if you are too lazy to pass
+# the user and mbox as parameters. Like me.
USER="test_f14@dev.bitmask.net"
MBOX="~/leap/imaptest/data/dovecot-crlf"
@@ -50,15 +52,16 @@ MBOX="~/leap/imaptest/data/dovecot-crlf"
HOST="localhost"
PORT="1984"
-IMAPTEST="imaptest"
+# in case you have it aliased
GREP="/bin/grep"
+IMAPTEST="imaptest"
# -----------------------------------------------
#
# These should be kept constant across benchmarking
# runs across different machines, for comparability.
-DURATION=100
+DURATION=200
NUM_MSG=200
@@ -153,6 +156,21 @@ print "TOT samples", NR;
}
+{ test $1 = "--help" } && {
+ echo "Usage: $0 [user@provider] [/path/to/sample.mbox]"
+ exit 0
+}
+
+# If the first parameter is passed, take it as the user
+{ test $1 } && {
+ USER=$1
+}
+
+# If the second parameter is passed, take it as the mbox
+{ test $2 } && {
+ MBOX=$2
+}
+
echo "[+] LEAP IMAP TESTS"
echo "[+] Running imaptest for $DURATION seconds with $NUM_MSG messages"
wait_and_kill &