From 9190088c6f17ff411d094443d31e2779e45bc142 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Mon, 23 Sep 2019 15:08:24 +0100 Subject: [PATCH] Performance: add test for header extraction --- tests/CMakeLists.txt | 1 + tests/bufr_extract_headers.c | 15 ++++++++++++--- tests/bufr_extract_headers.sh | 30 ++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 3 deletions(-) create mode 100755 tests/bufr_extract_headers.sh diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ea4c3c40b..0c65d771f 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -93,6 +93,7 @@ list( APPEND tests_data_reqd bufr_keys_iter bufr_get_element bufr_wmo_tables + bufr_extract_headers bufr_ecc-673 bufr_ecc-428 bufr_ecc-197 diff --git a/tests/bufr_extract_headers.c b/tests/bufr_extract_headers.c index 8c153139d..5636e0b12 100644 --- a/tests/bufr_extract_headers.c +++ b/tests/bufr_extract_headers.c @@ -21,15 +21,24 @@ int main(int argc,char* argv[]) assert(argc == 2); - filename=argv[1]; + filename = argv[1]; err = codes_bufr_extract_headers_malloc(c, filename, &headers, &num_messages); assert(!err); for (i=0; i $temp1 + ${tools_dir}/bufr_get -f -p $KEYS $input > $temp2 + diff $temp1 $temp2 +done + +rm -f $temp1 $temp2