Skip to content
Snippets Groups Projects
  1. Nov 08, 2024
  2. Nov 06, 2024
  3. Nov 04, 2024
    • Matt Harbison's avatar
      tests: treat `select` as a built-in module on Windows · 3ba998d7
      Matt Harbison authored
      This fixes:
      
          --- C:/Users/Matt/hg/tests/test-check-module-imports.t
          +++ C:/Users/Matt/hg/tests/test-check-module-imports.t.err
          @@ -43,3 +43,15 @@
             > -X tests/test-verify-repo-operations.py \
             > -X tests/test-extension.t \
             > | sed 's-\\-/-g' | "$PYTHON" "$import_checker" -
          +  hgext/zeroconf/Zeroconf.py:86: stdlib import "socket" follows local import: select\r (esc)
          +  hgext/zeroconf/Zeroconf.py:87: stdlib import "struct" follows local import: select\r (esc)
          +  hgext/zeroconf/Zeroconf.py:88: stdlib import "threading" follows local import: select\r (esc)
          +  hgext/zeroconf/Zeroconf.py:89: stdlib import "time" follows local import: select\r (esc)
          +  hgext/zeroconf/Zeroconf.py:90: stdlib import "traceback" follows local import: select\r (esc)
          +  mercurial/posix.py:18: stdlib import "stat" follows local import: select\r (esc)
          +  mercurial/posix.py:19: stdlib import "sys" follows local import: select\r (esc)
          +  mercurial/posix.py:20: stdlib import "tempfile" follows local import: select\r (esc)
          +  mercurial/posix.py:21: stdlib import "typing" follows local import: select\r (esc)
          +  tests/tinyproxy.py:19: stdlib import "socket" follows local import: select\r (esc)
          +  tests/tinyproxy.py:20: stdlib import "sys" follows local import: select\r (esc)
          +  [1]
      
          ERROR: test-check-module-imports.t output changed
      3ba998d7
  4. Oct 25, 2024
    • Matt Harbison's avatar
      ci: add a runner for Windows 10 · 8766d47e
      Matt Harbison authored
      This is currently only manually invoked, and allows for failure because we only
      have a single runner that takes over 2h for a full run, and there are a handful
      of flakey tests, plus 3 known failing tests.
      
      The system being used here is running MSYS, Python, Visual Studio, etc, as
      installed by `install-windows-dependencies.ps1`.  This script installs
      everything to a specific directory instead of using the defaults, so we adjust
      the MinGW shell path to compensate.  Additionally, the script doesn't install
      the launcher `py.exe`.  It is possible to adjust the script to install it, but
      it's an option to an existing python install (instead of a standalone installer),
      and I've had the whole python install fail and rollback when requested to install
      the launcher if it detects a newer one is already installed.  In short, it is
      a point of failure for a feature we don't (yet?) need.
      
      Unlike other systems where the intepreter name includes the version, everything
      here is `python.exe`, so they can't all exist on `PATH` and let the script
      choose the desired one.  (The `py.exe` launcher would accomplish, using the
      registry instead of `PATH`, but that wouldn't allow for venv installs.)  Because
      of this, switch to the absolute path of the python interpreter to be used (in
      this case a venv created from the py39 install, which is old, but what both
      pyoxidizer and TortoiseHg currently use).
      
      The `RUNTEST_ARGS` hardcodes `-j8` because this system has 4 cores, and
      therefore runs 4 parallel tests by default.  However on Windows, using more
      parallel tests than cores results in better performance for whatever reason.  I
      don't have an optimal value yet (ideally the runner itself can make the
      adjustment on Windows), but this results in saving ~15m on a full run that
      otherwise takes ~2.5h.  I'm also not concerned about how it would affect other
      Windows machines, because we don't have any at this point, and I have no idea
      when we can get more.
      
      As far as system setup goes, the CI is run by a dedicated user that lacks admin
      rights.  The install script was run by an admin user, and then the standard user
      was configured to use it.  If I set this up again, I'd probably give the
      dedicated user admin rights to run the install script, and reset to standard
      user rights when done.  The python intepreter failed in weird ways when run by
      the standard user until it was manually reinstalled by the standard user:
      
          Fatal Python error: init_fs_encoding: failed to get the Python codec of the
              filesystem encoding
      
      Additionally, changing the environment through the Windows UI prompts to
      escalate to an admin user, and then setting the user level environment variables
      like `TEMP` and `PATH` (to try to avoid exceeding the 260 character path limit)
      didn't actually change the user's environment.  (Likely it changed the admin
      user's environment, but I didn't confirm that.)  I ended up having to use the
      registry editor for the standard user to make those changes.
      8766d47e
  5. Oct 27, 2024
  6. Oct 26, 2024
  7. Oct 22, 2024
  8. Oct 21, 2024
  9. Oct 19, 2024
  10. Oct 14, 2024
  11. Oct 08, 2024
    • Matt Harbison's avatar
      ci: add a runner for macos · 941141c2
      Matt Harbison authored
      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.
      941141c2
  12. Oct 13, 2024
    • Pierre Augier's avatar
      format: fix few black issues · e3952d8c
      Pierre Augier authored
      e3952d8c
    • Pierre-Yves David's avatar
      ci: display tool version more selectively · 22a50b79
      Pierre-Yves David authored
      The goal here is to avoid showing tool version in all case as this create issue
      for non linux/docker runner that might not have some of them installed. This is
      currently relevant for the coming mac runner that does not have clang-format
      installed and does not needs its.
      
      This might also be useful in the future to use narrower docker image more specialized
      for each jobs.
      22a50b79
  13. Oct 10, 2024
  14. Oct 08, 2024
  15. Sep 19, 2024
  16. Sep 10, 2024
  17. Aug 28, 2024
    • Pierre-Yves David's avatar
      ci: add the option to test more Python versions · 243e805e
      Pierre-Yves David authored
      It seems like a good idea to be able to test the lowest version we support. And
      there have been enougth issue with 3.12 that we need to be able to make sur we
      do not break it. We should probably get a matrix setup for more version and
      flavor, but that is a simple and efficient start.
      243e805e
  18. Sep 10, 2024
  19. Aug 20, 2024
  20. Aug 04, 2024
  21. Jul 25, 2024
  22. Jul 23, 2024
Loading