Skip to content

Commit

Permalink
Fix Windows-only test
Browse files Browse the repository at this point in the history
  • Loading branch information
mosteo committed Sep 4, 2023
1 parent dcf2e80 commit 696a47b
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions testsuite/tests/index/external-msys2/test.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
"""
Test that installing msys2 dependency work as expected.
Test that installing msys2 dependency work as expected. The existence of the
'dialog' command is checked in a post-fetch action.
"""

from drivers.alr import run_alr

import os
import platform
from glob import glob

from drivers.alr import run_alr

if platform.system() == 'Windows':
# Should silently retrieve everything
p = run_alr('--non-interactive', '-v', 'get', 'main',
quiet=False, debug=True)
run_alr('get', 'main')
os.chdir(glob('main*')[0])

# Trigger post-fetch
p = run_alr('build', 'main',
quiet=False, debug=True, complain_on_error=False)

checks = 0
for line in p.out.splitlines():
Expand All @@ -19,4 +26,7 @@

assert checks == 1, 'Only %d match in the output : "%s"' % (checks, p.out)

print('SUCCESS')
print('SUCCESS')

else:
print('SKIP: test is Windows-only')

0 comments on commit 696a47b

Please sign in to comment.