tests: hopefully fix `test-doctest.py` on Windows and more
1. Shell syntax understood by `shell=True` depends on the platform.
Instead, pass `shell=False` and call `sh` explicitly to interpret
the command correctly.
2. Stop setting `HGRCPATH=/dev/null`, so the setting
`experimental.evolution=createmarkers` is set correctly.
The reason I set HGRCPATH to /dev/null previously is because of
misunderstanding where I thought the Python script had no HGRC to edit.
As it turns out, there is in fact a valid temporary HGRC pointed to by
HGRCPATH in this context so we don't seem to need this. /shrug
--- a/tests/test-doctest.py Sat Oct 26 13:56:46 2024 -0400
+++ b/tests/test-doctest.py Mon Oct 07 12:08:48 2024 +0100
@@ -72,9 +72,13 @@
sys.exit(0)
files = subprocess.check_output(
- "HGRCPATH=/dev/null . helpers-testrepo.sh; testrepohg files --print0 \"%s\""
- % fileset,
- shell=True,
+ [
+ "sh",
+ "-c",
+ "set -e; . helpers-testrepo.sh; testrepohg files --print0 \"%s\""
+ % fileset,
+ ],
+ shell=False,
cwd=cwd,
).split(b'\0')