Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,11 @@ jobs:
GH_TOKEN: ${{github.token}}
RELEASE_PLEASE_TAG_NAME: ${{steps.release.outputs.tag_name}}
if: steps.release.outputs.release_created

distcheck-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- run: env PYTESTFLAGS="--verbose -p no:cacheprovider --color=yes" test/macos-script.sh
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to confirm, is --color=yes needed here? We don't seem to add it in Linux envs, but do get color nevertheless.

29 changes: 29 additions & 0 deletions test/macos-script.sh
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No that strong opinions, but perhaps we could take a look if it would become more messier than it's good for if we'd combine this with test/docker/entrypoint.sh with appropriate conditionals to avoid duplicating a bunch of things.

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/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

python3 -m venv venv
#shellcheck disable=SC1091
source venv/bin/activate
python3 -m pip install -r test/requirements.txt

export bashcomp_bash=bash
env
LC_ALL=C sort <<<$'python-dev\npython3-dev'
LC_COLLATE=C sort <<<$'python-dev\npython3-dev'
LC_ALL=en_US.UTF-8 sort <<<$'python-dev\npython3-dev'
LC_COLLATE=en_US.UTF-8 sort <<<$'python-dev\npython3-dev'


autoreconf -i
./configure
make -j

make distcheck \
PYTESTFLAGS="${PYTESTFLAGS---verbose -p no:cacheprovider --numprocesses=auto --dist=loadfile}"
2 changes: 1 addition & 1 deletion test/t/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ def startswith(self, prefix: str) -> bool:
return self.output.startswith(prefix)

def _items(self) -> List[str]:
return [x.strip() for x in self.output.strip().splitlines()]
return [x.strip() for x in self.output.strip().splitlines() if x]

def __eq__(self, expected: object) -> bool:
"""
Expand Down
2 changes: 1 addition & 1 deletion test/t/test_tar.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def test_24(self, completion):

# Test compression detection of gnu style options
@pytest.mark.complete("tar --extract --xz --file ", cwd="tar")
def test_25(self, completion):
def test_25(self, completion, gnu_tar):
assert completion == "archive.tar.xz dir/ dir2/".split()

# TODO: "tar tf escape.tar a/b"
7 changes: 1 addition & 6 deletions test/t/test_vipw.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import sys

import pytest


class TestVipw:
@pytest.mark.complete("vipw -", require_cmd=True)
def test_1(self, completion):
if sys.platform == "darwin":
assert not completion # takes no options
else:
assert completion
assert completion
2 changes: 2 additions & 0 deletions test/t/unit/test_unit_dequote.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ def test_5_brace(self, bash, functions):
assert output.strip() == "<a1><a2><a3>"

def test_6_glob(self, bash, functions):
LC_out = assert_bash_exec(bash, "env | grep LC_", want_output=True)
print(f"LC_ vars:\n\n{LC_out}\n")
output = assert_bash_exec(bash, "__tester 'a?b'", want_output=True)
assert output.strip() == "<a b><a$b><a&b><a'b>"

Expand Down
Loading