mirror of https://github.com/ecmwf/eccodes.git
Separate the tests on stdin which fail on M$oft Windows
This commit is contained in:
parent
395a3a52e4
commit
539c9c2b17
|
@ -295,6 +295,7 @@ endif()
|
|||
if( EC_OS_NAME MATCHES "windows" )
|
||||
# Symbols need to be explicitly exported on Windows so we can link to dlls.
|
||||
set( CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE )
|
||||
set( ECCODES_ON_WINDOWS TRUE )
|
||||
|
||||
# Suppress compliler warnings - see ECC-850
|
||||
# Suppress warnings about using 'insecure' functions. Fixing this would require changes all over
|
||||
|
|
|
@ -250,6 +250,14 @@ ecbuild_add_test( TARGET eccodes_t_grib_lamb_az_eq_area
|
|||
|
||||
# These ones are conditional
|
||||
###########################################
|
||||
ecbuild_add_test( TARGET eccodes_t_tools_data_from_stdin
|
||||
TYPE SCRIPT
|
||||
CONDITION NOT ECCODES_ON_WINDOWS
|
||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tools_data_from_stdin.sh
|
||||
TEST_DEPENDS eccodes_download_bufrs
|
||||
)
|
||||
|
||||
|
||||
if( ENABLE_EXTRA_TESTS AND HAVE_ECCODES_THREADS )
|
||||
ecbuild_add_executable( TARGET grib_encode_pthreads
|
||||
NOINSTALL
|
||||
|
|
|
@ -39,8 +39,5 @@ set -e
|
|||
vcount=`${tools_dir}/bufr_count -f $temp`
|
||||
[ "$vcount" = "2" ]
|
||||
|
||||
# Reading from stdin
|
||||
count2=`cat $input | ${tools_dir}/bufr_count -`
|
||||
[ $count -eq $count2 ]
|
||||
|
||||
rm -f $temp
|
||||
|
|
|
@ -48,15 +48,6 @@ ${tools_dir}/bufr_ls -p totalLength,bufrHeaderCentre,bufrHeaderSubCentre,masterT
|
|||
awk NR==3 $fTmp | awk '{split($0,a," "); for (i=1; i<=8; i++) print a[i]}' > $res_ls
|
||||
diff $ref_ls $res_ls
|
||||
|
||||
#-------------------------------------------
|
||||
# Test reading from stdin
|
||||
#-------------------------------------------
|
||||
f="aaen_55.bufr"
|
||||
cat $f | ${tools_dir}/bufr_ls -
|
||||
result1=`${tools_dir}/bufr_get -p numberOfSubsets $f`
|
||||
result2=`cat $f | ${tools_dir}/bufr_get -p numberOfSubsets -`
|
||||
[ "$result1" = "$result2" ]
|
||||
|
||||
|
||||
rm -f $fLog $res_ls
|
||||
rm -f $fTmp
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
# Copyright 2005-2019 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
|
||||
|
||||
input=${data_dir}/bufr/syno_multi.bufr
|
||||
|
||||
# Test bufr_count
|
||||
# ---------------
|
||||
count=`cat $input | ${tools_dir}/bufr_count -`
|
||||
[ $count -eq 3 ]
|
||||
|
||||
# Test bufr_ls
|
||||
#--------------
|
||||
input=${data_dir}/bufr/aaen_55.bufr
|
||||
cat $input | ${tools_dir}/bufr_ls -
|
||||
result1=`${tools_dir}/bufr_get -p numberOfSubsets $input`
|
||||
result2=`cat $input | ${tools_dir}/bufr_get -p numberOfSubsets -`
|
||||
[ "$result1" = "$result2" ]
|
||||
|
Loading…
Reference in New Issue