From 39d873ea2789008bb153026d730c3a6541331be4 Mon Sep 17 00:00:00 2001 From: William Blevins Date: Sun, 15 May 2016 13:13:31 +0100 Subject: Fixed Fortran tests which were throughing missing include directory warning. Warning added in gcc5. --- test/Fortran/F77FLAGS.py | 5 ++++- test/Fortran/FORTRANFLAGS.py | 5 ++++- test/Fortran/SHF77FLAGS.py | 5 ++++- test/Fortran/SHFORTRANFLAGS.py | 5 ++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/test/Fortran/F77FLAGS.py b/test/Fortran/F77FLAGS.py index b708f9e..342adac 100644 --- a/test/Fortran/F77FLAGS.py +++ b/test/Fortran/F77FLAGS.py @@ -77,6 +77,9 @@ g77 = test.detect_tool(fc) if g77: + directory = 'x' + test.subdir(directory) + test.write("wrapper.py", """import os import sys @@ -87,7 +90,7 @@ os.system(" ".join(sys.argv[1:])) test.write('SConstruct', """ foo = Environment(F77 = '%(fc)s', tools = ['default', 'f77'], F77FILESUFFIXES = [".f"]) f77 = foo.Dictionary('F77') -bar = foo.Clone(F77 = r'%(_python_)s wrapper.py ' + f77, F77FLAGS = '-Ix') +bar = foo.Clone(F77 = r'%(_python_)s wrapper.py ' + f77, F77FLAGS = '-I%(directory)s') foo.Program(target = 'foo', source = 'foo.f') bar.Program(target = 'bar', source = 'bar.f') """ % locals()) diff --git a/test/Fortran/FORTRANFLAGS.py b/test/Fortran/FORTRANFLAGS.py index 8c5e781..150000a 100644 --- a/test/Fortran/FORTRANFLAGS.py +++ b/test/Fortran/FORTRANFLAGS.py @@ -95,6 +95,9 @@ g77 = test.detect_tool(fc) if g77: + directory = 'x' + test.subdir(directory) + test.write("wrapper.py", """import os import sys @@ -105,7 +108,7 @@ os.system(" ".join(sys.argv[1:])) test.write('SConstruct', """ foo = Environment(FORTRAN = '%(fc)s') f77 = foo.Dictionary('FORTRAN') -bar = foo.Clone(FORTRAN = r'%(_python_)s wrapper.py ' + f77, FORTRANFLAGS = '-Ix') +bar = foo.Clone(FORTRAN = r'%(_python_)s wrapper.py ' + f77, FORTRANFLAGS = '-I%(directory)s') foo.Program(target = 'foo', source = 'foo.f') bar.Program(target = 'bar', source = 'bar.f') """ % locals()) diff --git a/test/Fortran/SHF77FLAGS.py b/test/Fortran/SHF77FLAGS.py index 644b827..79e46f3 100644 --- a/test/Fortran/SHF77FLAGS.py +++ b/test/Fortran/SHF77FLAGS.py @@ -75,6 +75,9 @@ g77 = test.detect_tool(fc) if g77: + directory = 'x' + test.subdir(directory) + test.write("wrapper.py", """import os import sys @@ -87,7 +90,7 @@ foo = Environment(SHF77 = '%(fc)s') shf77 = foo.Dictionary('SHF77') bar = foo.Clone(SHF77 = r'%(_python_)s wrapper.py ' + shf77, tools = ["default", 'f77'], F77FILESUFFIXES = [".f"]) -bar.Append(SHF77FLAGS = '-Ix') +bar.Append(SHF77FLAGS = '-I%(directory)s') foo.SharedLibrary(target = 'foo/foo', source = 'foo.f') bar.SharedLibrary(target = 'bar/bar', source = 'bar.f') """ % locals()) diff --git a/test/Fortran/SHFORTRANFLAGS.py b/test/Fortran/SHFORTRANFLAGS.py index 11116f4..8e6f019 100644 --- a/test/Fortran/SHFORTRANFLAGS.py +++ b/test/Fortran/SHFORTRANFLAGS.py @@ -91,6 +91,9 @@ fortran = test.detect_tool(fc) if fortran: + directory = 'x' + test.subdir(directory) + test.write("wrapper.py", """import os import sys @@ -102,7 +105,7 @@ os.system(" ".join(sys.argv[1:])) foo = Environment(SHFORTRAN = '%(fc)s') shfortran = foo.Dictionary('SHFORTRAN') bar = foo.Clone(SHFORTRAN = r'%(_python_)s wrapper.py ' + shfortran) -bar.Append(SHFORTRANFLAGS = '-Ix') +bar.Append(SHFORTRANFLAGS = '-I%(directory)s') foo.SharedLibrary(target = 'foo/foo', source = 'foo.f') bar.SharedLibrary(target = 'bar/bar', source = 'bar.f') """ % locals()) -- cgit v0.12 From 6ea744952d40c63c98f8b04e1b9a8e7ce73992c3 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Sun, 15 May 2016 11:44:48 -0700 Subject: Update logic to pull files from mercurial --- bin/scons_dev_master.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/scons_dev_master.py b/bin/scons_dev_master.py index a8862ea..71842aa 100644 --- a/bin/scons_dev_master.py +++ b/bin/scons_dev_master.py @@ -11,7 +11,7 @@ import sys from Command import CommandRunner, Usage INITIAL_PACKAGES = [ - 'subversion', + 'mercurial', ] INSTALL_PACKAGES = [ @@ -123,7 +123,7 @@ Usage: scons_dev_master.py [-hnqy] [--password PASSWORD] [--username USER] buildbot Install packages for running BuildBot """ - scons_url = 'http://scons.tigris.org/svn/scons/trunk' + scons_url = 'https://bdbaddog@bitbucket.org/scons/scons' sudo = 'sudo' password = '""' username = 'guest' @@ -171,7 +171,7 @@ Usage: scons_dev_master.py [-hnqy] [--password PASSWORD] [--username USER] cmd.run('%(sudo)s apt-get %(yesflag)s upgrade') elif arg == 'checkout': cmd.run('%(sudo)s apt-get %(yesflag)s install %(initial_packages)s') - cmd.run('svn co --username guest --password "" %(scons_url)s') + cmd.run('hg clone" %(scons_url)s') elif arg == 'building': cmd.run('%(sudo)s apt-get %(yesflag)s install %(building_packages)s') elif arg == 'testing': -- cgit v0.12 From c5e30d23ebc878acb8e16e025b6f55aaab43f3a5 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Sun, 15 May 2016 12:27:51 -0700 Subject: change to handle py3 changes to byte/string for open().write() --- QMTest/TestCmd.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/QMTest/TestCmd.py b/QMTest/TestCmd.py index 198f586..2fba0a0 100644 --- a/QMTest/TestCmd.py +++ b/QMTest/TestCmd.py @@ -1731,7 +1731,11 @@ class TestCmd(object): file = self.canonicalize(file) if mode[0] != 'w': raise ValueError("mode must begin with 'w'") - open(file, mode).write(content) + try: + open(file, mode).write(content) + except TypeError as e: + # python 3 default strings are not bytes, but unicode + open(file, mode).write(bytes(content,'utf-8')) # Local Variables: # tab-width:4 -- cgit v0.12