summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2019-08-07 20:06:02 (GMT)
committerMats Wichmann <mats@linux.com>2019-08-07 20:06:02 (GMT)
commit5c80940361e30b354917b26d8ba68ea1b9d13f23 (patch)
treec1aeaf2cb2fdefd16397fad83acec62be5bbc8b6
parent98f7ea66039cec1acf8c648dca9b91ec2a5fc14c (diff)
downloadSCons-5c80940361e30b354917b26d8ba68ea1b9d13f23.zip
SCons-5c80940361e30b354917b26d8ba68ea1b9d13f23.tar.gz
SCons-5c80940361e30b354917b26d8ba68ea1b9d13f23.tar.bz2
skip certain tar-pkg tests on win32 [travis skip]
Signed-off-by: Mats Wichmann <mats@linux.com>
-rw-r--r--test/packaging/guess-package-name.py5
-rw-r--r--test/packaging/tar/bz2_packaging.py19
-rw-r--r--test/packaging/tar/xz_packaging.py10
3 files changed, 20 insertions, 14 deletions
diff --git a/test/packaging/guess-package-name.py b/test/packaging/guess-package-name.py
index fa69595..1786c11 100644
--- a/test/packaging/guess-package-name.py
+++ b/test/packaging/guess-package-name.py
@@ -92,10 +92,9 @@ test.must_exist('src.tar.gz')
#
# Windows 10 since at least 1803 supplies bsdtar, so tool
# detection will find it - but doesn't supply bzip2, so a
-# test using it will fail. Check for bzip2 first.
+# test using it will fail. As a hack, just skip.
-bz2 = test.where_is('bzip2')
-if bz2:
+if sys.platform != 'win32':
test.write('SConstruct', """
env=Environment(tools=['default', 'packaging'])
env.Program( 'src/main.c' )
diff --git a/test/packaging/tar/bz2_packaging.py b/test/packaging/tar/bz2_packaging.py
index 9026eb0..812c08e 100644
--- a/test/packaging/tar/bz2_packaging.py
+++ b/test/packaging/tar/bz2_packaging.py
@@ -31,6 +31,9 @@ This tests the SRC bz2 packager, which does the following:
import TestSCons
+import os
+import sys
+
python = TestSCons.python
test = TestSCons.TestSCons()
@@ -39,12 +42,16 @@ tar = test.detect('TAR', 'tar')
if not tar:
test.skip_test('tar not found, skipping test\n')
-bz2 = test.where_is('bzip2')
-#if not bz2:
-# test.skip_test('tar found, but helper bzip2 not found, skipping test\n')
-
-tar = test.where_is('tar')
-test.skip_test('DEBUG: found TAR at %s, BZIP2 at %s\n' % (tar, bz2))
+if sys.platform == 'win32':
+ # windows 10 causes fresh problems by supplying a tar, not bzip2
+ # but if git is installed, there's a bzip2 there, but can't be used
+ bz2 = test.where_is('bzip2')
+ if not bz2:
+ test.skip_test('tar found, but helper bzip2 not found, skipping test\n')
+ bz2 = os.path.splitdrive(bz2)[1]
+ tar = os.path.splitdrive(test.where_is('tar'))[1]
+ if tar[:8] != bz2[:8]: # catch one in \WINDOWS, one not
+ test.skip_test('tar found, but usable bzip2 not, skipping test\n')
test.subdir('src')
diff --git a/test/packaging/tar/xz_packaging.py b/test/packaging/tar/xz_packaging.py
index 62ca8bf..1d80f7f 100644
--- a/test/packaging/tar/xz_packaging.py
+++ b/test/packaging/tar/xz_packaging.py
@@ -39,12 +39,12 @@ tar = test.detect('TAR', 'tar')
if not tar:
test.skip_test('tar not found, skipping test\n')
+# Windows 10 now supplies tar, but doesn't support xz compression
+# assume it's just okay to check for an xz command, because don't
+# want to probe the command itself to see what it supports
xz = test.where_is('xz')
-#if not xz:
-# test.skip_test('tar found, but helper xz not found, skipping test\n')
-
-tar = test.where_is('tar')
-test.skip_test('DEBUG: found TAR at %s, XZ at %s\n' % (tar, xz))
+if not xz:
+ test.skip_test('tar found, but helper xz not found, skipping test\n')
test.subdir('src')