mirror of https://github.com/ecmwf/eccodes.git
Python example: Added shell wrapper script
This commit is contained in:
parent
336d614c1a
commit
ce4635c3be
|
@ -51,6 +51,7 @@ list( APPEND tests
|
|||
bufr_set_keys
|
||||
bufr_subset
|
||||
get_product_kind
|
||||
gts_get_keys
|
||||
)
|
||||
foreach( test ${tests} )
|
||||
ecbuild_add_test( TARGET p_${test}_test
|
||||
|
|
|
@ -6,7 +6,9 @@ TESTS = grib_clone.sh count_messages.sh grib_get_keys.sh grib_index.sh grib_iter
|
|||
samples.sh grib_set_keys.sh set_missing.sh binary_message.sh grib_set_bitmap.sh \
|
||||
bufr_read_header.sh bufr_read_synop.sh bufr_clone.sh bufr_get_keys.sh \
|
||||
bufr_set_keys.sh bufr_expanded.sh bufr_keys_iterator.sh bufr_subset.sh \
|
||||
bufr_attributes.sh get_product_kind.sh bufr_read_temp.sh bufr_read_scatterometer.sh
|
||||
bufr_attributes.sh get_product_kind.sh bufr_read_temp.sh bufr_read_scatterometer.sh \
|
||||
gts_get_keys.sh
|
||||
|
||||
TESTS_ENVIRONMENT = TOPBUILDDIR=$(top_builddir) PYTHON=$(PYTHON)
|
||||
|
||||
noinst_PROGRAMS = p_grib_keys_iterator p_grib_print_data p_grib_iterator p_count_messages
|
||||
|
@ -26,5 +28,6 @@ EXTRA_DIST = $(TESTS) include.sh grib_clone.py count_messages.py grib_get_keys.p
|
|||
bufr_clone.py bufr_get_keys.py bufr_set_keys.py \
|
||||
bufr_expanded.py bufr_keys_iterator.py bufr_subset.py bufr_attributes.py \
|
||||
get_product_kind.py bufr_read_temp.py bufr_read_scatterometer.py \
|
||||
gts_get_keys.py \
|
||||
CMakeLists.txt include.ctest.sh.in
|
||||
endif
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
#!/bin/sh
|
||||
# Copyright 2005-2015 ECMWF.
|
||||
#
|
||||
# This software is licensed under the terms of the Apache Licence Version 2.0
|
||||
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
|
||||
#
|
||||
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
|
||||
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
|
||||
#
|
||||
|
||||
. ./include.sh
|
||||
|
||||
|
||||
#Define a common label for all the tmp files
|
||||
label="gts_get_keys_test_p"
|
||||
|
||||
#Define tmp file
|
||||
fTmp=${label}.tmp.txt
|
||||
rm -f $fTmp | true
|
||||
|
||||
REDIRECT=/dev/null
|
||||
|
||||
#Write the key values into a file
|
||||
$PYTHON gts_get_keys.py 2> $REDIRECT > $fTmp
|
||||
|
||||
#TODO: check the results
|
||||
|
||||
#Clean up
|
||||
rm -f $fTmp | true
|
Loading…
Reference in New Issue