-
Notifications
You must be signed in to change notification settings - Fork 438
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_buildtempl_header: Save full PIPESTATUS #528
Conversation
This commit saves the full `PIPESTATUS[]` array into a globally-accessible array called `TRAVIS_PIPESTATUS[]`, and is an extension of the edits involved in travis-ci#12. Two doubts so far: * Shall we consider chances of the `TRAVIS_PIPESTATUS` stuff being exported? If we consider those, we may need to save it like a something-delimited strings like a ling of `TRAVIS_PIPESTATUS=${TRAVIS_PIPESTATUS[*]}` right after the `result=` line, and users can split them later like `pstat=( $TRAVIS_PIPESTATUS )`. * Is the bash version on travis new enough for negative indices to indicate the last elements? If not, we need to compute them using the length of the array ourselves.
I think I'll find out about doubt 2 after the CI check. Oh it seems to work. |
Messing things up.. referenced the wrong issue in the first commit.. |
@@ -67,7 +67,7 @@ travis_time_finish() { | |||
return $result | |||
} | |||
|
|||
function travis_nanoseconds() { | |||
travis_nanoseconds() { | |||
local cmd="date" | |||
local format="+%s%N" | |||
local os=$(uname) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Hi, thanks for the PR, could you please explain some more information on what the use case of this PR is? |
Forget it. travis-ci/travis-ci#3771 took me to some weird place and made me dizzy… Oh it might work still. @joshk For pipe commands like Bash's |
For complex builds that requires the use of |
You are right. |
This commit saves the full
PIPESTATUS[]
array into a globally-accessible array calledTRAVIS_PIPESTATUS[]
, and is an extension of the edits involved in infertux/bashcov#12.Two doubts so far:
TRAVIS_PIPESTATUS
stuff being exported? If we consider those, we may need to save it like a something-delimited strings like a ling ofTRAVIS_PIPESTATUS=${TRAVIS_PIPESTATUS[*]}
right after theresult=
line, and users can split them later likepstat=( $TRAVIS_PIPESTATUS )
.