mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
tests: remove entangling corpus index optimization
The add_email_corpus test utility includes logic that tries to re-use an index of the corpus if available. This was seemingly done as an optimization, so that every test that uses the corpus didn't have to create it's own index of the corpus. However, this has the perverse side effect of entangling tests together, and breaks parallelization. Forcing each test to do it's own index does increase the overall time of the test slightly (~6%), but this will be more than made up for in the next patch that introduces paraellization.
This commit is contained in:
parent
7f7af27bd8
commit
591388ccd1
4 changed files with 4 additions and 11 deletions
1
test/.gitignore
vendored
1
test/.gitignore
vendored
|
@ -1,5 +1,4 @@
|
||||||
/arg-test
|
/arg-test
|
||||||
/corpora.mail
|
|
||||||
/hex-xcode
|
/hex-xcode
|
||||||
/parse-time
|
/parse-time
|
||||||
/random-corpus
|
/random-corpus
|
||||||
|
|
|
@ -81,4 +81,4 @@ check: test
|
||||||
SRCS := $(SRCS) $(test_srcs)
|
SRCS := $(SRCS) $(test_srcs)
|
||||||
CLEAN += $(TEST_BINARIES) $(addsuffix .o,$(TEST_BINARIES)) \
|
CLEAN += $(TEST_BINARIES) $(addsuffix .o,$(TEST_BINARIES)) \
|
||||||
$(dir)/database-test.o \
|
$(dir)/database-test.o \
|
||||||
$(dir)/corpora.mail $(dir)/test-results $(dir)/tmp.*
|
$(dir)/test-results $(dir)/tmp.*
|
||||||
|
|
|
@ -59,6 +59,6 @@ $NOTMUCH_SRCDIR/test/aggregate-results.sh $NOTMUCH_BUILDDIR/test/test-results/*
|
||||||
ev=$?
|
ev=$?
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
rm -rf $NOTMUCH_BUILDDIR/test/test-results $NOTMUCH_BUILDDIR/test/corpora.mail
|
rm -rf $NOTMUCH_BUILDDIR/test/test-results
|
||||||
|
|
||||||
exit $ev
|
exit $ev
|
||||||
|
|
|
@ -396,14 +396,8 @@ add_email_corpus ()
|
||||||
corpus=${1:-default}
|
corpus=${1:-default}
|
||||||
|
|
||||||
rm -rf ${MAIL_DIR}
|
rm -rf ${MAIL_DIR}
|
||||||
if [ -d $TEST_DIRECTORY/corpora.mail/$corpus ]; then
|
cp -a $NOTMUCH_SRCDIR/test/corpora/$corpus ${MAIL_DIR}
|
||||||
cp -a $TEST_DIRECTORY/corpora.mail/$corpus ${MAIL_DIR}
|
notmuch new >/dev/null || die "'notmuch new' failed while adding email corpus"
|
||||||
else
|
|
||||||
cp -a $NOTMUCH_SRCDIR/test/corpora/$corpus ${MAIL_DIR}
|
|
||||||
notmuch new >/dev/null || die "'notmuch new' failed while adding email corpus"
|
|
||||||
mkdir -p $TEST_DIRECTORY/corpora.mail
|
|
||||||
cp -a ${MAIL_DIR} $TEST_DIRECTORY/corpora.mail/$corpus
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
test_begin_subtest ()
|
test_begin_subtest ()
|
||||||
|
|
Loading…
Reference in a new issue