Skip to content

Commit ac67b47

Browse files
author
Steve Goldhaber
committed
Add (and check) check metadata file
1 parent ed31686 commit ac67b47

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

test/test_fortran_to_metadata.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,25 @@ sample_meta="${sample_files}/check_fortran_to_metadata.meta"
1313
# Run the script
1414
opts="--ddt-names serling_t"
1515
${f2m_script} --output-root "${tmp_dir}" ${opts} "${test_input}"
16+
res=$?
17+
18+
retval=0
19+
if [ ${res} -ne 0 ]; then
20+
echo "FAIL: ccpp_fortran_to_metadata.py exited with error ${res}"
21+
retval=${res}
22+
elif [ ! -f "${tmp_dir}/${filename}.meta" ]; then
23+
echo "FAIL: metadata file, '${tmp_dir}/${filename}.meta', not created"
24+
retval=1
25+
else
26+
cmp --quiet "${sample_meta}" "${tmp_dir}/${filename}.meta"
27+
res=$?
28+
if [ ${res} -ne 0 ]; then
29+
echo "FAIL: Comparison with correct metadata file failed"
30+
retval=${res}
31+
else
32+
echo "PASS"
33+
# Cleanup
34+
rm "${tmp_dir}/${filename}.meta"
35+
fi
36+
fi
37+
exit ${retval}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
[ccpp-table-properties]
2+
name = do_stuff
3+
type = scheme
4+
5+
[ccpp-arg-table]
6+
name = do_stuff_run
7+
type = scheme
8+
[ const_props ]
9+
standard_name = enter_standard_name_1
10+
units = enter_units
11+
type = ccpp_constituent_prop_ptr_t
12+
dimensions = (enter_standard_name_5:enter_standard_name_6)
13+
intent = in
14+
[ twilight_zone ]
15+
standard_name = enter_standard_name_2
16+
units = enter_units
17+
type = serling_t
18+
dimensions = ()
19+
intent = inout
20+
[ errmsg ]
21+
standard_name = enter_standard_name_3
22+
units = enter_units
23+
type = character | kind = len=512
24+
dimensions = ()
25+
intent = out
26+
[ errflg ]
27+
standard_name = enter_standard_name_4
28+
units = enter_units
29+
type = integer
30+
dimensions = ()
31+
intent = out

0 commit comments

Comments
 (0)