4 changed files with 2 additions and 104 deletions
@ -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 |
@ -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…
Reference in new issue