From 067ac2b4b793bd45cb3595ef311553ede59aa236 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Fri, 10 Apr 2020 20:36:24 -0700 Subject: Fix tar bz2 test so it won't crash when no bzip2 is present --- test/packaging/tar/bz2_packaging.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/packaging/tar/bz2_packaging.py b/test/packaging/tar/bz2_packaging.py index 3c1afe3..0c8dcea 100644 --- a/test/packaging/tar/bz2_packaging.py +++ b/test/packaging/tar/bz2_packaging.py @@ -44,7 +44,6 @@ if not tar: test.skip_test('tar not found, skipping test\n') bz2 = test.where_is('bzip2') -bz2_path = os.path.dirname(bz2) if sys.platform == 'win32': # windows 10 causes fresh problems by supplying a tar, not bzip2 @@ -56,6 +55,9 @@ if sys.platform == 'win32': if tar[:8] != bz2[:8]: # catch one in \WINDOWS, one not test.skip_test('tar found, but usable bzip2 not, skipping test\n') +bz2_path = os.path.dirname(bz2) + + test.subdir('src') test.write([ 'src', 'main.c'], r""" -- cgit v0.12