diff options
author | Tomás Touceda <chiiph@leap.se> | 2014-01-26 22:21:39 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2014-01-26 22:21:39 -0300 |
commit | 99da1a88254d04908e8a223834369fe9ad130ebc (patch) | |
tree | dcdb7ba18481b53c28e8d1c064bb706acc8b2959 /mail/src | |
parent | e8560a95362a6c71340f37da6167754876757950 (diff) | |
parent | 5d5fd998d1bb4c8f1b20d7da1d47844700c824f0 (diff) |
Merge remote-tracking branch 'refs/remotes/kali/feature/pass_user_to_script' into develop
Diffstat (limited to 'mail/src')
-rwxr-xr-x | mail/src/leap/mail/imap/tests/leap_tests_imap.zsh | 26 |
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 7ba408c..676d1a8 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 & |