1 # Common variable settings for (correctness) tests and performance
4 # Keep the original TERM for say_color and test_emacs
7 # Set SMART_TERM to vt100 for known dumb/unknown terminal.
8 # Otherwise use whatever TERM is currently used so that
9 # users' actual TERM environments are being used in tests.
17 # For repeatability, reset the environment to known value.
23 export LANG LC_ALL PAGER TERM TZ
24 GIT_TEST_CMP=${GIT_TEST_CMP:-diff -u}
25 if [[ ( -n "$TEST_EMACS" && -z "$TEST_EMACSCLIENT" ) || \
26 ( -z "$TEST_EMACS" && -n "$TEST_EMACSCLIENT" ) ]]; then
27 echo "error: must specify both or neither of TEST_EMACS and TEST_EMACSCLIENT" >&2
30 TEST_EMACS=${TEST_EMACS:-${EMACS:-emacs}}
31 TEST_EMACSCLIENT=${TEST_EMACSCLIENT:-emacsclient}
32 TEST_GDB=${TEST_GDB:-gdb}
33 TEST_CC=${TEST_CC:-cc}
34 TEST_CFLAGS=${TEST_CFLAGS:-"-g -O0"}
35 TEST_SHIM_CFLAGS=${TEST_SHIM_CFLAGS:-"-fpic -shared"}
36 TEST_SHIM_LDFLAGS=${TEST_SHIM_LDFLAGS:-"-ldl"}
38 # Protect ourselves from common misconfiguration to export
39 # CDPATH into the environment
44 # For lib/open.cc:_load_key_file
47 # for lib/open.cc:_choose_database_path
52 unset ALTERNATE_EDITOR
59 # Note: TEST_TMPDIR *NOT* exported!
60 TEST_TMPDIR=$(mktemp -d "${TMPDIR:-/tmp}/notmuch-test-$$.XXXXXX")
61 # Put GNUPGHOME in TMPDIR to avoid problems with long paths.
62 export GNUPGHOME="${TEST_TMPDIR}/gnupg"