source: flexpart.git/tests/create_test @ fa1548b

flexpart-noresm
Last change on this file since fa1548b was fa1548b, checked in by Ignacio Pisso <Ignacio.Pisso@…>, 8 years ago

test whether directories already exist from previous test runs and print those to stdout

  • Property mode set to 100755
File size: 1.4 KB
Line 
1#!/bin/bash
2
3#input FP exec
4test_dir=$1
5base_dir=$2
6FP_exec=$3
7options_default=../options
8
9#echo FP_exec=$FP_exec
10#echo $FLEXOUT_TMP
11
12#suffix=$(date "+%y-%m-%d_%H%M%S")
13#test_tmp=${FLEXOUT_TMP}${base_dir}${test_dir}
14test_tmp=${base_dir}${test_dir}
15#_${suffix}
16
17#current_dir=$(pwd)
18if [[ -d "$test_tmp" ]] ; then
19  echo  $test_tmp already exists
20else 
21  echo create test in $test_tmp
22  mkdir $test_tmp
23fi
24
25#copy default optios
26echo copy default options from  $options_default
27cp -r $options_default $test_tmp/options
28
29#override default options
30if [[ -d "$test_dir/options" ]] && [[  "$(ls -A ${test_dir}/options)" ]]; then
31  cp -r ${test_dir}/options/* $test_tmp/options/
32  echo copy specific options for this test from ${test_dir}/options
33fi
34
35# copy paths form repo source exec tmp dir
36echo copy ${test_dir}/pathnames
37cp ${test_dir}/pathnames $test_tmp
38
39# make output dir locally
40if [[ -d "$test_tmp/output" ]]; then
41  echo  $test_tmp/output already exists
42else
43  mkdir ${test_tmp}/output
44  echo create ${test_tmp}/output
45fi
46
47if [[ -L "${test_tmp}/flexpartnoresm" ]]; then
48  rm ${test_tmp}/flexpartnoresm
49  echo remove existing link ${test_tmp}/flexpartnoresm 
50fi
51ln -s $FP_exec ${test_tmp}/flexpartnoresm
52echo link  $FP_exec to ${test_tmp}/flexpartnoresm
53
54echo $test_dir is ready to run
55echo
56#cd $test_tmp
57#echo $(pwd)
58#echo $FP_exec
59#echo run $FP_exec '; stdout to  out.log'
60#$FP_exec   &> out.log # both out and err
61
62
63
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG