From 0cb625a743ecc55cb695a51fb4ab16191c535e7a Mon Sep 17 00:00:00 2001 From: gtrensch Date: Mon, 17 Dec 2018 00:11:21 +0100 Subject: [PATCH 1/4] additional build flags to exclude code analysis and installcheck --- .travis.yml | 18 ++-- extras/travis_build.sh | 202 +++++++++++++++++++++-------------------- 2 files changed, 111 insertions(+), 109 deletions(-) diff --git a/.travis.yml b/.travis.yml index 82e87d6307..d287465921 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,35 +39,35 @@ jobs: include: - stage: Staticcheck python: 3.4.4 - env: xTHREADING=0 xMPI=0 xGSL=0 xLIBNEUROSIM=0 xLTDL=0 xREADLINE=0 xPYTHON=0 xMUSIC=0 xSTATIC_ANALYSIS=1 CACHE_NAME=JOB # static code analysis + env: xTHREADING=0 xMPI=0 xGSL=0 xLIBNEUROSIM=0 xLTDL=0 xREADLINE=0 xPYTHON=0 xMUSIC=0 xSTATIC_ANALYSIS=1 xRUN_TESTSUITE=0 CACHE_NAME=JOB # static code analysis - stage: MPI-Threading-Python python: 3.4.4 - env: xTHREADING=0 xMPI=1 xGSL=0 xLIBNEUROSIM=0 xLTDL=1 xREADLINE=1 xPYTHON=0 xMUSIC=0 xSTATIC_ANALYSIS=0 CACHE_NAME=JOB # only MPI + env: xTHREADING=0 xMPI=1 xGSL=0 xLIBNEUROSIM=0 xLTDL=1 xREADLINE=1 xPYTHON=0 xMUSIC=0 xSTATIC_ANALYSIS=0 xRUN_TESTSUITE=1 CACHE_NAME=JOB # only MPI - stage: MPI-Threading-Python python: 3.4.4 - env: xTHREADING=1 xMPI=0 xGSL=0 xLIBNEUROSIM=0 xLTDL=1 xREADLINE=1 xPYTHON=0 xMUSIC=0 xSTATIC_ANALYSIS=0 CACHE_NAME=JOB # only threading + env: xTHREADING=1 xMPI=0 xGSL=0 xLIBNEUROSIM=0 xLTDL=1 xREADLINE=1 xPYTHON=0 xMUSIC=0 xSTATIC_ANALYSIS=0 xRUN_TESTSUITE=1 CACHE_NAME=JOB # only threading - stage: MPI-Threading-Python python: 3.4.4 - env: xTHREADING=1 xMPI=0 xGSL=0 xLIBNEUROSIM=0 xLTDL=0 xREADLINE=0 xPYTHON=1 xMUSIC=0 xSTATIC_ANALYSIS=0 CACHE_NAME=JOB # Python & Threading + env: xTHREADING=1 xMPI=0 xGSL=0 xLIBNEUROSIM=0 xLTDL=0 xREADLINE=0 xPYTHON=1 xMUSIC=0 xSTATIC_ANALYSIS=0 xRUN_TESTSUITE=1 CACHE_NAME=JOB # Python & Threading - stage: MPI-Threading-Python python: 3.4.4 - env: xTHREADING=0 xMPI=1 xGSL=0 xLIBNEUROSIM=0 xLTDL=0 xREADLINE=0 xPYTHON=1 xMUSIC=0 xSTATIC_ANALYSIS=0 CACHE_NAME=JOB # Python & MPI + env: xTHREADING=0 xMPI=1 xGSL=0 xLIBNEUROSIM=0 xLTDL=0 xREADLINE=0 xPYTHON=1 xMUSIC=0 xSTATIC_ANALYSIS=0 xRUN_TESTSUITE=1 CACHE_NAME=JOB # Python & MPI - stage: MPI-Threading-Python python: 3.4.4 - env: xTHREADING=0 xMPI=0 xGSL=0 xLIBNEUROSIM=0 xLTDL=0 xREADLINE=0 xPYTHON=1 xMUSIC=0 xSTATIC_ANALYSIS=0 CACHE_NAME=JOB # only Python + env: xTHREADING=0 xMPI=0 xGSL=0 xLIBNEUROSIM=0 xLTDL=0 xREADLINE=0 xPYTHON=1 xMUSIC=0 xSTATIC_ANALYSIS=0 xRUN_TESTSUITE=1 CACHE_NAME=JOB # only Python - stage: Python-Full-build python: 3.4.4 - env: xTHREADING=1 xMPI=1 xGSL=1 xLIBNEUROSIM=1 xLTDL=1 xREADLINE=1 xPYTHON=1 xMUSIC=1 xSTATIC_ANALYSIS=0 CACHE_NAME=JOB # full + env: xTHREADING=1 xMPI=1 xGSL=1 xLIBNEUROSIM=1 xLTDL=1 xREADLINE=1 xPYTHON=1 xMUSIC=1 xSTATIC_ANALYSIS=0 xRUN_TESTSUITE=1 CACHE_NAME=JOB # full - stage: Python-Full-build python: 2.7.13 - env: xTHREADING=1 xMPI=1 xGSL=1 xLIBNEUROSIM=1 xLTDL=1 xREADLINE=1 xPYTHON=1 xMUSIC=1 xSTATIC_ANALYSIS=0 CACHE_NAME=JOB # full + env: xTHREADING=1 xMPI=1 xGSL=1 xLIBNEUROSIM=1 xLTDL=1 xREADLINE=1 xPYTHON=1 xMUSIC=1 xSTATIC_ANALYSIS=0 xRUN_TESTSUITE=1 CACHE_NAME=JOB # full - stage: GCC8Clang7 language: cpp env: MATRIX_EVAL="CC=gcc-8 && CXX=g++-8" - stage: GCC8Clang7 language: cpp env: MATRIX_EVAL="CC=clang-7 && CXX=clang++-7" - + #https://docs.travis-ci.com/user/installing-dependencies#Installing-Packages-with-the-APT-Addon addons: apt: diff --git a/extras/travis_build.sh b/extras/travis_build.sh index f380b83e48..5b42593729 100644 --- a/extras/travis_build.sh +++ b/extras/travis_build.sh @@ -102,104 +102,106 @@ NEST_RESULT=$(readlink -f $NEST_RESULT) mkdir "$NEST_VPATH" "$NEST_RESULT" mkdir "$NEST_VPATH/reports" -echo -echo "+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +" -echo "+ S T A T I C C O D E A N A L Y S I S +" -echo "+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +" - -echo "MSGBLD0010: Initializing VERA++ static code analysis." -wget --no-verbose https://bitbucket.org/verateam/vera/downloads/vera++-1.3.0.tar.gz -tar -xzf vera++-1.3.0.tar.gz -cd vera++-1.3.0 -cmake -DCMAKE_INSTALL_PREFIX=/usr -DVERA_LUA=OFF -DVERA_USE_SYSTEM_BOOST=ON -sudo make install -cd .. -rm -fr ./vera++-1.3.0 -rm -f ./vera++-1.3.0.tar.gz - # Add the NEST profile to the VERA++ profiles. -sudo cp ./extras/vera++.profile /usr/lib/vera++/profiles/nest -echo "MSGBLD0020: VERA++ initialization completed." -if [ ! -f "$HOME/.cache/bin/cppcheck" ]; then - echo "MSGBLD0030: Installing CPPCHECK version 1.69." - # Build cppcheck version 1.69 - git clone https://github.com/danmar/cppcheck.git - cd cppcheck - git checkout tags/1.69 - mkdir -p install - make PREFIX=$HOME/.cache CFGDIR=$HOME/.cache/cfg HAVE_RULES=yes install +if [ "$xSTATIC_ANALYSIS" = "1" ]; then + echo "+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +" + echo "+ S T A T I C C O D E A N A L Y S I S +" + echo "+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +" + + echo "MSGBLD0010: Initializing VERA++ static code analysis." + wget --no-verbose https://bitbucket.org/verateam/vera/downloads/vera++-1.3.0.tar.gz + tar -xzf vera++-1.3.0.tar.gz + cd vera++-1.3.0 + cmake -DCMAKE_INSTALL_PREFIX=/usr -DVERA_LUA=OFF -DVERA_USE_SYSTEM_BOOST=ON + sudo make install cd .. - echo "MSGBLD0040: CPPCHECK installation completed." - - echo "MSGBLD0050: Installing CLANG-FORMAT." - wget --no-verbose http://llvm.org/releases/3.6.2/clang+llvm-3.6.2-x86_64-linux-gnu-ubuntu-14.04.tar.xz - tar xf clang+llvm-3.6.2-x86_64-linux-gnu-ubuntu-14.04.tar.xz - # Copy and not move because '.cache' may aleady contain other subdirectories and files. - cp -R clang+llvm-3.6.2-x86_64-linux-gnu-ubuntu-14.04/* $HOME/.cache - echo "MSGBLD0060: CLANG-FORMAT installation completed." - - # Remove these directories, otherwise the copyright-header check will complain. - rm -rf ./cppcheck - rm -rf ./clang+llvm-3.6.2-x86_64-linux-gnu-ubuntu-14.04 -fi + rm -fr ./vera++-1.3.0 + rm -f ./vera++-1.3.0.tar.gz + # Add the NEST profile to the VERA++ profiles. + sudo cp ./extras/vera++.profile /usr/lib/vera++/profiles/nest + echo "MSGBLD0020: VERA++ initialization completed." + if [ ! -f "$HOME/.cache/bin/cppcheck" ]; then + echo "MSGBLD0030: Installing CPPCHECK version 1.69." + # Build cppcheck version 1.69 + git clone https://github.com/danmar/cppcheck.git + cd cppcheck + git checkout tags/1.69 + mkdir -p install + make PREFIX=$HOME/.cache CFGDIR=$HOME/.cache/cfg HAVE_RULES=yes install + cd .. + echo "MSGBLD0040: CPPCHECK installation completed." + + echo "MSGBLD0050: Installing CLANG-FORMAT." + wget --no-verbose http://llvm.org/releases/3.6.2/clang+llvm-3.6.2-x86_64-linux-gnu-ubuntu-14.04.tar.xz + tar xf clang+llvm-3.6.2-x86_64-linux-gnu-ubuntu-14.04.tar.xz + # Copy and not move because '.cache' may aleady contain other subdirectories and files. + cp -R clang+llvm-3.6.2-x86_64-linux-gnu-ubuntu-14.04/* $HOME/.cache + echo "MSGBLD0060: CLANG-FORMAT installation completed." + + # Remove these directories, otherwise the copyright-header check will complain. + rm -rf ./cppcheck + rm -rf ./clang+llvm-3.6.2-x86_64-linux-gnu-ubuntu-14.04 + fi -# Ensure that the cppcheck and clang-format installation can be found. -export PATH=$HOME/.cache/bin:$PATH + # Ensure that the cppcheck and clang-format installation can be found. + export PATH=$HOME/.cache/bin:$PATH + + echo "MSGBLD0070: Retrieving changed files." + # Note: BUG: Extracting the filenames may not work in all cases. + # The commit range might not properly reflect the history. + # see https://github.com/travis-ci/travis-ci/issues/2668 + if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then + echo "MSGBLD0080: PULL REQUEST: Retrieving changed files using GitHub API." + file_names=`curl "https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST/files" | jq '.[] | .filename' | tr '\n' ' ' | tr '"' ' '` + else + echo "MSGBLD0090: Retrieving changed files using git diff." + file_names=`(git diff --name-only $TRAVIS_COMMIT_RANGE || echo "") | tr '\n' ' '` + fi -echo "MSGBLD0070: Retrieving changed files." - # Note: BUG: Extracting the filenames may not work in all cases. - # The commit range might not properly reflect the history. - # see https://github.com/travis-ci/travis-ci/issues/2668 -if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then - echo "MSGBLD0080: PULL REQUEST: Retrieving changed files using GitHub API." - file_names=`curl "https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST/files" | jq '.[] | .filename' | tr '\n' ' ' | tr '"' ' '` + printf '%s\n' "$file_names" | while IFS= read -r line + do + for single_file_name in $file_names + do + echo "MSGBLD0095: File changed: $single_file_name" + done + done + echo "MSGBLD0100: Retrieving changed files completed." + echo + + + # Set the command line arguments for the static code analysis script and execute it. + + # The names of the static code analysis tools executables. + VERA=vera++ + CPPCHECK=cppcheck + CLANG_FORMAT=clang-format + PEP8=pep8 + + # Perform or skip a certain analysis. + PERFORM_VERA=true + PERFORM_CPPCHECK=true + PERFORM_CLANG_FORMAT=true + PERFORM_PEP8=true + + # The following command line parameters indicate whether static code analysis error messages + # will cause the Travis CI build to fail or are ignored. + IGNORE_MSG_VERA=false + IGNORE_MSG_CPPCHECK=true + IGNORE_MSG_CLANG_FORMAT=false + IGNORE_MSG_PEP8=false + + # The script is called within the Travis CI environment and cannot be run incremental. + RUNS_ON_TRAVIS=true + INCREMENTAL=false + + chmod +x ./extras/static_code_analysis.sh + ./extras/static_code_analysis.sh "$RUNS_ON_TRAVIS" "$INCREMENTAL" "$file_names" "$NEST_VPATH" \ + "$VERA" "$CPPCHECK" "$CLANG_FORMAT" "$PEP8" \ + "$PERFORM_VERA" "$PERFORM_CPPCHECK" "$PERFORM_CLANG_FORMAT" "$PERFORM_PEP8" \ + "$IGNORE_MSG_VERA" "$IGNORE_MSG_CPPCHECK" "$IGNORE_MSG_CLANG_FORMAT" "$IGNORE_MSG_PEP8" else - echo "MSGBLD0090: Retrieving changed files using git diff." - file_names=`(git diff --name-only $TRAVIS_COMMIT_RANGE || echo "") | tr '\n' ' '` -fi - -printf '%s\n' "$file_names" | while IFS= read -r line - do - for single_file_name in $file_names - do - echo "MSGBLD0095: File changed: $single_file_name" - done - done -echo "MSGBLD0100: Retrieving changed files completed." -echo - + echo "MSGBLD0225: Skip static code analysis." +fi # End of Static code analysis. -# Set the command line arguments for the static code analysis script and execute it. - -# The names of the static code analysis tools executables. -VERA=vera++ -CPPCHECK=cppcheck -CLANG_FORMAT=clang-format -PEP8=pep8 - -# Perform or skip a certain analysis. -PERFORM_VERA=true -PERFORM_CPPCHECK=true -PERFORM_CLANG_FORMAT=true -PERFORM_PEP8=true - -# The following command line parameters indicate whether static code analysis error messages -# will cause the Travis CI build to fail or are ignored. -IGNORE_MSG_VERA=false -IGNORE_MSG_CPPCHECK=true -IGNORE_MSG_CLANG_FORMAT=false -IGNORE_MSG_PEP8=false - -# The script is called within the Travis CI environment and cannot be run incremental. -RUNS_ON_TRAVIS=true -INCREMENTAL=false - -chmod +x ./extras/static_code_analysis.sh -./extras/static_code_analysis.sh "$RUNS_ON_TRAVIS" "$INCREMENTAL" "$file_names" "$NEST_VPATH" \ -"$VERA" "$CPPCHECK" "$CLANG_FORMAT" "$PEP8" \ -"$PERFORM_VERA" "$PERFORM_CPPCHECK" "$PERFORM_CLANG_FORMAT" "$PERFORM_PEP8" \ -"$IGNORE_MSG_VERA" "$IGNORE_MSG_CPPCHECK" "$IGNORE_MSG_CLANG_FORMAT" "$IGNORE_MSG_PEP8" - -# End of Static code analysis. cd "$NEST_VPATH" cp ../examples/sli/nestrc.sli ~/.nestrc @@ -241,13 +243,11 @@ echo "MSGBLD0270: Running make install." make install echo "MSGBLD0280: Make install completed." -echo -echo "+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +" -echo "+ R U N N E S T T E S T S U I T E +" -echo "+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +" -if [ "$xSTATIC_ANALYSIS" = "1" ] ; then - echo "MSGBLD0285: Static analysis is enabled; not running make installcheck." -else +if [ "$xRUN_TESTSUITE" = "1" ]; then + echo + echo "+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +" + echo "+ R U N N E S T T E S T S U I T E +" + echo "+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +" echo "MSGBLD0290: Running make installcheck." if [ "$TRAVIS_PYTHON_VERSION" == "2.7.13" ]; then export PYTHONPATH=$HOME/.cache/csa.install/lib/python2.7/site-packages:$PYTHONPATH @@ -258,6 +258,8 @@ else fi make installcheck echo "MSGBLD0300: Make installcheck completed." +else + echo "MSGBLD0305: Skip installcheck." fi if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then From 3f50a1e3af28067782b543a6441c0c36b3b3ce37 Mon Sep 17 00:00:00 2001 From: gtrensch Date: Mon, 17 Dec 2018 17:45:00 +0100 Subject: [PATCH 2/4] additional build flags to exclude code analysis and installcheck --- .travis.yml | 4 ++-- extras/parse_travis_log.py | 20 +++++++++++++++----- extras/travis_build.sh | 4 ++-- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index d287465921..ad62df6a5f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,7 +39,7 @@ jobs: include: - stage: Staticcheck python: 3.4.4 - env: xTHREADING=0 xMPI=0 xGSL=0 xLIBNEUROSIM=0 xLTDL=0 xREADLINE=0 xPYTHON=0 xMUSIC=0 xSTATIC_ANALYSIS=1 xRUN_TESTSUITE=0 CACHE_NAME=JOB # static code analysis + env: xTHREADING=0 xMPI=0 xGSL=0 xLIBNEUROSIM=0 xLTDL=0 xREADLINE=0 xPYTHON=0 xMUSIC=0 xSTATIC_ANALYSIS=1 xRUN_TESTSUITE=0 CACHE_NAME=JOB # only static code analysis and build - stage: MPI-Threading-Python python: 3.4.4 env: xTHREADING=0 xMPI=1 xGSL=0 xLIBNEUROSIM=0 xLTDL=1 xREADLINE=1 xPYTHON=0 xMUSIC=0 xSTATIC_ANALYSIS=0 xRUN_TESTSUITE=1 CACHE_NAME=JOB # only MPI @@ -48,7 +48,7 @@ jobs: env: xTHREADING=1 xMPI=0 xGSL=0 xLIBNEUROSIM=0 xLTDL=1 xREADLINE=1 xPYTHON=0 xMUSIC=0 xSTATIC_ANALYSIS=0 xRUN_TESTSUITE=1 CACHE_NAME=JOB # only threading - stage: MPI-Threading-Python python: 3.4.4 - env: xTHREADING=1 xMPI=0 xGSL=0 xLIBNEUROSIM=0 xLTDL=0 xREADLINE=0 xPYTHON=1 xMUSIC=0 xSTATIC_ANALYSIS=0 xRUN_TESTSUITE=1 CACHE_NAME=JOB # Python & Threading + env: xTHREADING=1 xMPI=0 xGSL=0 xLIBNEUROSIM=0 xLTDL=0 xREADLINE=0 xPYTHON=1 xMUSIC=0 xSTATIC_ANALYSIS=0 xRUN_TESTSUITE=1 CACHE_NAME=JOB # Python & Threading - stage: MPI-Threading-Python python: 3.4.4 env: xTHREADING=0 xMPI=1 xGSL=0 xLIBNEUROSIM=0 xLTDL=0 xREADLINE=0 xPYTHON=1 xMUSIC=0 xSTATIC_ANALYSIS=0 xRUN_TESTSUITE=1 CACHE_NAME=JOB # Python & MPI diff --git a/extras/parse_travis_log.py b/extras/parse_travis_log.py index 4bc848ea55..621eba7d30 100755 --- a/extras/parse_travis_log.py +++ b/extras/parse_travis_log.py @@ -868,7 +868,9 @@ def build_return_code(status_cmake_configure, ignore_vera, ignore_cppcheck, ignore_format, - ignore_pep8): + ignore_pep8, + skip_code_analysis, + skip_installcheck): """Depending in the build results, create a return code. Parameters @@ -894,6 +896,8 @@ def build_return_code(status_cmake_configure, fail: True, False ignore_pep8: PEP8 messages will not cause the build to fail: True, False + skip_code_analysis: build ran w/o static code analysis: True, False + skip_installcheck: build ran w/o executing the test suite: True, False Returns ------- @@ -902,11 +906,12 @@ def build_return_code(status_cmake_configure, if ((status_cmake_configure) and (status_make) and (status_make_install) and - (status_tests) and - (ignore_vera or get_num_msgs(summary_vera) == 0) and + (skip_installcheck or status_tests) and + (skip_code_analysis or + ((ignore_vera or get_num_msgs(summary_vera) == 0) and (ignore_cppcheck or get_num_msgs(summary_cppcheck) == 0) and (ignore_format or get_num_msgs(summary_format) == 0) and - (ignore_pep8 or get_num_msgs(summary_pep8) == 0)): + (ignore_pep8 or get_num_msgs(summary_pep8) == 0)))): return 0 else: @@ -924,6 +929,9 @@ def build_return_code(status_cmake_configure, list_of_changed_files(log_filename, "MSGBLD0070", "MSGBLD0100", "MSGBLD0095") + skip_code_analysis = is_message_in_logfile(log_filename, "MSGBLD0225") + skip_installcheck = is_message_in_logfile(log_filename, "MSGBLD0305") + # The NEST Travis CI build consists of several steps and sections. # Each section is enclosed in a start- and an end-message. # By checking these message-pairs it can be verified whether a section @@ -974,7 +982,9 @@ def build_return_code(status_cmake_configure, ignore_vera, ignore_cppcheck, ignore_format, - ignore_pep8) + ignore_pep8, + skip_code_analysis, + skip_installcheck) # Only after a successful build, Travis CI will upload the build artifacts # to Amazon S3. diff --git a/extras/travis_build.sh b/extras/travis_build.sh index 5b42593729..9a91fab643 100644 --- a/extras/travis_build.sh +++ b/extras/travis_build.sh @@ -189,7 +189,7 @@ if [ "$xSTATIC_ANALYSIS" = "1" ]; then IGNORE_MSG_CLANG_FORMAT=false IGNORE_MSG_PEP8=false - # The script is called within the Travis CI environment and cannot be run incremental. + # The script is called within the Travis CI environment and thus can not be run incremental. RUNS_ON_TRAVIS=true INCREMENTAL=false @@ -199,7 +199,7 @@ if [ "$xSTATIC_ANALYSIS" = "1" ]; then "$PERFORM_VERA" "$PERFORM_CPPCHECK" "$PERFORM_CLANG_FORMAT" "$PERFORM_PEP8" \ "$IGNORE_MSG_VERA" "$IGNORE_MSG_CPPCHECK" "$IGNORE_MSG_CLANG_FORMAT" "$IGNORE_MSG_PEP8" else - echo "MSGBLD0225: Skip static code analysis." + echo "MSGBLD0225: Static code analysis skipped due to build configuration." fi # End of Static code analysis. From ac9ea127f578e0e0e35442814841a7b7feaab998 Mon Sep 17 00:00:00 2001 From: gtrensch Date: Mon, 17 Dec 2018 18:14:10 +0100 Subject: [PATCH 3/4] pep8 code formatting --- extras/parse_travis_log.py | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/extras/parse_travis_log.py b/extras/parse_travis_log.py index 621eba7d30..a6c05ce669 100755 --- a/extras/parse_travis_log.py +++ b/extras/parse_travis_log.py @@ -451,13 +451,7 @@ def testsuite_results(log_filename, msg_testsuite_section_start, # section. Stop reading the log file. break - #return status_tests, total_number_of_tests, number_of_tests_failed - - if in_installcheck_section: - return status_tests, total_number_of_tests, number_of_tests_failed - else: - # No make installcheck - return None, None, None + return status_tests, total_number_of_tests, number_of_tests_failed def convert_bool_value_to_status_string(value): @@ -904,14 +898,14 @@ def build_return_code(status_cmake_configure, 0 (success) or 1. """ if ((status_cmake_configure) and - (status_make) and - (status_make_install) and - (skip_installcheck or status_tests) and - (skip_code_analysis or - ((ignore_vera or get_num_msgs(summary_vera) == 0) and - (ignore_cppcheck or get_num_msgs(summary_cppcheck) == 0) and - (ignore_format or get_num_msgs(summary_format) == 0) and - (ignore_pep8 or get_num_msgs(summary_pep8) == 0)))): + (status_make) and + (status_make_install) and + (skip_installcheck or status_tests) and + (skip_code_analysis or + ((ignore_vera or get_num_msgs(summary_vera) == 0) and + (ignore_cppcheck or get_num_msgs(summary_cppcheck) == 0) and + (ignore_format or get_num_msgs(summary_format) == 0) and + (ignore_pep8 or get_num_msgs(summary_pep8) == 0)))): return 0 else: From 04ec06ecb3cb16710eebabd6749de08f94dea576 Mon Sep 17 00:00:00 2001 From: gtrensch Date: Mon, 17 Dec 2018 18:45:24 +0100 Subject: [PATCH 4/4] pep8 formatting --- extras/parse_travis_log.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/extras/parse_travis_log.py b/extras/parse_travis_log.py index a6c05ce669..c0116e2b73 100755 --- a/extras/parse_travis_log.py +++ b/extras/parse_travis_log.py @@ -897,15 +897,16 @@ def build_return_code(status_cmake_configure, ------- 0 (success) or 1. """ - if ((status_cmake_configure) and - (status_make) and - (status_make_install) and - (skip_installcheck or status_tests) and - (skip_code_analysis or - ((ignore_vera or get_num_msgs(summary_vera) == 0) and - (ignore_cppcheck or get_num_msgs(summary_cppcheck) == 0) and - (ignore_format or get_num_msgs(summary_format) == 0) and - (ignore_pep8 or get_num_msgs(summary_pep8) == 0)))): + if ((status_cmake_configure) and # noqa + (status_make) and # noqa + (status_make_install) and # noqa + (skip_installcheck or status_tests) and # noqa + (skip_code_analysis or ((ignore_vera or get_num_msgs(summary_vera) == 0) and # noqa + (ignore_cppcheck or get_num_msgs(summary_cppcheck) == 0) and # noqa + (ignore_format or get_num_msgs(summary_format) == 0) and # noqa + (ignore_pep8 or get_num_msgs(summary_pep8) == 0)) # noqa + ) # noqa + ): # noqa return 0 else: