Skip to content
Snippets Groups Projects
Commit 893af7fe authored by Mathieu Courtois's avatar Mathieu Courtois
Browse files

[#34412] use DEVTOOLS_ENV_SILENT=1 to disable infos loading environment

parent 0aff053b
No related branches found
No related tags found
No related merge requests found
../devtools_wrapper
\ No newline at end of file
close_issue.py
\ No newline at end of file
../devtools_wrapper
\ No newline at end of file
create_histor.py
\ No newline at end of file
../devtools_wrapper
\ No newline at end of file
list_expected.py
\ No newline at end of file
../devtools_wrapper
\ No newline at end of file
list_issue.py
\ No newline at end of file
../devtools_wrapper
\ No newline at end of file
valid_issue.py
\ No newline at end of file
......@@ -8,6 +8,12 @@ _error()
exit 1
}
env_printf()
{
[ "${DEVTOOLS_ENV_SILENT}" = 1 ] && return
printf "$1"
}
source_codeaster_env()
{
# usage: source_codeaster_env PREFIX
......@@ -15,7 +21,7 @@ source_codeaster_env()
declare -a src=( "." "src" "../src" "${1}/src" "${HOME}/dev/codeaster/src" )
WAF_SUFFIX="${WAF_SUFFIX:-mpi}"
# source the environment only if DEVTOOLS_COMPUTER_ID is not already defined
printf "checking environment... "
env_printf "checking environment... "
if [ -z "${DEVTOOLS_COMPUTER_ID}" ]; then
host=$(detect_host)
if [ ! -z "${host}" ]; then
......@@ -25,25 +31,25 @@ source_codeaster_env()
export WAFBUILD_ENV="$(get_wafbuild_env ${host} "${path}")"
if [ -e "${WAFBUILD_ENV}" ]; then
. "${WAFBUILD_ENV}"
echo "loading ${WAFBUILD_ENV}"
env_printf "loading ${WAFBUILD_ENV}\n"
break
fi
done
if [ -z "${WAFBUILD_ENV}" ]; then
unset WAFBUILD_ENV
echo "no found"
env_printf "no found\n"
fi
else
echo "no found"
env_printf "no found\n"
fi
else
if [ -z "${WAFBUILD_ENV}" ]; then
export WAFBUILD_ENV="$(get_wafbuild_env ${DEVTOOLS_COMPUTER_ID} .)"
fi
if [ -e ${WAFBUILD_ENV} ]; then
echo "already set: ${WAFBUILD_ENV}"
env_printf "already set: ${WAFBUILD_ENV}\n"
else
echo "no found: ${WAFBUILD_ENV}"
env_printf "no found: ${WAFBUILD_ENV}\n"
unset WAFBUILD_ENV
fi
fi
......
......@@ -244,7 +244,7 @@ def plot(imports, filename):
lines.append("}")
ext = osp.splitext(filename)[-1].replace(".", "")
assert ext in ("ps", "png")
assert ext in ("png", "svg", "ps"), ext
ftmp = tempfile.NamedTemporaryFile("w", suffix=".dot", delete=False)
ftmp.write(os.linesep.join(lines))
ftmp.close()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment