tests: stabilize `test-extdiff.t` on macOS stable
authorMatt Harbison <matt_harbison@yahoo.com>
Fri, 01 Nov 2024 16:22:40 -0400
branchstable
changeset 52153 a81d2cafdbcc
parent 52151 0de1895c2218
child 52154 6ca0771b32ef
tests: stabilize `test-extdiff.t` on macOS The recent change in the extdiff extension to take into account whether the GUI is accessible in d1b54c152673 started triggering this. I was able to run the test cleanly without this change at the console, but somewhere along the line, I read that the CI runner isn't able to access the GUI when not run as the root user. This is causing CI failures, so we conditionalize these tests out where `DISPLAY` is set to a non empty value to force `procutil.isgui()` to be True, when it in fact doesn't have GUI access.
tests/test-extdiff.t
--- a/tests/test-extdiff.t	Sun Oct 27 23:34:50 2024 +0100
+++ b/tests/test-extdiff.t	Fri Nov 01 16:22:40 2024 -0400
@@ -167,6 +167,7 @@
   [255]
 #endif
 
+#if gui
 Test --per-file option for gui tool:
 
   $ DISPLAY=fake hg --config extdiff.gui.alabalaf=True alabalaf -c 6 --per-file --debug
@@ -198,6 +199,7 @@
   running '* diffing * *' in * (backgrounded) (glob)
   cleaning up temp directory
   [1]
+#endif
 
 Test --per-file and --confirm options: