kopia lustrzana https://github.com/jupyterhub/repo2docker
Ensure output arrives on stderr
rodzic
044e112bae
commit
f2ed09bdfb
|
@ -15,10 +15,10 @@ if [[ ! -z "${R2D_ENTRYPOINT:-}" ]]; then
|
||||||
if [[ ! -x "$R2D_ENTRYPOINT" ]]; then
|
if [[ ! -x "$R2D_ENTRYPOINT" ]]; then
|
||||||
chmod u+x "$R2D_ENTRYPOINT"
|
chmod u+x "$R2D_ENTRYPOINT"
|
||||||
fi
|
fi
|
||||||
exec "$R2D_ENTRYPOINT" "$@" >&"$log_fd" 2>&1
|
exec "$R2D_ENTRYPOINT" "$@" >&"$log_fd"
|
||||||
else
|
else
|
||||||
exec "$@" >&"$log_fd" 2>&1
|
exec "$@" >&"$log_fd"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Close the loggging output aggain
|
# Close the logging output again
|
||||||
exec {log_fd}>&-
|
#exec {log_fd}>&-
|
||||||
|
|
|
@ -58,6 +58,10 @@ def test_env():
|
||||||
|
|
||||||
# all docker output is returned by repo2docker on stderr
|
# all docker output is returned by repo2docker on stderr
|
||||||
# extract just the declare for better failure message formatting
|
# extract just the declare for better failure message formatting
|
||||||
|
# stdout should be empty
|
||||||
|
assert not result.stdout
|
||||||
|
|
||||||
|
# stderr should contain lines of output
|
||||||
declares = [x for x in result.stderr.split("\n") if x.startswith("declare")]
|
declares = [x for x in result.stderr.split("\n") if x.startswith("declare")]
|
||||||
assert 'declare -x FOO="{}"'.format(ts) in declares
|
assert 'declare -x FOO="{}"'.format(ts) in declares
|
||||||
assert 'declare -x BAR="baz"' in declares
|
assert 'declare -x BAR="baz"' in declares
|
||||||
|
|
Ładowanie…
Reference in New Issue