From b9e1d971c152a52663c3c87767848a9d716b7c2c Mon Sep 17 00:00:00 2001 From: Daniel Date: Sun, 27 Jan 2019 20:44:50 -0600 Subject: change default for AppendENVPath to not move existing paths --- src/engine/SCons/Environment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index 81d0e5a..152f0bc 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -1217,7 +1217,7 @@ class Base(SubstitutionEnvironment): return path def AppendENVPath(self, name, newpath, envname = 'ENV', - sep = os.pathsep, delete_existing=1): + sep = os.pathsep, delete_existing=0): """Append path elements to the path 'name' in the 'ENV' dictionary for this environment. Will only add any particular path once, and will normpath and normcase all paths to help -- cgit v0.12 From 8666b9e990a85fad8ef5c4d29f7d902947097db3 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sun, 27 Jan 2019 20:46:58 -0600 Subject: updated CHANGES.txt --- src/CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 94592f5..b563593 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -11,6 +11,10 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER - Whatever John Doe did. + From Daniel Moody: + - Change the default for AppendENVPath to delete_existing=0, so path + order will not be changed, unless explicitly set (Issue #3276) + From Mats Wichmann: - Quiet open file ResourceWarnings on Python >= 3.6 caused by not using a context manager around Popen.stdout -- cgit v0.12 From 53d22ee6ca4e9c78dc316fc144c8a0452ca677f1 Mon Sep 17 00:00:00 2001 From: Daniel Moody Date: Tue, 29 Jan 2019 16:07:20 -0600 Subject: switch coverage around to get actual build failures --- .travis.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index fb48776..3ab601a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,10 +14,17 @@ os: install: - ./.travis/install.sh -# pypy is not passing, but allow failures for coverage stage to be reached +# pypy is not passing atm, but still report build success for now +# allow coverage to fail, so we can still do testing for all platforms matrix: allow_failures: - - stage: Test + - python: pypy + - stage: Coverage + +# run coverage first as its still useful to collect +stages: + - Coverage + - Test jobs: include: -- cgit v0.12 From dd1fe67dbfb929a96c39248c65c97070d9962766 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 29 Jan 2019 22:09:30 -0600 Subject: update EnvironmentTest to work with new default --- src/engine/SCons/EnvironmentTests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py index 7cd6015..a72c173 100644 --- a/src/engine/SCons/EnvironmentTests.py +++ b/src/engine/SCons/EnvironmentTests.py @@ -1623,9 +1623,9 @@ def exists(env): env1.AppendENVPath('PATH',r'C:\dir\num\two', sep = ';') env1.AppendENVPath('PATH',r'C:\dir\num\three', sep = ';') env1.AppendENVPath('MYPATH',r'C:\mydir\num\three','MYENV', sep = ';') - env1.AppendENVPath('MYPATH',r'C:\mydir\num\one','MYENV', sep = ';') + env1.AppendENVPath('MYPATH',r'C:\mydir\num\one','MYENV', sep = ';', delete_existing=1) # this should do nothing since delete_existing is 0 - env1.AppendENVPath('MYPATH',r'C:\mydir\num\three','MYENV', sep = ';', delete_existing=0) + env1.AppendENVPath('MYPATH',r'C:\mydir\num\three','MYENV', sep = ';') assert(env1['ENV']['PATH'] == r'C:\dir\num\one;C:\dir\num\two;C:\dir\num\three') assert(env1['MYENV']['MYPATH'] == r'C:\mydir\num\two;C:\mydir\num\three;C:\mydir\num\one') -- cgit v0.12 From f4c1d1a8c06f5d259f3e05d525e5357d28d2bf75 Mon Sep 17 00:00:00 2001 From: Daniel Moody Date: Thu, 31 Jan 2019 09:58:47 -0600 Subject: limited the platforms tested and improved comments --- .appveyor.yml | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index b8f0913..466c72d 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -5,8 +5,7 @@ image: # - Ubuntu - Visual Studio 2015 - Visual Studio 2017 - - + cache: - downloads -> appveyor.yml - '%LOCALAPPDATA%\pip\Cache' @@ -42,7 +41,9 @@ install: - sh: ./.travis/install.sh - sh: printenv - +# build matrix will be number of images multiplied +# by each '-' below, split jobs into groups of 4 +# to avoid timeing out environment: matrix: - WINPYTHON: "Python27" @@ -129,13 +130,21 @@ environment: BUILD_JOB_NUM: 4 COVERAGE: 0 +# remove sets of build jobs based on critia below +# to fine tune the number and platforms tested matrix: exclude: - # test python 3.6 on Visual Studio 2015 image + # test python 3.5, 3.6 on Visual Studio 2015 image - image: Visual Studio 2015 WINPYTHON: "Python37" - image: Visual Studio 2015 + WINPYTHON: "Python27" + + # test python 2.7, 3.7 on Visual Studio 2015 image + - image: Visual Studio 2017 WINPYTHON: "Python35" + - image: Visual Studio 2017 + WINPYTHON: "Python36" # test python 3.7 on Ubuntu - image: Ubuntu @@ -145,6 +154,7 @@ matrix: - image: Ubuntu WINPYTHON: "Python36" +# remove some binaries we dont to be found before_build: - ps: | if ($isWindows) @@ -159,11 +169,12 @@ before_build: build: off build_script: - # get tests all tests + # get all tests into a list - cmd: "C:\\%WINPYTHON%\\python.exe runtest.py -l -a > all_tests.txt" - sh: python$PYTHON runtest.py -l -a > all_tests.txt - # setup coverage is set in environment + # setup coverage by creating the coverage config file, and adding coverage + # to the usercustomize so that all python processes start with coverage - ps: | if ($env:COVERAGE -eq 1){ $env:COVERAGE_PROCESS_START = "$($env:APPVEYOR_BUILD_FOLDER)/.coveragerc"; @@ -182,6 +193,7 @@ build_script: } $coveragercFile|Set-Content "$($env:COVERAGE_PROCESS_START)"; } + # setup portion of tests for this build job (1-4) - ps: | $TOTAL_BUILD_JOBS = 4; @@ -201,10 +213,12 @@ build_script: Add-Content -Path 'exclude_list.txt' -Value 'test\MSVS\vs-10.0-exec.py' } + # Windows run the tests # NOTE: running powershell from cmd on purpose because it formats the output # correctly - cmd: powershell -Command "& { if($env:COVERAGE -eq 1) { coverage run -p --rcfile=$($env:COVERAGE_PROCESS_START) runtest.py --exclude-list exclude_list.txt -f build_tests.txt } else { C:\\%WINPYTHON%\\python.exe runtest.py -j 2 --exclude-list exclude_list.txt -f build_tests.txt }; if($LastExitCode -eq 2 -Or $LastExitCode -eq 0) { $host.SetShouldExit(0 )} else {$host.SetShouldExit(1)}}" + # linux run the tests # unset JAVA_TOOL_OPTIONS because newer java prints this to stderr - sh: | unset JAVA_TOOL_OPTIONS @@ -214,7 +228,7 @@ build_script: python$PYTHON runtest.py -j 2 --exclude-list exclude_list.txt -f build_tests.txt || if [[ $? == 2 ]]; then true; else false; fi; fi - # run converage +# run converage even if there was a test failure on_finish: - ps: | if ($env:COVERAGE -eq 1) @@ -223,7 +237,7 @@ on_finish: & coverage report & coverage xml -o coverage_xml.xml } - # running in powershell causes an error so running in platform + # running codecov in powershell causes an error so running in platform # shells - cmd: if %COVERAGE% equ 1 codecov -X gcov --file coverage_xml.xml - sh: if [ $COVERAGE -eq 1 ]; then codecov -X gcov --file coverage_xml.xml; fi -- cgit v0.12