diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cf31610386c..f9d4d4d8092 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -92,3 +92,9 @@ jobs: env: GH_TOKEN: ${{github.token}} if: steps.release.outputs.release_created + + distcheck-macos: + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + - run: env PYTESTFLAGS="--verbose -p no:cacheprovider --color=yes" test/macos-script.sh diff --git a/test/macos-script.sh b/test/macos-script.sh new file mode 100755 index 00000000000..6cc067e4149 --- /dev/null +++ b/test/macos-script.sh @@ -0,0 +1,26 @@ +#!/bin/sh -eux + +# Note that this script is intended to be run only in throwaway environments; +# it may install undesirable things to system locations (if it succeeds in +# that). + +brew install \ + automake \ + bash + +oldpwd=$(pwd) + +python3 -m venv venv +#shellcheck disable=SC1091 +source venv/bin/activate +python3 -m pip install -r test/requirements.txt + +export bashcomp_bash=bash +env + +autoreconf -i +./configure +make -j + +make distcheck \ + PYTESTFLAGS="${PYTESTFLAGS---verbose -p no:cacheprovider --numprocesses=auto --dist=loadfile}" diff --git a/test/t/conftest.py b/test/t/conftest.py index 8d38d873990..bbd6b1abb36 100644 --- a/test/t/conftest.py +++ b/test/t/conftest.py @@ -951,7 +951,9 @@ def prepare_fixture_dir( the tarball. This is to work better with case insensitive file systems. """ tempdir = Path(tempfile.mkdtemp(prefix="bash-completion-fixture-dir")) - request.addfinalizer(lambda: shutil.rmtree(str(tempdir))) + request.addfinalizer( + lambda: shutil.rmtree(str(tempdir), ignore_errors=True) + ) old_cwd = os.getcwd() try: