summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2019-08-06 15:18:35 (GMT)
committerMats Wichmann <mats@linux.com>2019-08-06 15:20:17 (GMT)
commit98f7ea66039cec1acf8c648dca9b91ec2a5fc14c (patch)
tree53b8ed04978c8ae31edc93058afee2635bfd6307
parentfac1d00ca5d7cd87e13476c381c63028d05ad9ae (diff)
downloadSCons-98f7ea66039cec1acf8c648dca9b91ec2a5fc14c.zip
SCons-98f7ea66039cec1acf8c648dca9b91ec2a5fc14c.tar.gz
SCons-98f7ea66039cec1acf8c648dca9b91ec2a5fc14c.tar.bz2
do some debugging on tar bz2 and xz formats
Don't merge this one: it has debug stuff in it, and eliminates most appveyor builds Signed-off-by: Mats Wichmann <mats@linux.com>
-rw-r--r--.appveyor.yml6
-rw-r--r--test/packaging/guess-package-name.py23
-rw-r--r--test/packaging/tar/bz2_packaging.py7
-rw-r--r--test/packaging/tar/xz_packaging.py7
4 files changed, 33 insertions, 10 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
index 5805f5f..8b6dd28 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -143,12 +143,18 @@ matrix:
WINPYTHON: "Python36"
- image: Visual Studio 2015
WINPYTHON: "Python37"
+ # quick test: skip all
+ - image: Visual Studio 2015
+ WINPYTHON: "Python35"
# test python 2.7, 3.6 on Visual Studio 2017 image
- image: Visual Studio 2017
WINPYTHON: "Python35"
- image: Visual Studio 2017
WINPYTHON: "Python37"
+ # quick test: skip 2.7 as well
+ - image: Visual Studio 2017
+ WINPYTHON: "Python27"
# test python 3.7 on Visual Studio 2019 image
- image: Visual Studio 2019
diff --git a/test/packaging/guess-package-name.py b/test/packaging/guess-package-name.py
index 8ba4c9e..fa69595 100644
--- a/test/packaging/guess-package-name.py
+++ b/test/packaging/guess-package-name.py
@@ -33,6 +33,8 @@ Also overriding this default package name is tested
Furthermore that targz is the default packager is tested.
"""
+import sys
+
import TestSCons
python = TestSCons.python
@@ -88,8 +90,13 @@ test.must_exist('src.tar.gz')
#
# TEST: default package name creation with overridden packager.
#
+# 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.write('SConstruct', """
+bz2 = test.where_is('bzip2')
+if bz2:
+ test.write('SConstruct', """
env=Environment(tools=['default', 'packaging'])
env.Program( 'src/main.c' )
env.Package( NAME = 'libfoo',
@@ -98,15 +105,19 @@ env.Package( NAME = 'libfoo',
source = [ 'src/main.c', 'SConstruct' ] )
""")
-test.run(stderr=None)
+ test.run(stderr=None)
-test.must_exist('libfoo-1.2.3.tar.bz2')
+ test.must_exist('libfoo-1.2.3.tar.bz2')
#
# TEST: default package name creation with another packager.
#
+# Windows 10 since at least 1803 supplies bsdtar, so tool
+# detection will find it - but it doesn't support xz
+# compression so test using it will fail. As a hack, just skip.
-test.write('SConstruct', """
+if sys.platform != 'win32':
+ test.write('SConstruct', """
env=Environment(tools=['default', 'packaging'])
env.Program( 'src/main.c' )
env.Package( NAME = 'libfoo',
@@ -115,9 +126,9 @@ env.Package( NAME = 'libfoo',
source = [ 'src/main.c', 'SConstruct' ] )
""")
-test.run(stderr=None)
+ test.run(stderr=None)
-test.must_exist('libfoo-1.2.3.tar.xz')
+ test.must_exist('libfoo-1.2.3.tar.xz')
test.pass_test()
diff --git a/test/packaging/tar/bz2_packaging.py b/test/packaging/tar/bz2_packaging.py
index 875f1c9..9026eb0 100644
--- a/test/packaging/tar/bz2_packaging.py
+++ b/test/packaging/tar/bz2_packaging.py
@@ -40,8 +40,11 @@ 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')
+#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))
test.subdir('src')
diff --git a/test/packaging/tar/xz_packaging.py b/test/packaging/tar/xz_packaging.py
index f12292e..62ca8bf 100644
--- a/test/packaging/tar/xz_packaging.py
+++ b/test/packaging/tar/xz_packaging.py
@@ -40,8 +40,11 @@ if not tar:
test.skip_test('tar not found, skipping test\n')
xz = test.where_is('xz')
-if not xz:
- test.skip_test('tar found, but helper xz not found, skipping test\n')
+#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))
test.subdir('src')