summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2014-01-26 22:21:39 -0300
committerTomás Touceda <chiiph@leap.se>2014-01-26 22:21:39 -0300
commita49b005d2a584936f364192864b6758bb1dd1215 (patch)
tree06ae2db705b23aabfd3bade15de4e764bf72d85c /src/leap
parent717b0c30175e8954d3f97c54cb643cec6c9c7171 (diff)
parent36baa3a0e93df779145515f879ed3efdab014bea (diff)
Merge remote-tracking branch 'refs/remotes/kali/feature/pass_user_to_script' into develop
Diffstat (limited to 'src/leap')
-rwxr-xr-xsrc/leap/mail/imap/tests/leap_tests_imap.zsh26
1 files changed, 22 insertions, 4 deletions
diff --git a/src/leap/mail/imap/tests/leap_tests_imap.zsh b/src/leap/mail/imap/tests/leap_tests_imap.zsh
index 7ba408c..676d1a8 100755
--- a/src/leap/mail/imap/tests/leap_tests_imap.zsh
+++ b/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 &