Changeset fa1548b in flexpart.git


Ignore:
Timestamp:
Mar 18, 2016, 10:01:05 AM (3 years ago)
Author:
Ignacio Pisso <Ignacio.Pisso@…>
Branches:
flexpart-noresm
Children:
9a7b372
Parents:
da6ad3f
Message:

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

Location:
tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tests/create_test

    rda6ad3f rfa1548b  
    1515#_${suffix}
    1616
    17 current_dir=$(pwd)
    18 echo test_tmp=$test_tmp
    19 mkdir $test_tmp
     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
    2024
    2125#copy default optios
     26echo copy default options from  $options_default
    2227cp -r $options_default $test_tmp/options
     28
    2329#override default options
    24 if [ -d "$test_dir"  &&  "$(ls -A ${test_dir}/options)" ]; then
     30if [[ -d "$test_dir/options" ]] && [[  "$(ls -A ${test_dir}/options)" ]]; then
    2531  cp -r ${test_dir}/options/* $test_tmp/options/
     32  echo copy specific options for this test from ${test_dir}/options
    2633fi
     34
    2735# copy paths form repo source exec tmp dir
     36echo copy ${test_dir}/pathnames
    2837cp ${test_dir}/pathnames $test_tmp
     38
    2939# make output dir locally
    30 mkdir ${test_tmp}/output
     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
    3151ln -s $FP_exec ${test_tmp}/flexpartnoresm
     52echo link  $FP_exec to ${test_tmp}/flexpartnoresm
    3253
     54echo $test_dir is ready to run
     55echo
    3356#cd $test_tmp
    3457#echo $(pwd)
  • tests/create_tests

    r988b0bd rfa1548b  
    1414fi
    1515
    16 echo $tmp_dir
     16echo create tests in $tmp_dir
    1717#exit
    1818./create_test test_0 $tmp_dir ../../src/flexpartnoresm
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG