ci: add a runner for macos
This is running from a venv, created with the packages from the requirements
file in the `test-setup-future-work` topic being discussed separately. We can
basically reuse the existing `test_c` configuration as-is, but there was one
small issue- if the clone from the previous CI run is still present in `/tmp`,
the clone for the current run fails. It's not a problem for the current setup
because a new container is instantiated, so the easy fix is to simply delete the
clone first. (The Windows CI avoids this by not cloning in the first place.)
It looks like it takes ~80m to run the whole test suite on the current system.
tests: use shlex.quote instead of pipes.quote
The pipes module got removed in python 3.13.
https://bugs.debian.org/1084553
branchmap-v3: make sure we write the cache after detecting pure-topo mode
We were properly detecting the pure topo-case but in some case the one disk
cache file was never updated with that information.
demande-import-test: use `wsgiref` instead of `telnetlib` for testing
The `telnetlib` module has been dropped in 3.13. The `wsgiref` module fit the
same purpose of being obscure and not imported yet.
hgdemandimport: add collections.abc to the ignore list because Python 3.13 rc3
It worked in Python 3.13 rc2, but something changed for rc3.
Now, when i18n.py imports typing and it touches collections.abc.Hashable , we
get:
ValueError: module object for collections.abc substituted in sys.modules during a lazy load
This seems to be a general problem, released in the final Python 3.13 . I have
not analyzed the problem in details.
We *could* work around the problem by disabling demand import of typing. But
that would effectively disable demand import of collections.abc too. Instead,
just disable demand import for collections.abc .
run-tests: include non-activated venv packages in `PYTHONPATH`
If a venv is activated since
afa9d73780e1, `hghave` would see the packages
installed in it, and enable related tests. If the python interpreter was
launched directly however, none of them were seen.
In addition to getting consistent behavior, it's also easier to manage in CI if
the venv doesn't need activation.
tests: allow optional output when `test-lfs-server` is sent SIGTERM
I guess this has only ever been tested on Windows, but on macOS, the test was
failing with changes like:
+++ /private/tmp/mercurial-ci/tests/test-lfs-test-server.t#git-server.err
@@ -858,6 +858,7 @@
(Restart the server in a different location so it no longer has the content)
$ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS
+ $TESTTMP.sh: line 153: 38639 Terminated: 15 lfs-test-server > lfs-server.log 2>&1
#if hg-server
$ cat $TESTTMP/access.log $TESTTMP/errors.log