-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TravisCI: More robust parsing of TravisCI log #395
Conversation
👍 Everything works fine! Just one remark from my side: There is a comment in parse_travis_log.py referring to the dependencies on build.sh. A similar comment in build.sh would be good. |
@@ -1,7 +1,7 @@ | |||
#!/bin/sh | |||
|
|||
set -e | |||
set -x | |||
#set -x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why commented out instead of deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@heplesser I documented the 'out-commenting'. When debugging the script, the flag is very informative.
@tammoippen Very nice work. Have you tested that errors are handled properly, by introducing changes that will provoke errors/warning from vera, clang-format, cppcheck, pep8, building, testsuite? I think that we need some intentionally provoked Travis failures to be sure things work as intended. |
@heplesser in 30d525b I introduced some intentional failures that should trigger 'vera, clang-format, cppcheck, pep8, building, testsuite'. I will remove it afterwards. |
And make less verbose build.sh.
Pep8ify parse_travis_log Fix skip error return value
And add comment to `fi` of `if [ "$xSTATIC_ANALYSIS" = "1" ] ; then`
* strip() startswith queries * standardize PEP8 start output in build.sh to other static analysis * unique parsing of start-outputs * make static analysis run for all jobs * do not exit build.sh when there are files with changes
This reverts commit 30d525b.
See this build for forced errors. |
👍 and merging. |
Solves #392.
This PR makes the parsing of the TravisCI more robust and allows to order the different steps of the
build.sh
in any order (for the parsing). It is also possible to remove different steps completely and the parser will not break. A summary of the changes:In
build.sh
:Every block is surrounded by tags like
Output is reduced:
set -x
out, as we do not need to debug the travis log regularly. One can uncomment it, if needed.clang-format
.Make static analysis optional with env. variable
xSTATIC_ANALYSIS
.Fix regex bug (see line 4188) for
if [[ $f =~ $EXAMPLE_DIRS ]]
. I think, the TravisCI environment does not allowif [[ ... ]]
.Add output that tells if results are not uploaded, if you are working on your fork.
In
extras/parse_travis_log.py
:vera++
,cppcheck
andclang-format
parsing into standalone functions.print_...
functions for nicer output.main
" function.I propose @heplesser and @gtrensch as reviewers.