source: XIOS/trunk/xios_test_suite/TEST_SUITE/run_test @ 1818

Last change on this file since 1818 was 1818, checked in by ymipsl, 2 years ago

XIOS test suite : adapt script for jean-zay
YM

  • Property svn:executable set to *
File size: 2.9 KB
Line 
1#!/bin/bash
2
3source ../ARCH/arch-${arch}.env
4cd .. ; source load_env ; cd RUN_TEST_SUITE
5
6export machine_name=$xios_machine_name
7export machine_full_name=$xios_full_machine_name
8export xios_dir=$(bash -c "cd ../.. && pwd" 2>&1)
9export reference_dir=${xios_reference_dir}
10export reference_file=xios_reference.tar.gz
11export reference_folder=xios_reference
12
13export build_dir=build_${arch}_${mode}
14export xios_revision=$(svn info --show-item revision ../.. 2>&1)
15export relurl=$(svn info --show-item relative-url ../.. 2>&1)
16
17
18set -x
19
20
21bash -c "cd ../.. && ./make_xios --arch_path `pwd`/../ARCH --arch ${arch} --${mode} --build_dir ${build_dir} --job 16"
22
23#----------- Fetch reference -----------
24cp ${reference_dir}/${reference_file} ./
25tar -xzvf ${reference_file}
26
27rm -f ${reference_file}
28
29for i in $(ls ${reference_folder}/) 
30do
31  folder=${i%%}
32  bash -c "cd ${folder} && rm -rf config_*"
33  bash -c "cp -r ${reference_folder}/${folder}/config_* ./${folder}"
34done
35
36rm -rf ${reference_folder}
37
38
39rm -f plein_report.txt
40
41echo "#revision" ${xios_revision} >> plein_report.txt
42echo "#relurl" ${relurl} >> plein_report.txt
43echo "#machine" ${machine_name} >> plein_report.txt
44echo "#build_dir" ${xios_dir}/${build_dir} >> plein_report.txt
45echo "#arch" ${arch} >> plein_report.txt
46echo "#mode" ${mode} >> plein_report.txt
47
48
49rm -f setup.sh
50touch setup.sh
51>setup.sh
52for i in $(ls -d test_*/)
53do
54  cp setup.py ${i%%/}     
55  cp run_sub_test.sh ${i%%/}   
56  echo "bash -c \"cd " ${i%%/} " && python setup.py\" ">> setup.sh
57  echo "echo \"setup.py called from " ${i%%/} "\"">> setup.sh
58done
59
60export output=$(python user_config.py 2>&1 >/dev/null)
61
62if [ "$output" -ne 0 ]
63then
64        echo "user_config.py failed"
65        exit
66else
67        echo "user_config.py OK"
68fi
69
70
71cmake .
72ctest -V
73#ctest --output-on-failure
74make report
75
76rm -f test_*/setup.py
77rm -f test_*/run_sub_test.sh
78rm -f test_*/run_test_*.py
79rm -f test_*/CMakeLists.txt
80rm -f test_*/context_grid_dynamico.xml
81rm -f test_*/dynamico_grid.nc
82rm -f test_*/default_param.pyc
83rm -f test_*/user_param.pyc
84rm -f test_*/user_param.py.*
85
86rundir=${xios_test_suite_repository}/RUN
87mkdir -p $rundir ; CHMOD  rundir
88mkdir -p ${rundir}/test_${machine_name} ; CHMOD ${xios_test_suite_repository}/test_${machine_name}
89
90cp plein_report.txt ${rundir}/test_${machine_name}/test_${xios_revision}_${machine_name}_${arch}_${mode}.txt
91CHMOD ${rundir}/test_${machine_name}/test_${xios_revision}_${machine_name}_${arch}_${mode}.txt
92
93mkdir -p ${rundir}/def_files ;  CHMOD ${rundir}/RUN/def_files
94mkdir -p ${rundir}/def_files/${xios_revision} ;  CHMOD ${rundir}/def_files/${xios_revision}
95
96for i in $(ls -d test_*/)
97do
98  mkdir -p ${rundir}/def_files/${xios_revision}/${i%%}
99  cp ${i%%}/user_params.def ${rundir}/def_files/${xios_revision}/${i%%}     
100  for j in $(ls -d ${i%%/}/config_*)
101  do
102    mkdir -p ${rundir}/def_files/${xios_revision}/${j%%}
103    cp ${j%%}/setup/all_param.def ${rundir}/def_files/${xios_revision}/${j%%} 
104  done
105  CHMOD ${rundir}/def_files
106done
107
Note: See TracBrowser for help on using the repository browser.