source: XIOS/trunk/xios_test_suite/TEST_SUITE/run_sub_test.sh @ 1824

Last change on this file since 1824 was 1824, checked in by yushan, 22 months ago

XIOS test suite : add scripts for local compile and test. No copy to thredds/forge.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 1.3 KB
Line 
1#!/bin/bash
2
3cp ../context_grid_dynamico.xml ./
4cp ../dynamico_grid.nc ./
5cp ../config.py sub_config.py
6cp ../check.py sub_check.py
7cp ../default_param.py default_param.py
8
9
10{ nb_proc=$(python sub_config.py 2>&1 1>&3-) ;} 3>&1
11
12if [[ ($machine_name == irene) ]]
13then
14    echo "Testing on Irene"
15    echo "build_dir="$build_dir
16    ccc_mprun -n $nb_proc $xios_dir/$build_dir/bin/generic_testcase.exe
17elif [[($machine_name == jeanzay)]]
18then
19    echo "Testing on Jean-Zay" 
20    echo "build_dir="$build_dir
21    srun -n $nb_proc --mpi=pmi2 $xios_dir/$build_dir/bin/generic_testcase.exe
22    if [ $? -ne 0 ]
23        then
24            echo "execution failed"
25            rm -f iodef.xml
26            rm -f user_param.py
27            rm -f default_param.py
28            rm -f sub_config.py
29            rm -f sub_check.py
30            exit 1234
31    fi
32else
33    echo "other machine"
34    exit 1234
35fi
36
37
38{ check_stderr=$(python sub_check.py 2>&1 1>&3-) ;} 3>&1  #captures stderr, letting stdout through
39
40if [[ "$check_stderr" -ne 0 ]]
41then
42    echo "check.py failed"
43    rm -f iodef.xml
44    rm -f user_param.py
45    rm -f default_param.py
46    rm -f sub_config.py
47    rm -f sub_check.py
48    exit 1234
49fi
50
51
52rm -f iodef.xml
53rm -f user_param.py
54rm -f default_param.py
55rm -f sub_config.py
56rm -f sub_check.py
Note: See TracBrowser for help on using the repository browser.