Testing: GTS compare

This commit is contained in:
Shahram Najm 2024-01-03 10:55:55 +00:00
parent 279ff53a4c
commit 7424b76096
2 changed files with 16 additions and 1 deletions

View File

@ -64,7 +64,20 @@ set -e
# Add correct blocklist
${tools_dir}/gts_compare -b GG $gts_file $fGtsTmp
#----------------------------------------------------
# Compare using -c
#----------------------------------------------------
temp1=temp.$label.1.gts
temp2=temp.$label.2.gts
# Pick two messages which do have different contents
${tools_dir}/gts_copy -w count=1 $gts_file $temp1
${tools_dir}/gts_copy -w count=4 $gts_file $temp2
${tools_dir}/gts_compare -c theMessage $temp1 $temp2
rm -f $temp1 $temp2
#----------------------------------------------------
# Test with file of the same name in a dir
#----------------------------------------------------
tempDir=temp.$label.dir
rm -fr $tempDir
mkdir $tempDir

View File

@ -611,8 +611,10 @@ static int compare_values(grib_runtime_options* options, grib_handle* h1, grib_h
case GRIB_TYPE_BYTES:
if (verbose)
printf(" as bytes\n");
if (options->mode == MODE_GTS)
if (options->mode == MODE_GTS) {
// We do not want to compare the message itself
return 0;
}
if (len1 < 2)
len1 = 512;
if (len2 < 2)