Skip to content
Snippets Groups Projects
Commit aec448f7 authored by Sergey Kosukhin's avatar Sergey Kosukhin
Browse files

Avoid random names for the files generated by the tests.

parent e8821d8e
No related branches found
No related tags found
2 merge requests!34Version 2.2.0,!13Consolidation with CDI-PIO (develop)
#!@SHELL@
test 'x@ENABLE_NETCDF@' = xyes || exit 77
cdi_app_stdout="$0.cdi_app.stdout"
cdi_app_stderr="$0.cdi_app.stderr"
exec >test_cdf_const.log 2>&1
../libtool --mode=execute ${tool_wrap} @abs_top_builddir@/examples/cdi_write_const || exit 1
../libtool --mode=execute ${tool_wrap} @abs_top_builddir@/app/cdi -s example_const.nc >cdi.$$.stdout 2>cdi.$$.stderr || exit 1
../libtool --mode=execute ${tool_wrap} @abs_top_builddir@/app/cdi example_const.nc >>cdi.$$.stdout 2>>cdi.$$.stderr || exit 1
../libtool --mode=execute ${tool_wrap} @abs_top_builddir@/app/cdi -s example_const.nc >${cdi_app_stdout} 2>${cdi_app_stderr} || exit 1
../libtool --mode=execute ${tool_wrap} @abs_top_builddir@/app/cdi example_const.nc >>${cdi_app_stdout} 2>>${cdi_app_stderr} || exit 1
echo "$0"
exec 6<cdi.$$.stdout 7<"$0"
exec 6<${cdi_app_stdout} 7<"$0"
while read pattern <&7 ; do
test "x$pattern" != 'x#PATTERNS' || break
......@@ -21,9 +24,9 @@ while read line <&6 ; do
echo "$line" | grep "$pattern" || exit 1
done
if test -s cdi.$$.stderr; then
if test -s ${cdi_app_stderr}; then
echo "unexpected error message from @abs_top_builddir@/app/cdi:"
cat cdi.$$.stderr
cat ${cdi_app_stderr}
exit 1
fi
......@@ -31,7 +34,7 @@ read pattern <&7
test "x$pattern" = 'x#END PATTERNS' || exit 1
exec 5<&- 6<&-
\rm cdi.$$.stdout cdi.$$.stderr example_const.nc
\rm ${cdi_app_stdout} ${cdi_app_stderr} example_const.nc
\rm test_cdf_const.log
#PATTERNS
......
#!@SHELL@
test 'x@ENABLE_NETCDF@' = xyes || exit 77
ncdatafile="test$$.nc"
ncdatafile="$0.nc"
tempfiles="${ncdatafile}"
trap "EC=\$? ; \rm -f ${tempfiles}; exit \$EC" EXIT
......
......@@ -2,13 +2,16 @@
@CREATE_ISOC_FALSE@exit 77
test 'x@ENABLE_NETCDF@' = xyes || exit 77
cdi_read_f2003_stdout="$0.cdi_read_f2003.stdout"
cdi_read_f2003_stderr="$0.cdi_read_f2003.stderr"
format=nc
exec >test_f2003_$format.log 2>&1
../libtool --mode=execute ${tool_wrap} @abs_top_builddir@/examples/cdi_write_f2003 || exit 1
../libtool --mode=execute ${tool_wrap} @abs_top_builddir@/examples/cdi_read_f2003 >cdi_read_f2003.$$.stdout 2>cdi_read_f2003.$$.stderr || exit 1
../libtool --mode=execute ${tool_wrap} @abs_top_builddir@/examples/cdi_read_f2003 >${cdi_read_f2003_stdout} 2>${cdi_read_f2003_stderr} || exit 1
echo "$0"
exec 5<cdi_read_f2003.$$.stdout 6<cdi_read_f2003.$$.stderr 7<"$0"
exec 5<${cdi_read_f2003_stdout} 6<${cdi_read_f2003_stderr} 7<"$0"
while read pattern <&7 ; do
test "x$pattern" != 'x#PATTERNS' || break
done
......@@ -30,7 +33,7 @@ read pattern <&7
test "x$pattern" = 'x#END PATTERNS' || exit 1
exec 5<&- 6<&-
\rm cdi_read_f2003.$$.stdout cdi_read_f2003.$$.stderr
\rm ${cdi_read_f2003_stdout} ${cdi_read_f2003_stderr}
\rm test_f2003_$format.log
#PATTERNS
......
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