source: flex_extract.git/Testing/Regression/Compare_gribfiles/run_cmp_test.sh @ 53d3b2a

ctbtodev
Last change on this file since 53d3b2a was 53d3b2a, checked in by Anne Philipp <anne.philipp@…>, 4 years ago

added more tests for grib file comparison and removed detected BUGS

  • Property mode set to 100755
File size: 1.5 KB
Line 
1#!/bin/bash
2#
3# @Author: Anne Philipp
4#
5# @Date: November, 20 2019
6#
7# @Description: Starts the comparison script for all cases found in the new
8#               version directory. Results are written to a log file placed
9#               in the Log directory.
10#
11# @Call command:  ./run_cmp_test.sh <reference version> <new version>
12#   
13# @ChangeHistory:
14#
15# @Licence:
16#    (C) Copyright 2014-2019.
17#
18#    SPDX-License-Identifier: CC-BY-4.0
19#
20#    This work is licensed under the Creative Commons Attribution 4.0
21#    International License. To view a copy of this license, visit
22#    http://creativecommons.org/licenses/by/4.0/ or send a letter to
23#    Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
24#
25# @Example:
26#         ./run_cmp_test.sh 7.0.4 7.1
27#
28
29if [ $# -eq 0 ]; then
30  echo "No arguments passed"
31  exit
32fi
33
34if [ $# -eq 1 ]; then
35  echo "Second argument is missing"
36  exit
37fi
38
39old_version=$1
40new_version=$2
41
42current_time=$(date "+%Y-%m-%d_%H-%M-%S")
43testcases=`ls ${new_version}/`
44
45echo 'Test to compare GRIB files between two versions'
46echo 'Compare GRIB files between version ' + old_version + ' and version ' + new_version + ' : \n' > Log/log_$current_time
47
48for case in $testcases; do
49
50  if [[ "$case" == "Controls" ]]; then 
51    continue
52  fi 
53  echo "Compare $case ..."
54  python test_cmp_grib_file.py -r 7.0.4/${case}/ -n 7.1/${case}/ -p '*' >> Log/log_$current_time 2>&1
55
56  echo "===================================================================================================" >> Log/log_$current_time
57
58done
59
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG