Skip to content

Allowlist in glob style#142

Merged
apatard merged 8 commits intopycontribs:mainfrom
konstruktoid:toxallowlist
Dec 6, 2022
Merged

Allowlist in glob style#142
apatard merged 8 commits intopycontribs:mainfrom
konstruktoid:toxallowlist

Conversation

@konstruktoid
Copy link
Collaborator

@konstruktoid konstruktoid commented Dec 5, 2022

Set allowlist_externals to sh, /home/runner/work/python-vagrant/python-vagrant/tests/tools/create_dummy_box.sh and /Users/runner/work/python-vagrant/python-vagrant/tests/tools/create_dummy_box.sh

See https://github.com/pycontribs/python-vagrant/actions/runs/3622456363/jobs/6107188602#step:10:21 and https://tox.wiki/en/latest/config.html#allowlist_externals

Signed-off-by: Thomas Sjögren konstruktoid@users.noreply.github.com

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
@apatard
Copy link
Collaborator

apatard commented Dec 6, 2022

Is there any way to not hardcode the path ?
For instance, if someone (you ? me ? ) runs the testsuite locally, I fear the path will be wrong and the failure will happen.

@konstruktoid
Copy link
Collaborator Author

It worked and works for me locally (tm).

py run-test-pre: PYTHONHASHSEED='2634314539'
py run-test-pre: commands[0] | /Users/thomas.sjogren/Git/python-vagrant/tests/tools/create_dummy_box.sh virtualbox
+++ dirname /Users/thomas.sjogren/Git/python-vagrant/tests/tools/create_dummy_box.sh
++ cd /Users/thomas.sjogren/Git/python-vagrant/tests/tools
++ pwd
+ DIR=/Users/thomas.sjogren/Git/python-vagrant/tests/tools
+ PROVIDER=virtualbox
++ mktemp -d
+ TMPDIR=/var/folders/2j/8m_c9kxs0337lp_7s6h6prv80000gp/T/tmp.gF8xBGZSaC
+ '[' 1 -ne 1 ']'
+ '[' -f /Users/thomas.sjogren/Git/python-vagrant/tests/tools/dummy-virtualbox.box ']'
+ cd /var/folders/2j/8m_c9kxs0337lp_7s6h6prv80000gp/T/tmp.gF8xBGZSaC
+ echo '{ "provider": "virtualbox"}'
+ tar czf /Users/thomas.sjogren/Git/python-vagrant/tests/tools/dummy-virtualbox.box .
+ cd /Users/thomas.sjogren/Git/python-vagrant/tests/tools
+ rm -rvf /var/folders/2j/8m_c9kxs0337lp_7s6h6prv80000gp/T/tmp.gF8xBGZSaC
removed '/var/folders/2j/8m_c9kxs0337lp_7s6h6prv80000gp/T/tmp.gF8xBGZSaC/metadata.json'
removed directory '/var/folders/2j/8m_c9kxs0337lp_7s6h6prv80000gp/T/tmp.gF8xBGZSaC'
py run-test-pre: commands[1] | /Users/thomas.sjogren/Git/python-vagrant/tests/tools/create_dummy_box.sh libvirt
+++ dirname /Users/thomas.sjogren/Git/python-vagrant/tests/tools/create_dummy_box.sh
++ cd /Users/thomas.sjogren/Git/python-vagrant/tests/tools
++ pwd
+ DIR=/Users/thomas.sjogren/Git/python-vagrant/tests/tools
+ PROVIDER=libvirt
++ mktemp -d
+ TMPDIR=/var/folders/2j/8m_c9kxs0337lp_7s6h6prv80000gp/T/tmp.2rpvdTs3m2
+ '[' 1 -ne 1 ']'
+ '[' -f /Users/thomas.sjogren/Git/python-vagrant/tests/tools/dummy-libvirt.box ']'
+ echo 'Box already created'
Box already created
+ exit 0

@konstruktoid
Copy link
Collaborator Author

My bad, when recreating the environment it failed.

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
@konstruktoid
Copy link
Collaborator Author

7 commits for 1 LoC... but lets try that glob again.

@ssbarnea ssbarnea changed the title allowlist in glob style Allowlist in glob style Dec 6, 2022
@apatard apatard merged commit 592916d into pycontribs:main Dec 6, 2022
@ssbarnea ssbarnea removed the bug label Dec 6, 2022
@konstruktoid konstruktoid deleted the toxallowlist branch December 6, 2022 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants