Commit 9ccbfa22 authored by Lorenz Huedepohl's avatar Lorenz Huedepohl

Small improvements in script error handling

parent 848f332b
......@@ -2,6 +2,9 @@
PATH=${HOME}/bin:${PATH}
set -e
set pipefail
cov_dir=coverage_data
prefix=$cov_dir/coverage_${CI_BUILD_REF}_${CI_BUILD_NAME}
mkdir -p $cov_dir/
......
......@@ -34,7 +34,11 @@ if len(files) > 1:
raise Exception("Specify exactly one .F90 file")
elif len(files) == 0:
# No .F90 file specified, execute program as-is
os.execvp(args[0], args[0:])
try:
os.execvp(args[0], args[0:])
except OSError as e:
print("Error executing '{0}': {1}".format(args[0], e.args[1]))
raise SystemExit(1)
elif len(files) == 1:
file, = files
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment