From 2252e4b3ca7cb9ee75e739cabceee6fd8d324476 Mon Sep 17 00:00:00 2001 From: Daniel Moody Date: Mon, 13 Aug 2018 16:08:21 -0500 Subject: use clang from local/bin instead of installing --- .travis.yml | 5 ++++- .travis/install.sh | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 58ca595..01c5eed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,9 @@ jobs: include: - &test_job stage: Test - script: python runtest.py -a || if [[ $? == 2 ]]; then true; else false; fi + script: + - export PATH=/usr/local/bin:$PATH + - python runtest.py -a || if [[ $? == 2 ]]; then true; else false; fi before_script: skip after_success: skip python: 2.7 @@ -67,6 +69,7 @@ jobs: - echo "coverage.process_startup()" | sudo tee --append ${PYSITEDIR}/usercustomize.py script: + - export PATH=/usr/local/bin:$PATH - export TOTAL_BUILD_JOBS=8 # write the coverage config file - export COVERAGE_PROCESS_START=$PWD/.coveragerc diff --git a/.travis/install.sh b/.travis/install.sh index 24735a8..d61872d 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -1,8 +1,6 @@ #!/usr/bin/env bash set -x -# dependencies for clang tests -sudo apt-get -y install clang # dependencies for gdc tests sudo apt-get -y install gdc # dependencies for docbook tests -- cgit v0.12 From 51704ca99e0787de2a6a6b7ba9502d2043b95546 Mon Sep 17 00:00:00 2001 From: Daniel Moody Date: Mon, 13 Aug 2018 16:26:28 -0500 Subject: testing symbolic links instead of messing with the environment --- .travis.yml | 86 +----------------------------------------------------- .travis/install.sh | 5 ++++ 2 files changed, 6 insertions(+), 85 deletions(-) diff --git a/.travis.yml b/.travis.yml index 01c5eed..2c2896d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,93 +19,9 @@ jobs: - &test_job stage: Test script: - - export PATH=/usr/local/bin:$PATH - - python runtest.py -a || if [[ $? == 2 ]]; then true; else false; fi + - python runtest.py test/Clang before_script: skip after_success: skip python: 2.7 env: PYVER=27 sudo: required - - - <<: *test_job - python: 3.5 - env: PYVER=35 - sudo: required - - - <<: *test_job - python: 3.6 - env: PYVER=36 - sudo: required - - - <<: *test_job - python: 3.7-dev - env: PYVER=37 - sudo: required - - - <<: *test_job - python: pypy - env: PYVER=pypy - sudo: required - - - - &coverage_jobs - stage: Coverage - - before_script: - - sudo pip install coverage - - sudo pip install coveralls - # set this ensure user sites are available - - export PYTHONNOUSERSITE= - # attempt to get a location where we can store the usercustomize.py file - - python -m site - - export PYSITEDIR=$(python -m site --user-site) - - sudo mkdir -p $PYSITEDIR - - sudo touch ${PYSITEDIR}/usercustomize.py - - export COVERAGE_FILE=$PWD/.coverage_file - # write the usercustomize.py file so all python processes use coverage and know where the config file is - - echo "import os" | sudo tee --append ${PYSITEDIR}/usercustomize.py - - echo "os.environ['COVERAGE_PROCESS_START'] = '$PWD/.coveragerc'" | sudo tee --append ${PYSITEDIR}/usercustomize.py - - echo "import coverage" | sudo tee --append ${PYSITEDIR}/usercustomize.py - - echo "coverage.process_startup()" | sudo tee --append ${PYSITEDIR}/usercustomize.py - - script: - - export PATH=/usr/local/bin:$PATH - - export TOTAL_BUILD_JOBS=8 - # write the coverage config file - - export COVERAGE_PROCESS_START=$PWD/.coveragerc - - echo "[run]" >> .coveragerc - - echo "source = $PWD/src" >> .coveragerc - - echo "parallel = True" >> .coveragerc - - printf "omit =\n\t*Tests.py\n\tsrc/test_*\n\tsrc/setup.py\n\n" >> .coveragerc - - echo "[path] = $PWD" >> .coveragerc - # get a list of all the tests to split them up - - python runtest.py -l -a > all_tests - - let "start = ($(wc -l < all_tests) / ${TOTAL_BUILD_JOBS}) * (${BUILD_JOB_NUM} - 1)"; true; - - let "end = ($(wc -l < all_tests) / ${TOTAL_BUILD_JOBS}) * ${BUILD_JOB_NUM}" - - if (( ${BUILD_JOB_NUM} == ${TOTAL_BUILD_JOBS} )); then end=$(wc -l < all_tests); fi - - if (( ${start} == 0 )); then start=1; fi - - sed -n ${start},${end}p all_tests > build_tests - - coverage run -p --rcfile=$PWD/.coveragerc runtest.py -f build_tests || if [[ $? == 2 ]]; then true; else false; fi - - after_success: - - coverage combine - - coverage report - - coveralls --rcfile=$PWD/.coveragerc - - env: BUILD_JOB_NUM=1 - - - <<: *coverage_jobs - env: BUILD_JOB_NUM=2 - - <<: *coverage_jobs - env: BUILD_JOB_NUM=3 - - <<: *coverage_jobs - env: BUILD_JOB_NUM=4 - - <<: *coverage_jobs - env: BUILD_JOB_NUM=5 - - <<: *coverage_jobs - env: BUILD_JOB_NUM=6 - - <<: *coverage_jobs - env: BUILD_JOB_NUM=7 - - <<: *coverage_jobs - env: BUILD_JOB_NUM=8 - diff --git a/.travis/install.sh b/.travis/install.sh index d61872d..e404499 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -1,6 +1,11 @@ #!/usr/bin/env bash set -x +sudo ln -s /usr/local/bin/clang /usr/bin/clang +sudo ln -s /usr/local/bin/clang++ /usr/bin/clang++ + +return + # dependencies for gdc tests sudo apt-get -y install gdc # dependencies for docbook tests -- cgit v0.12 From 0690e461007d2ffdf77740c3c4d88f34115d33b1 Mon Sep 17 00:00:00 2001 From: Daniel Moody Date: Mon, 13 Aug 2018 16:41:06 -0500 Subject: using the correct path --- .travis/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis/install.sh b/.travis/install.sh index e404499..8b51bec 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash set -x -sudo ln -s /usr/local/bin/clang /usr/bin/clang -sudo ln -s /usr/local/bin/clang++ /usr/bin/clang++ +sudo ln -s /usr/local/clang-5.0.0/bin/clang /usr/bin/clang +sudo ln -s /usr/local/clang-5.0.0/bin/clang++ /usr/bin/clang++ return -- cgit v0.12 From 2677cc2b860128928efee8897b42caad6e7ba8cd Mon Sep 17 00:00:00 2001 From: Daniel Moody Date: Mon, 13 Aug 2018 16:49:46 -0500 Subject: reverting travis back to master --- .travis.yml | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 83 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2c2896d..58ca595 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,10 +18,91 @@ jobs: include: - &test_job stage: Test - script: - - python runtest.py test/Clang + script: python runtest.py -a || if [[ $? == 2 ]]; then true; else false; fi before_script: skip after_success: skip python: 2.7 env: PYVER=27 sudo: required + + - <<: *test_job + python: 3.5 + env: PYVER=35 + sudo: required + + - <<: *test_job + python: 3.6 + env: PYVER=36 + sudo: required + + - <<: *test_job + python: 3.7-dev + env: PYVER=37 + sudo: required + + - <<: *test_job + python: pypy + env: PYVER=pypy + sudo: required + + + - &coverage_jobs + stage: Coverage + + before_script: + - sudo pip install coverage + - sudo pip install coveralls + # set this ensure user sites are available + - export PYTHONNOUSERSITE= + # attempt to get a location where we can store the usercustomize.py file + - python -m site + - export PYSITEDIR=$(python -m site --user-site) + - sudo mkdir -p $PYSITEDIR + - sudo touch ${PYSITEDIR}/usercustomize.py + - export COVERAGE_FILE=$PWD/.coverage_file + # write the usercustomize.py file so all python processes use coverage and know where the config file is + - echo "import os" | sudo tee --append ${PYSITEDIR}/usercustomize.py + - echo "os.environ['COVERAGE_PROCESS_START'] = '$PWD/.coveragerc'" | sudo tee --append ${PYSITEDIR}/usercustomize.py + - echo "import coverage" | sudo tee --append ${PYSITEDIR}/usercustomize.py + - echo "coverage.process_startup()" | sudo tee --append ${PYSITEDIR}/usercustomize.py + + script: + - export TOTAL_BUILD_JOBS=8 + # write the coverage config file + - export COVERAGE_PROCESS_START=$PWD/.coveragerc + - echo "[run]" >> .coveragerc + - echo "source = $PWD/src" >> .coveragerc + - echo "parallel = True" >> .coveragerc + - printf "omit =\n\t*Tests.py\n\tsrc/test_*\n\tsrc/setup.py\n\n" >> .coveragerc + - echo "[path] = $PWD" >> .coveragerc + # get a list of all the tests to split them up + - python runtest.py -l -a > all_tests + - let "start = ($(wc -l < all_tests) / ${TOTAL_BUILD_JOBS}) * (${BUILD_JOB_NUM} - 1)"; true; + - let "end = ($(wc -l < all_tests) / ${TOTAL_BUILD_JOBS}) * ${BUILD_JOB_NUM}" + - if (( ${BUILD_JOB_NUM} == ${TOTAL_BUILD_JOBS} )); then end=$(wc -l < all_tests); fi + - if (( ${start} == 0 )); then start=1; fi + - sed -n ${start},${end}p all_tests > build_tests + - coverage run -p --rcfile=$PWD/.coveragerc runtest.py -f build_tests || if [[ $? == 2 ]]; then true; else false; fi + + after_success: + - coverage combine + - coverage report + - coveralls --rcfile=$PWD/.coveragerc + + env: BUILD_JOB_NUM=1 + + - <<: *coverage_jobs + env: BUILD_JOB_NUM=2 + - <<: *coverage_jobs + env: BUILD_JOB_NUM=3 + - <<: *coverage_jobs + env: BUILD_JOB_NUM=4 + - <<: *coverage_jobs + env: BUILD_JOB_NUM=5 + - <<: *coverage_jobs + env: BUILD_JOB_NUM=6 + - <<: *coverage_jobs + env: BUILD_JOB_NUM=7 + - <<: *coverage_jobs + env: BUILD_JOB_NUM=8 + -- cgit v0.12 From cb85766498fa08cdf1f306824ab00b77624a730e Mon Sep 17 00:00:00 2001 From: Daniel Moody Date: Mon, 13 Aug 2018 16:50:28 -0500 Subject: added comments to the travis install script --- .travis/install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis/install.sh b/.travis/install.sh index 8b51bec..ddef1e6 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -1,11 +1,10 @@ #!/usr/bin/env bash set -x +# setup clang for clang tests using local clang installation sudo ln -s /usr/local/clang-5.0.0/bin/clang /usr/bin/clang sudo ln -s /usr/local/clang-5.0.0/bin/clang++ /usr/bin/clang++ -return - # dependencies for gdc tests sudo apt-get -y install gdc # dependencies for docbook tests -- cgit v0.12