Browse Source

Moved tester to extra repository

It is now in https://git.io-warnemuende.de/iow_esm/tester.git
1.02.00
Sven Karsten 1 year ago
parent
commit
04cc3a82f5
  1. 3
      .gitignore
  2. 1
      test/.gitignore
  3. 80
      test/test.sh
  4. 22
      test/test_config.example

3
.gitignore vendored

@ -8,4 +8,5 @@ tools/
postprocess/
input/
gui/__pycache__/
gui.log
gui.log
tester/

1
test/.gitignore vendored

@ -1 +0,0 @@
IOW_ESM/

80
test/test.sh

@ -1,80 +0,0 @@
#!/bin/bash
echo "###############################################"
echo "## ##"
echo "## IOW earth-system model ##"
echo "## ##"
echo "###############################################"
echo ""
echo "###############################################"
echo "## Testing the model ##"
echo "###############################################"
echo ""
if [ $# -gt 1 ]; then
echo "Usage: `basename "$0"` [<test_config>]"
echo "<test_config> path to a test config file."
echo "If left empty the test_config.example is used: user-specific!"
exit
fi
if [ $# -eq 1 ]; then
test_config=$1
else
test_config="./test_config.example"
fi
echo "Apply test config: set version, main_dir, machine, user_at_host, test_dir, setups."
source ${test_config}
echo $src ${main_dir} $machine $user_at_host $test_dir $setups
echo "Check for mandatory settings and apply defaults."
if [ -z $src ] || [ -z ${main_dir} ] || [ -z $machine ] || [ -z $user_at_host ] || [ -z $test_dir ] || [ "${#setups[@]}" -eq 0 ]; then
echo "Some mandatory variable is not correctly set in $test_config"
exit
fi
mkdir -p ${main_dir}
if [ -d $src ]; then
echo "Synchronize contents from ${version}/* to ${main_dir}/"
rsync -avz --exclude "test" --exclude ".git" `realpath ${src}`/* `realpath ${main_dir}`/ --delete
cd ${main_dir}
else
echo "Create main directory ${main_dir}"
cd ${main_dir}
echo "Get main repository from https://git.io-warnemuende.de/iow_esm/main.git"
git clone --branch $src https://git.io-warnemuende.de/iow_esm/main.git .
echo "Get all other reposirtories"
./clone_origins.sh
fi
echo "Register the base destination ${machine}_base ${user_at_host}:${test_dir}/base"
echo "${machine}_base ${user_at_host}:${test_dir}/base" > DESTINATIONS
echo "Build the components..."
./build.sh ${machine}_base
echo "done."
echo "$setups" > SETUPS
echo "Run all the given test setups..."
for setup in `awk '{print $1}' SETUPS`; do
echo " Prepare work directory for setup $setup."
ssh -t ${user_at_host} "if [ -d ${test_dir}/${setup} ]; then rm -r ${test_dir}/${setup}; fi"
ssh -t ${user_at_host} "cp -as ${test_dir}/base ${test_dir}/${setup}"
echo " Register specific destination."
echo "${machine}_${setup} ${user_at_host}:${test_dir}/${setup}" >> DESTINATIONS
echo " Deploy test setup $setup"
./deploy_setups.sh ${machine}_${setup} ${setup}
echo " Run setup $setup"
./run.sh ${machine}_${setup}
done

22
test/test_config.example

@ -1,22 +0,0 @@
# directory where the code will be stored (can be relative to the directory where the test.sh script is)
main_dir="./IOW_ESM"
# source of the code
# can be a path to the root directory (absolute or relative to test directory)
src=".."
# or a name of a branch existing in https://git.io-warnemuende.de/iow_esm/main.git like e.g.
#src="1.01.00"
# Note that if src is not an existing directory it is assumed to be a branch name
# user-specific settings
# machine keyword
machine="hlrng"
# your user name and host name corresponding to machine name
user_at_host="mvkkarst@glogin"
# directory where the tests will be done on the target machine
test_dir="/scratch/usr/mvkkarst/test_area"
# setups that will be tested in format of the usual SETUPS file
setups="coupled_example mvkkarst@glogin:/scratch/usr/mviowmod/IOW_ESM/setups/MOM5_Baltic-CCLM_Eurocordex/example_8nm_0.22deg/1.00.00
CCLM_example mvkkarst@glogin:/scratch/usr/mviowmod/IOW_ESM/setups/CCLM_Eurocordex/example_0.22deg/1.00.00
MOM5_example mvkkarst@glogin:/scratch/usr/mviowmod/IOW_ESM/setups/MOM5_Baltic/example_8nm/1.00.00
I2LM_example mvkkarst@glogin:/scratch/usr/mviowmod/IOW_ESM/setups/I2LM_Eurocordex/example_ERAI_0.22deg/1.00.00"
Loading…
Cancel
Save