about summary refs log tree commit homepage
path: root/t/lei-externals.t
DateCommit message (Collapse)
2023-09-16Makefile: add `check-debris' target
This non-parallelized target is useful for noticing core dumps and preventing them from being clobbered as we run the test suite. It will also notice leftover temporary files and directories. This make target was used on OpenBSD 7.3 to develop at least two recent fixes: e281363ba937 (lei: ensure we run DESTROY|END at daemon exit w/ kqueue) 759885e60e59 (lei: ensure --stdin sets %ENV and $current_lei) I considered using a per-test TMPDIR for this to enable parallelization, but on-filesystem UNIX sockets won't work with excessively long path names.
2023-09-11treewide: favor Xapian (SWIG binding) over Search::Xapian
The Xapian SWIG bindings are favored by Xapian upstream for ease-of-maintenance compared to the XS version. While Debian lags on this front, the SWIG bindings are widely available on all *BSDs.
2022-04-18lei: wire up pure Perl sendmsg/recvmsg for Linux users
This enables lei-daemon to work without Inline::C nor Socket::MsgHdr installed. Prior to this, only the `lei' client was using the pure Perl implementation. Either C implementation is still marginally faster, however.
2021-09-13tests: add require_cmd, require curl when needed
t/v2mirror.t and t/lei-mirror.t are now skipped when curl is missing (instead of failing in appropriate places). A bunch of which() checks are updated to use require_cmd to avoid explicitly loading Spawn.
2021-07-25t/lei*: check error messages on failures
I just hit an unreproducible failure in t/lei-p2q.t and lacked $lei_err information to diagnose it. Hopefully this helps track down odd failures in the future.
2021-05-04treewide: update to v3 Tor onions
v2 onions are insecure, deprecated and going away. v3 names are unfortunately longer and more difficult to remember, but should be more resistant to attack than v2 ones.
2021-04-28tests: restore CWD with "lei -C" and run_script
This simplifies test_lei users in t/*.t
2021-04-22lei: XDG_RUNTIME_DIR=/dev/null disables daemon mode
We'll support this mode of operation for now to quiet down testing of oneshot mode where the daemon doesn't persist.
2021-03-25tests: "check-run" uses persistent lei daemon
We'll use a lei-daemon if it's already running and TEST_LEI_DAEMON_PERSIST_DIR is set, but we can also start one and manage it from t/run.perl This drops "make check-run TEST_LEI_DAEMON_ONLY=1" time by ~10% for me.
2021-03-25lei add-external: do not initialize writable store
There's no need to create or write lei/store when adding an external, we just need to write to the config file.
2021-03-21lei: All Local Externals: bare git dir for alternates
This will be used for keyword (and label) storage for externals. We'll be using this to ensure we don't redundantly auto-import messages into lei/store if they're already in a local external (they can still be imported explicitly via "lei import").
2021-03-19lei q: -I/--include overrides --no-(external|local|remote)
Assume that anybody using -I/--include for external locations will want to override --no-$FOO if they're explicitly including a location. With some effort, we could make it order-dependent (e.g. "-I $LOCATION --no-$FOO" and "--no-$FOO -I $LOCATION" behave differently). However that's not straightforward when using Getopt::Long to parse command-line options into a hashref. I'm also not sure if order-dependent switches are a desirable UI/UX quality.
2021-03-19lei: disallow "\n" in local externals paths
git 2.11 and earlier could not handle git directories with newlines in them, nor does libgit2 support them. Followup-to: d87dd0e679587043 ("config: reject `\n' in `inboxdir'")
2021-03-09lei q: remove angle brackets around Message-IDs
They're unnecessary visual noise, and angle brackets don't always work as intended when going through Xapian's query parser. Since we already use "m:" and "refs:" instead of the actual header names, it should be obvious we're at liberty to abbreviate such things Link: https://public-inbox.org/meta/20210304184348.GA19350@dcvr/
2021-03-05search: use "z:" instead of "bytes:" prefix
So far, searching by size has never been publicly documented, and IMHO, of questionable utility. In any case, "z:" is what mairix(1) uses, so it may be familiar to existing mairix users (I've never used this prefix myself). So far, this prefix is only used internally in tests and in auto-translated queries from IMAP; thus this incompatible change is unlikely to affect anyone.
2021-03-01lei q: improve early aborts w/ remote externals
We must issue LeiStore->done if a client disconnects while we're streaming from a remote external. This can happen via SIGPIPE, or if a client process is interrupted by any other means.
2021-02-23lei: support "-C" to chdir in all sub commands
We'll also support "-C" at the end of most commands to give users a little more flexibility when building command-lines. This conflicts with "lei daemon-kill -CHLD", so that's special-cased since "-C" makes no sense with daemon-kill, anyways. Unlike "git show", the to-be-implemented "lei show" will diverge and enable "--find-copies[=<n>]" by default, so "-C[<n>]" won't be necessary.
2021-02-22t/lei*: drop $lei->(...) sub
lei() and lei_ok() are superior since they offer prototype checks and lei_ok() adds another check + description DRY-ness. The $lei sub was only bound to a variable since it was in t/lei.t and named subs don't work well with the key2sub() wrapper.
2021-02-21lei q: move augment into lei2mail workers
This is a step which will allow us to parallelize augment on Maildir and IMAP.
2021-02-19t/lei-externals: favor "-o format:$PATHNAME" over "-f"
It'll be less ambiguous for inputs with "lei convert" and "lei import" cf. https://public-inbox.org/meta/20210217044032.GA17934@dcvr/
2021-02-11search: use git approxidate in WWW and "lei q --stdin"
This greatly improves the usability of d:, dt:, and rt: search prefixes for users already familiar git's "approxidate" feature. That is, users familiar with the --(since|after|until|before)= options in git-log(1) and similar commands will be able to use those dates in the WWW UI.
2021-02-10lei ls-external: support --local and --remote
Similar to "lei q", "--local" means only local and "--remote" means remote only. I can't think of a reason to have --no-* variants for these switches. There's also updates to the TestCommon for more common lei cases.
2021-02-07tests: guard setup_public_inboxes for SQLite and Xapian
This will need some work to before it's generally applicable to the rest of our code base.
2021-02-07t/tests: split out setup_public_inboxes sub
We'll probably use this in many more existing places and likely change non-lei tests to use it.
2021-02-07t/lei-externals: split out into separate test
This is still overloaded with "lei q" stuff, but that's somewhat inevitable.