[cig-commits] [commit] devel: updates scripts in tests/ directory and adds test-subdirectory for testing tomography/ routines (f0f8e99)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Tue Dec 23 00:31:34 PST 2014
Repository : https://github.com/geodynamics/specfem3d
On branch : devel
Link : https://github.com/geodynamics/specfem3d/compare/584a39ee0888ae25566edef90e71b95d02125c27...f0f8e998e9ef3805ca57e1d6c2ecd3a55015e3d8
>---------------------------------------------------------------
commit f0f8e998e9ef3805ca57e1d6c2ecd3a55015e3d8
Author: daniel peter <peterda at ethz.ch>
Date: Tue Dec 23 09:17:17 2014 +0100
updates scripts in tests/ directory and adds test-subdirectory for testing tomography/ routines
>---------------------------------------------------------------
f0f8e998e9ef3805ca57e1d6c2ecd3a55015e3d8
tests/auxiliaries/0.compile.default_make.sh | 30 +++++++++++++++-------
tests/compilations/0.configure.serial_make.sh | 2 ++
tests/compilations/1.configure.default_make.sh | 2 ++
.../2.configure.main_binaries_available.sh | 8 +++++-
.../3.configure.supplement_binaries_available.sh | 6 ++++-
tests/decompose_mesh/0.compile.default_make.sh | 9 ++++---
tests/decompose_mesh/1.test_read.sh | 2 ++
tests/decompose_mesh/2.test_valence.sh | 2 ++
tests/decompose_mesh/3.test_partitioning.sh | 2 ++
tests/decompose_mesh/test_partitioning.makefile | 1 +
tests/decompose_mesh/test_read.makefile | 1 +
tests/decompose_mesh/test_valence.makefile | 1 +
tests/generate_databases/0.compile.default_make.sh | 8 +++---
tests/meshfem3D/0.compile.default_make.sh | 8 +++---
tests/run_all_tests.sh | 12 ++++++++-
tests/specfem3D/0.compile.default_make.sh | 8 +++---
16 files changed, 78 insertions(+), 24 deletions(-)
diff --git a/tests/auxiliaries/0.compile.default_make.sh b/tests/auxiliaries/0.compile.default_make.sh
index 3e863a9..5655bec 100755
--- a/tests/auxiliaries/0.compile.default_make.sh
+++ b/tests/auxiliaries/0.compile.default_make.sh
@@ -25,19 +25,31 @@ rm -rf ./bin ./obj ./setup ./OUTPUT_FILES
$srcdir/configure >> $testdir/results.log 2>&1
# single compilation
-echo "compilation: auxiliaries" >> $testdir/results.log
+echo "compilation: $testdir" >> $testdir/results.log
make clean >> $testdir/results.log 2>&1
make -j 4 aux >> $testdir/results.log 2>&1
-# check
-if [ ! -e bin/xcombine_vol_data ]; then
- echo "binary does not exist! xcombine_vol_data" >> $testdir/results.log
- echo "compilation of auxiliaries failed, please check..." >> $testdir/results.log
- exit 1
-else
- echo "binary exists: xcombine_vol_data" >> $testdir/results.log
-fi
+echo "" >> $testdir/results.log
+
+# checks executable availability
+exec=( xcombine_vol_data \
+ xcombine_surf_data \
+ xcreate_movie_shakemap_AVS_DX_GMT \
+ )
+
+for var in ${exec[@]};
+do
+ # check
+ if [ ! -e bin/$var ]; then
+ echo "binary does not exist! $var" >> $testdir/results.log
+ echo "compilation of $testdir failed, please check..." >> $testdir/results.log
+ exit 1
+ else
+ echo "binary exists: $var" >> $testdir/results.log
+ fi
+done
+echo "" >> $testdir/results.log
#cleanup
rm -rf ./bin/*
diff --git a/tests/compilations/0.configure.serial_make.sh b/tests/compilations/0.configure.serial_make.sh
index 3db332b..27fd66f 100755
--- a/tests/compilations/0.configure.serial_make.sh
+++ b/tests/compilations/0.configure.serial_make.sh
@@ -34,6 +34,8 @@ make clean >> $testdir/results.log 2>&1
# parallel make
make -j 4 all >> $testdir/results.log 2>&1
+echo "" >> $testdir/results.log
+
# checks exit code
if [[ $? -ne 0 ]]; then
echo >> $testdir/results.log
diff --git a/tests/compilations/1.configure.default_make.sh b/tests/compilations/1.configure.default_make.sh
index e1446a6..991bd8a 100755
--- a/tests/compilations/1.configure.default_make.sh
+++ b/tests/compilations/1.configure.default_make.sh
@@ -34,6 +34,8 @@ make clean >> $testdir/results.log 2>&1
# parallel make
make -j 4 all >> $testdir/results.log 2>&1
+echo "" >> $testdir/results.log
+
# checks exit code
if [[ $? -ne 0 ]]; then
echo >> $testdir/results.log
diff --git a/tests/compilations/2.configure.main_binaries_available.sh b/tests/compilations/2.configure.main_binaries_available.sh
index 182d44c..c85f736 100755
--- a/tests/compilations/2.configure.main_binaries_available.sh
+++ b/tests/compilations/2.configure.main_binaries_available.sh
@@ -20,7 +20,12 @@ echo "directory: `pwd`" >> $testdir/results.log
# checks if all main executables exist
echo "checking if main binaries exist" >> $testdir/results.log
-exec=( xdecompose_mesh xmeshfem3D xgenerate_databases xspecfem3D )
+exec=( xdecompose_mesh \
+ xmeshfem3D \
+ xgenerate_databases \
+ xspecfem3D \
+ )
+
for var in ${exec[@]};
do
# single compilation
@@ -36,6 +41,7 @@ do
echo "binary exists: $var" >> $testdir/results.log
fi
done
+echo "" >> $testdir/results.log
cd $testdir/
echo "successful compilation" >> $testdir/results.log
diff --git a/tests/compilations/3.configure.supplement_binaries_available.sh b/tests/compilations/3.configure.supplement_binaries_available.sh
index e072b89..00ad5ae 100755
--- a/tests/compilations/3.configure.supplement_binaries_available.sh
+++ b/tests/compilations/3.configure.supplement_binaries_available.sh
@@ -29,7 +29,9 @@ exec=( xcombine_surf_data \
xmodel_update \
xsmooth_sem \
xsum_kernels \
- xsum_preconditioned_kernels )
+ xsum_preconditioned_kernels \
+ )
+
for var in ${exec[@]};
do
# single compilation
@@ -37,6 +39,7 @@ do
make clean >> $testdir/results.log 2>&1
make -j 4 $var >> $testdir/results.log 2>&1
+ echo "" >> $testdir/results.log
# check
if [ ! -e bin/$var ]; then
echo "compilation of $var failed, please check..." >> $testdir/results.log
@@ -45,6 +48,7 @@ do
echo "binary exists: $var" >> $testdir/results.log
fi
done
+echo "" >> $testdir/results.log
echo "successful compilation" >> $testdir/results.log
diff --git a/tests/decompose_mesh/0.compile.default_make.sh b/tests/decompose_mesh/0.compile.default_make.sh
index 21ac832..9b12eb3 100755
--- a/tests/decompose_mesh/0.compile.default_make.sh
+++ b/tests/decompose_mesh/0.compile.default_make.sh
@@ -1,9 +1,6 @@
#!/bin/bash
testdir=`pwd`
-# executable
-var=xdecompose_mesh
-
#checks if ROOT valid
if [ -z "${ROOT}" ]; then export ROOT=../../ ; fi
@@ -27,11 +24,16 @@ rm -rf ./bin ./obj ./setup ./OUTPUT_FILES
# default configuration
$srcdir/configure >> $testdir/results.log 2>&1
+# executable
+var=xdecompose_mesh
+
# single compilation
echo "compilation: $var" >> $testdir/results.log
make clean >> $testdir/results.log 2>&1
make -j 4 $var >> $testdir/results.log 2>&1
+echo "" >> $testdir/results.log
+
# check
if [ ! -e bin/$var ]; then
echo "compilation of $var failed, please check..." >> $testdir/results.log
@@ -39,6 +41,7 @@ if [ ! -e bin/$var ]; then
else
echo "binary exists: $var" >> $testdir/results.log
fi
+echo "" >> $testdir/results.log
#cleanup
rm -rf ./bin/*
diff --git a/tests/decompose_mesh/1.test_read.sh b/tests/decompose_mesh/1.test_read.sh
index 23e419b..521e072 100755
--- a/tests/decompose_mesh/1.test_read.sh
+++ b/tests/decompose_mesh/1.test_read.sh
@@ -20,6 +20,8 @@ echo "compilation: $var" >> $testdir/results.log
make -f $var.makefile $var >> $testdir/results.log 2>&1
+echo "" >> $testdir/results.log
+
# check
if [ ! -e ./bin/$var ]; then
echo "compilation of $var failed, please check..." >> $testdir/results.log
diff --git a/tests/decompose_mesh/2.test_valence.sh b/tests/decompose_mesh/2.test_valence.sh
index e49461a..c7be28d 100755
--- a/tests/decompose_mesh/2.test_valence.sh
+++ b/tests/decompose_mesh/2.test_valence.sh
@@ -20,6 +20,8 @@ echo "compilation: $var" >> $testdir/results.log
make -f $var.makefile $var >> $testdir/results.log 2>&1
+echo "" >> $testdir/results.log
+
# check
if [ ! -e ./bin/$var ]; then
echo "compilation of $var failed, please check..." >> $testdir/results.log
diff --git a/tests/decompose_mesh/3.test_partitioning.sh b/tests/decompose_mesh/3.test_partitioning.sh
index 385cf49..9c2e4f7 100755
--- a/tests/decompose_mesh/3.test_partitioning.sh
+++ b/tests/decompose_mesh/3.test_partitioning.sh
@@ -20,6 +20,8 @@ echo "compilation: $var" >> $testdir/results.log
make -f $var.makefile $var >> $testdir/results.log 2>&1
+echo "" >> $testdir/results.log
+
# check
if [ ! -e ./bin/$var ]; then
echo "compilation of $var failed, please check..." >> $testdir/results.log
diff --git a/tests/decompose_mesh/test_partitioning.makefile b/tests/decompose_mesh/test_partitioning.makefile
index 8a60700..b2f4ba3 100644
--- a/tests/decompose_mesh/test_partitioning.makefile
+++ b/tests/decompose_mesh/test_partitioning.makefile
@@ -12,6 +12,7 @@ OBJECTS = \
$O/fault_scotch.dec.o \
$O/part_decompose_mesh.dec.o \
$O/param_reader.cc.o \
+ $O/shared_par.shared_module.o \
$O/read_parameter_file.shared.o \
$O/read_value_parameters.shared.o \
$O/sort_array_coordinates.shared.o \
diff --git a/tests/decompose_mesh/test_read.makefile b/tests/decompose_mesh/test_read.makefile
index bc6b0a8..3b95dea 100644
--- a/tests/decompose_mesh/test_read.makefile
+++ b/tests/decompose_mesh/test_read.makefile
@@ -12,6 +12,7 @@ OBJECTS = \
$O/fault_scotch.dec.o \
$O/part_decompose_mesh.dec.o \
$O/param_reader.cc.o \
+ $O/shared_par.shared_module.o \
$O/read_parameter_file.shared.o \
$O/read_value_parameters.shared.o \
$O/sort_array_coordinates.shared.o \
diff --git a/tests/decompose_mesh/test_valence.makefile b/tests/decompose_mesh/test_valence.makefile
index af452e6..10d5b8d 100644
--- a/tests/decompose_mesh/test_valence.makefile
+++ b/tests/decompose_mesh/test_valence.makefile
@@ -12,6 +12,7 @@ OBJECTS = \
$O/fault_scotch.dec.o \
$O/part_decompose_mesh.dec.o \
$O/param_reader.cc.o \
+ $O/shared_par.shared_module.o \
$O/read_parameter_file.shared.o \
$O/read_value_parameters.shared.o \
$O/sort_array_coordinates.shared.o \
diff --git a/tests/generate_databases/0.compile.default_make.sh b/tests/generate_databases/0.compile.default_make.sh
index 8bff4cb..c70b673 100755
--- a/tests/generate_databases/0.compile.default_make.sh
+++ b/tests/generate_databases/0.compile.default_make.sh
@@ -1,9 +1,6 @@
#!/bin/bash
testdir=`pwd`
-# executable
-var=xgenerate_databases
-
#checks if ROOT valid
if [ -z "${ROOT}" ]; then export ROOT=../../ ; fi
@@ -27,11 +24,16 @@ rm -rf ./bin ./obj ./setup ./OUTPUT_FILES
# default configuration
$srcdir/configure >> $testdir/results.log 2>&1
+# executable
+var=xgenerate_databases
+
# single compilation
echo "compilation: $var" >> $testdir/results.log
make clean >> $testdir/results.log 2>&1
make -j 4 $var >> $testdir/results.log 2>&1
+echo "" >> $testdir/results.log
+
# check
if [ ! -e bin/$var ]; then
echo "compilation of $var failed, please check..." >> $testdir/results.log
diff --git a/tests/meshfem3D/0.compile.default_make.sh b/tests/meshfem3D/0.compile.default_make.sh
index 60de671..c2f2c77 100755
--- a/tests/meshfem3D/0.compile.default_make.sh
+++ b/tests/meshfem3D/0.compile.default_make.sh
@@ -1,9 +1,6 @@
#!/bin/bash
testdir=`pwd`
-# executable
-var=xmeshfem3D
-
#checks if ROOT valid
if [ -z "${ROOT}" ]; then export ROOT=../../ ; fi
@@ -27,11 +24,16 @@ rm -rf ./bin ./obj ./setup ./OUTPUT_FILES
# default configuration
$srcdir/configure >> $testdir/results.log 2>&1
+# executable
+var=xmeshfem3D
+
# single compilation
echo "compilation: $var" >> $testdir/results.log
make clean >> $testdir/results.log 2>&1
make -j 4 $var >> $testdir/results.log 2>&1
+echo "" >> $testdir/results.log
+
# check
if [ ! -e bin/$var ]; then
echo "compilation of $var failed, please check..." >> $testdir/results.log
diff --git a/tests/run_all_tests.sh b/tests/run_all_tests.sh
index cfd5b6e..034f8dc 100755
--- a/tests/run_all_tests.sh
+++ b/tests/run_all_tests.sh
@@ -27,8 +27,18 @@ fi
echo "main directory: $dir"
echo "all tests starting: `date`"
+# sub-directories
+tests=( compilations \
+ decompose_mesh \
+ meshfem3D \
+ generate_databases \
+ specfem3D \
+ auxiliaries \
+ tomography \
+ )
+
# loops over subdirectories
-for testdir in ./*/
+for testdir in ${tests[@]};
do
testdir=${testdir%*/}
diff --git a/tests/specfem3D/0.compile.default_make.sh b/tests/specfem3D/0.compile.default_make.sh
index 2677887..f10d99c 100755
--- a/tests/specfem3D/0.compile.default_make.sh
+++ b/tests/specfem3D/0.compile.default_make.sh
@@ -1,9 +1,6 @@
#!/bin/bash
testdir=`pwd`
-# executable
-var=xspecfem3D
-
#checks if ROOT valid
if [ -z "${ROOT}" ]; then export ROOT=../../ ; fi
@@ -27,11 +24,16 @@ rm -rf ./bin ./obj ./setup ./OUTPUT_FILES
# default configuration
$srcdir/configure >> $testdir/results.log 2>&1
+# executable
+var=xspecfem3D
+
# single compilation
echo "compilation: $var" >> $testdir/results.log
make clean >> $testdir/results.log 2>&1
make -j 4 $var >> $testdir/results.log 2>&1
+echo "" >> $testdir/results.log
+
# check
if [ ! -e bin/$var ]; then
echo "compilation of $var failed, please check..." >> $testdir/results.log
More information about the CIG-COMMITS
mailing list