Merge changes made by Daniel Tipping

This commit is contained in:
Shahram Najm 2019-12-11 15:35:13 +00:00
parent 51a90f19a3
commit 190251afe3
3 changed files with 17 additions and 2 deletions

View File

@ -17,6 +17,7 @@ environment:
GIT_CLONE_DIR: $(ECMWF)\git GIT_CLONE_DIR: $(ECMWF)\git
INSTALL_DIR: $(ECMWF)\install INSTALL_DIR: $(ECMWF)\install
ECCODES_SRC: $(GIT_CLONE_DIR)\eccodes ECCODES_SRC: $(GIT_CLONE_DIR)\eccodes
WINDOWS_TESTING_BASHRC: $(ECCODES_SRC)\tests\windows_testing.bashrc
ECBUILD_SRC: $(GIT_CLONE_DIR)\ecbuild ECBUILD_SRC: $(GIT_CLONE_DIR)\ecbuild
# scripts that are called at very beginning, before repo cloning # scripts that are called at very beginning, before repo cloning
@ -78,7 +79,8 @@ build_script:
-D ENABLE_JPG=1 ^ -D ENABLE_JPG=1 ^
-D IEEE_LE=1 ^ -D IEEE_LE=1 ^
-D ENABLE_MEMFS=0 ^ -D ENABLE_MEMFS=0 ^
-D ENABLE_EXTRA_TESTS=OFF ^ -D ENABLE_EXTRA_TESTS=ON ^
-D WINDOWS_TESTING_BASHRC=%WINDOWS_TESTING_BASHRC% ^
.. ..
- cmd: nmake - cmd: nmake
- cmd: ctest --output-on-failure - cmd: ctest --output-on-failure

View File

@ -12,6 +12,7 @@
#include <assert.h> #include <assert.h>
#define MAX_KEYS 100 #define MAX_KEYS 100
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
char *filename, *keys; char *filename, *keys;
@ -34,7 +35,7 @@ int main(int argc, char* argv[])
printf("ERROR: %s\n",grib_get_error_message(err)); printf("ERROR: %s\n",grib_get_error_message(err));
return 1; return 1;
} }
/* Mimic the behaviour of bufr_get -f -p keys for testing */ /* Mimic the behaviour of bufr_get -f -p keys for testing */
err = parse_keyval_string(NULL, keys, 0, GRIB_TYPE_UNDEFINED, requested_print_keys, &requested_print_keys_count); err = parse_keyval_string(NULL, keys, 0, GRIB_TYPE_UNDEFINED, requested_print_keys, &requested_print_keys_count);
assert(requested_print_keys_count > 0); assert(requested_print_keys_count > 0);

View File

@ -9,3 +9,15 @@ function diff {
command diff --strip-trailing-cr "$@" command diff --strip-trailing-cr "$@"
} }
export -f diff export -f diff
# We occasionally cat text files and use the lines as arguments.
# Carriage returns here cause issues and need to be removed.
function cat {
if [[ $# -eq 1 && "$1" =~ ".txt" ]]
then
command cat "$@" | sed 's/\r$//'
else
command cat "$@"
fi
}
export -f cat