Skip to content
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

Travis CI compiler errors not detected #3730

Closed
jay opened this issue Apr 4, 2019 · 6 comments
Closed

Travis CI compiler errors not detected #3730

jay opened this issue Apr 4, 2019 · 6 comments
Labels

Comments

@jay
Copy link
Member

@jay jay commented Apr 4, 2019

I did this

https://travis-ci.org/curl/curl/jobs/515938887#L6033

connect.c: In function ‘Curl_is_connected’:
connect.c:846:14: error: unused variable ‘buffer’ [-Werror=unused-variable]
         char buffer[STRERROR_LEN];
              ^~~~~~
connect.c: In function ‘tcpnodelay’:
connect.c:902:8: error: unused variable ‘buffer’ [-Werror=unused-variable]
   char buffer[STRERROR_LEN];
        ^~~~~~

...

cc1: all warnings being treated as errors
make[2]: *** [libcurl_la-connect.lo] Error 1
make[2]: Leaving directory `/home/travis/build/curl/curl/lib'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/travis/build/curl/curl/lib'
make: *** [all-recursive] Error 1

...

Done. Your build exited with 0.

#10260.5 passed

I expected the following

#10260.5 errored

@bagder bagder added the build label Apr 5, 2019
@bagder

This comment has been minimized.

Copy link
Member

@bagder bagder commented Apr 5, 2019

Weird! I can't see that we've changed anything to make this stop working... ?

@webmaster128

This comment has been minimized.

Copy link
Contributor

@webmaster128 webmaster128 commented Apr 5, 2019

There is an endless debate about Travis status code handling and fast failing of scripts, e.g. in this thread about set -e in .travis.yml. At lot of those problems are a result of Travis composing a single bash script out of everything in .travis.yml plus their own setup. In my experiance the only thing that works reliably is calling a main travis bash script as the only step in script. In that main script, set -o errexit -o nounset -o pipefail can be used independent of the surrounding shell context to harden the execution.

Nice to have: custom output folding can be done using custom fold_start/fold_end functions (which requires exposing some Travis internals) in the custom shell script (like this).

@jay

This comment has been minimized.

Copy link
Member Author

@jay jay commented Apr 9, 2019

Alright let's try that. Please review PR #3755 and let me know what I did wrong because I'm sure there will be something.

@webmaster128

This comment has been minimized.

Copy link
Contributor

@webmaster128 webmaster128 commented Apr 9, 2019

For the fast failing issue also see travis-ci/travis-ci#1066

@bagder

This comment has been minimized.

Copy link
Member

@bagder bagder commented Aug 6, 2019

I propose we just drop this issue as this is not a major concern and nobody seems to work on it?

@bagder bagder closed this Aug 26, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Nov 24, 2019
@curl curl unlocked this conversation Dec 28, 2019
@jay

This comment has been minimized.

Copy link
Member Author

@jay jay commented Dec 28, 2019

Resurrected

jay added a commit to jay/curl that referenced this issue Dec 28, 2019
- Stop using inline shell scripts for before_script and script sections.

Prior to this change Travis could ignore errors from commands in inline
scripts. I don't understand how or why it happens. This is a workaround.

Assisted-by: Simon Warta

Ref: travis-ci/travis-ci#1066

Fixes curl#3730
Closes curl#3755
@jay jay reopened this Dec 28, 2019
jay added a commit to jay/curl that referenced this issue Dec 28, 2019
- Stop using inline shell scripts for before_script and script sections.

Prior to this change Travis could ignore errors from commands in inline
scripts. I don't understand how or why it happens. This is a workaround.

Assisted-by: Simon Warta

Ref: travis-ci/travis-ci#1066

Fixes curl#3730
Closes curl#3755
@jay jay closed this in 9434864 Dec 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.