Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fengzch-das
multibuild
Commits
a76a530b
Unverified
Commit
a76a530b
authored
Nov 09, 2017
by
xoviat
Committed by
GitHub
Nov 09, 2017
Browse files
Cleanup suppress function (#72)
parent
6302112b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
13 deletions
+18
-13
.travis.yml
.travis.yml
+4
-0
common_utils.sh
common_utils.sh
+13
-0
manylinux_utils.sh
manylinux_utils.sh
+1
-1
tests/test_library_builders.sh
tests/test_library_builders.sh
+0
-12
No files found.
.travis.yml
View file @
a76a530b
...
@@ -6,6 +6,10 @@ branches:
...
@@ -6,6 +6,10 @@ branches:
only
:
only
:
-
master
-
master
-
devel
-
devel
cache
:
directories
:
-
$HOME/.ccache
matrix
:
matrix
:
allow_failures
:
allow_failures
:
...
...
common_utils.sh
View file @
a76a530b
...
@@ -18,6 +18,11 @@ if [ $(uname) == "Darwin" ]; then IS_OSX=1; fi
...
@@ -18,6 +18,11 @@ if [ $(uname) == "Darwin" ]; then IS_OSX=1; fi
# https://github.com/direnv/direnv/issues/210
# https://github.com/direnv/direnv/issues/210
shell_session_update
()
{
:
;
}
shell_session_update
()
{
:
;
}
# Start a process that runs as a keep-alive
# to avoid travis quitting if there is no output
(
while
true
;
do
>
&2
echo
"Travis-CI keep-alive"
;
sleep
480
;
done
)
&
function
abspath
{
function
abspath
{
python
-c
"import os.path; print(os.path.abspath('
$1
'))"
python
-c
"import os.path; print(os.path.abspath('
$1
'))"
}
}
...
@@ -61,6 +66,14 @@ function gh-clone {
...
@@ -61,6 +66,14 @@ function gh-clone {
git clone https://github.com/
$1
git clone https://github.com/
$1
}
}
function
suppress
{
# Suppress the output of a bash command unless it fails
out
=
$(
(
$@
)
2>&1
)
ret
=
$?
[
"
$ret
"
-
eq
0
]
||
>&
2
echo
"
$out
"
# if $? (the return of the last run command) is not zero, cat the temp file
return
"
$ret
"
# return the exit status of the command
}
function
rm_mkdir
{
function
rm_mkdir
{
# Remove directory if present, then make directory
# Remove directory if present, then make directory
local
path
=
$1
local
path
=
$1
...
...
manylinux_utils.sh
View file @
a76a530b
...
@@ -56,7 +56,7 @@ function activate_ccache {
...
@@ -56,7 +56,7 @@ function activate_ccache {
ln
-s
/parent-home/.ccache
$HOME
/.ccache
ln
-s
/parent-home/.ccache
$HOME
/.ccache
# Now install ccache
# Now install ccache
yum
install
-y
ccache
suppress
yum
install
-y
ccache
# Create fake compilers and prepend them to the PATH
# Create fake compilers and prepend them to the PATH
# Note that yum is supposed to create these for us,
# Note that yum is supposed to create these for us,
...
...
tests/test_library_builders.sh
View file @
a76a530b
...
@@ -6,18 +6,6 @@ source library_builders.sh
...
@@ -6,18 +6,6 @@ source library_builders.sh
# set -e -x
# set -e -x
function
print_failure
{
cat
$HOME
/suppress.out
exit
1
}
function
suppress
{
# Suppress the output of a bash command unless it fails
rm
-f
$HOME
/suppress.out 2> /dev/null
||
true
$*
2>&1
>
$HOME
/suppress.out
||
print_failure
rm
$HOME
/suppress.out
}
if
[
"
$TRAVIS_OS_NAME
"
==
"osx"
]
;
then
brew update
;
fi
if
[
"
$TRAVIS_OS_NAME
"
==
"osx"
]
;
then
brew update
;
fi
suppress build_openssl
suppress build_openssl
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment