-
Notifications
You must be signed in to change notification settings - Fork 401
Macos ci #1339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Macos ci #1339
Changes from 9 commits
85aa8ed
f399911
a3545ba
00b2cae
00f7d90
8074741
aaebd24
57a88fd
14c8dce
5d79137
e70aa46
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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,24 @@ | ||
| #!/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 | ||
|
|
||
| autoreconf -i | ||
| ./configure | ||
| make -j | ||
|
|
||
| make distcheck \ | ||
| PYTESTFLAGS="${PYTESTFLAGS---verbose -p no:cacheprovider --numprocesses=auto --dist=loadfile}" |
| 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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| import re | ||
|
|
||
| import pytest | ||
|
|
||
| from conftest import assert_bash_exec, bash_env_saved | ||
|
|
@@ -38,7 +40,8 @@ def test_5_brace(self, bash, functions): | |
|
|
||
| def test_6_glob(self, bash, functions): | ||
| output = assert_bash_exec(bash, "__tester 'a?b'", want_output=True) | ||
| assert output.strip() == "<a b><a$b><a&b><a'b>" | ||
| items = sorted(re.findall(r"<[^>]*>", output)) | ||
|
||
| assert "".join(items) == "<a b><a$b><a&b><a'b>" | ||
|
|
||
| def test_7_quote_1(self, bash, functions): | ||
| output = assert_bash_exec( | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| import os | ||
| import sys | ||
|
|
||
| import pytest | ||
|
|
||
|
|
@@ -33,7 +34,11 @@ def fixture_dir(self, request, bash): | |
| assert_bash_exec( | ||
| bash, "ln -sf ../prefix1/sbin/cmd2 %s/bin/cmd2" % tmpdir | ||
| ) | ||
| return str(tmpdir) | ||
| yield str(tmpdir) | ||
| if sys.platform == "darwin": | ||
| assert_bash_exec(bash, "sudo rm -rf %s/*" % tmpdir) | ||
|
||
| else: | ||
| assert_bash_exec(bash, "rm -rf %s/*" % tmpdir) | ||
|
|
||
| def test_userdir_1(self, bash, fixture_dir): | ||
| with bash_env_saved(bash) as bash_env: | ||
|
|
||
There was a problem hiding this comment.
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=yesneeded here? We don't seem to add it in Linux envs, but do get color nevertheless.