25 echo "error: unknown performance test option '$1'" >&2; exit 1 ;;
28 . ../test/test-lib-common.sh
32 if ! test -x ../notmuch
34 echo >&2 'You do not seem to have built notmuch yet.'
42 case "$corpus_size" in
44 mail_subdir="mail/enron/bailey-s"
45 check_for="${TEST_DIRECTORY}/corpus/$mail_subdir"
48 mail_subdir="mail/notmuch-archive"
49 check_for="${TEST_DIRECTORY}/corpus/$mail_subdir"
53 check_for="${TEST_DIRECTORY}/corpus/$mail_subdir/enron/wolfe-j"
56 MAIL_CORPUS="${TEST_DIRECTORY}/corpus/$mail_subdir"
58 if [ ! -d "$check_for" ] ; then
59 args+=("notmuch-email-corpus/$mail_subdir")
62 if [[ ${#args[@]} > 0 ]]; then
63 if command -v pixz > /dev/null; then
69 printf "Unpacking corpus\n"
70 mkdir -p "${TEST_DIRECTORY}/corpus"
72 tar --checkpoint=.5000 --extract --strip-components=1 \
73 --directory ${TEST_DIRECTORY}/corpus \
74 --use-compress-program ${XZ} \
75 --file ../download/notmuch-email-corpus-${PERFTEST_VERSION}.tar.xz \
82 cp -lr $MAIL_CORPUS $MAIL_DIR
87 printf "[v%4s %6s] Wall(s)\tUsr(s)\tSys(s)\tRes(K)\tIn/Out(512B)\n" \
88 ${PERFTEST_VERSION} ${corpus_size}
93 if test "$verbose" != "t"; then exec 4>test.output 3>&4; fi
94 if ! eval >&3 "/usr/bin/time -f '%e\t%U\t%S\t%M\t%I/%O' $2" ; then
95 test_failure=$(($test_failure + 1))
102 if [ "$test_failure" = "0" ]; then
110 cd -P "$test" || error "Cannot setup test environment"
114 echo $(basename "$0"): "Testing ${test_description:-notmuch performance}"