source: flexpart.git/tests/NILU/run_test @ a5ef7ec

10.4.1_peseiGFS_025bugfixes+enhancementsdevrelease-10release-10.4.1scaling-bug
Last change on this file since a5ef7ec was a5ef7ec, checked in by Ignacio Pisso <Ignacio.Pisso@…>, 9 years ago

modify verbosity of bash test scripts

  • Property mode set to 100755
File size: 1.6 KB
RevLine 
[1333256]1#!/bin/bash
2
3#input FP exec
[1be76d8]4test_dir=$1  # name of dir with pathname and options to be used
5FP_exec=$2   # path to executable to be run
6base_dir=$3  # base for the output
7options_default=$4
[a5ef7ec]8
9echo run test '>' input
10echo $1
11echo $2
12echo $3
13echo $4
14
15#  echo name= $name
16#  echo working dir= $path_tests/test_$name
17#  echo executable= $FP_exec
18#  echo default options from $options_default
[1be76d8]19 
20#echo FP_exec=$FP_exec
[a5ef7ec]21echo env var FLEXOUT_TMP=$FLEXOUT_TP
[1333256]22
23#suffix=$(date "+%y-%m-%d_%H%M%S")
24test_tmp=${FLEXOUT_TMP}${base_dir}${test_dir}
25#_${suffix}
26
27current_dir=$(pwd)
[1be76d8]28#echo test_tmp=$test_tmp
[1333256]29mkdir $test_tmp
30
[a5ef7ec]31echo run test '>' copy default options to temp dir
32echo from  $options_default  to $test_tmp/options
[1be76d8]33cp -r $options_default $test_tmp/options
[1333256]34#override default options
[a5ef7ec]35echo copy test options files to temp dir
36echo ${test_dir}/options/* $test_tmp/options/
37cp   ${test_dir}/options/* $test_tmp/options/
38echo copy test options/SPECIES to temp dir if needed
39
40if [ -d "${test_dir}/options/SPECIES" ]; then
41echo from ${test_dir}/options/SPECIES/* to $test_tmp/options/SPECIES/
42cp        ${test_dir}/options/SPECIES/*    $test_tmp/options/SPECIES/
43fi
44
[1333256]45# copy paths form repo source exec tmp dir
[a5ef7ec]46echo copy test pathnames to temp dir
[1333256]47cp ${test_dir}/pathnames $test_tmp
[a5ef7ec]48echo create output dir ${test_tmp}/output
[1333256]49mkdir ${test_tmp}/output
50
51#cp test_1/run $test_tmp
52
53cd $test_tmp
[1be76d8]54#echo $(pwd)
55#echo $FP_exec
[1333256]56#  '&>' o is bash for both out and err
[1be76d8]57#echo run $FP_exec   to  out.log #&
58#$FP_exec   &> out.log #&
[a5ef7ec]59echo execute test
[1be76d8]60$FP_exec > stdout.log 2> stderr.log #&
[a5ef7ec]61echo flexpart terminated
[1333256]62
63
64
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG