Text archives Help
- From: "James Bigler" <bigler@cs.utah.edu>
- To: manta@sci.utah.edu
- Subject: [Manta] r2134 - trunk/tests
- Date: Thu, 28 Feb 2008 16:01:24 -0700 (MST)
Author: bigler
Date: Thu Feb 28 16:01:24 2008
New Revision: 2134
Added:
trunk/tests/common.sh
Modified:
trunk/tests/GenerateTest.cmake
trunk/tests/SmokeTest.arachne.sh
trunk/tests/SmokeTest.taz.sh
Log:
GenerateTest.cmake
Added MANTA_REAL output. I'm guessing the arachne builds were using
float for the double tests.
Set the SCI_SIGNALMODE=exit environment variable from the cmake script.
Set the test timeout to 5 minutes.
SmokeTest.arachne.sh
SmokeTest.taz.sh
Use the new common.sh interface.
common.sh
Wrapped up most of the interesting bits of the testing script into
functions that can be called from individual scripts.
Modified: trunk/tests/GenerateTest.cmake
==============================================================================
--- trunk/tests/GenerateTest.cmake (original)
+++ trunk/tests/GenerateTest.cmake Thu Feb 28 16:01:24 2008
@@ -100,6 +100,9 @@
FILE(APPEND "${SCRIPT_NAME}" " MANTA_SSE:BOOL=OFF
MANTA_SSE_GCC:BOOL=OFF\n")
ENDIF(ENABLE_SSE)
+# Real type
+FILE(APPEND "${SCRIPT_NAME}" " MANTA_REAL:STRING=${REAL_TYPE}\n")
+
# Scenes
FILE(APPEND "${SCRIPT_NAME}" " SCENE_GALILEO:BOOL=ON
SCENE_GRIDISOVOL:BOOL=ON SCENE_OCTISOVOL:BOOL=ON SCENE_VORPAL:BOOL=ON
SCENE_VOLUMETEST:BOOL=ON\n")
@@ -108,6 +111,13 @@
FILE(APPEND "${SCRIPT_NAME}" " BUILD_TESTING:BOOL=ON\n")
FILE(APPEND "${SCRIPT_NAME}" "\")\n")
+# Environment variables
+FILE(APPEND "${SCRIPT_NAME}" "SET(CTEST_ENVIRONMENT\n")
+FILE(APPEND "${SCRIPT_NAME}" " \"SCI_SIGNALMODE=exit\"\n") # Tells the
thread library to exit when an exception is thrown
+FILE(APPEND "${SCRIPT_NAME}" ")\n")
+
+# Timeout
+FILE(APPEND "${SCRIPT_NAME}" "SET(CTEST_TIMEOUT \"600\")\n")
Modified: trunk/tests/SmokeTest.arachne.sh
==============================================================================
--- trunk/tests/SmokeTest.arachne.sh (original)
+++ trunk/tests/SmokeTest.arachne.sh Thu Feb 28 16:01:24 2008
@@ -2,51 +2,46 @@
#
# 1 02 * * * bash
/home/sci/bigler/manta/dashboard/arachne/tests/SmokeTest.arachne.sh >>
/home/sci/bigler/manta/dashboard/arachne/logs/tests.log 2>&1
#
-echo "#############################################"
-echo "Started "`date`
-echo "#"
-source /home/sci/bigler/.bashrc
-# This will cause the program to exit right away if it fails
-export SCI_SIGNALMODE=exit
+# Get the path to the script directory
+TEST_SCRIPT_PATH=`dirname $0`
+source $TEST_SCRIPT_PATH/common.sh
-MANTA_SRC_PATH=/home/sci/bigler/manta/dashboard/arachne
-MANTA_LOG_DIR=${MANTA_SRC_PATH}/logs
+start_time;
-# Test parameters
+#######################################################
+# Set parameters. Set these before calling setup below
+
+#########
+# These ones will figure them selves out, but you can override them here
+
+# Set this if cmake isn't in your default path
+#PATH_TO_CMAKE=/usr/local/bin
+
+# Path to manta source tree
+#MANTA_SRC_PATH=/home/sci/bigler/manta/dashboard/arachne
+
+# Path to where to write the script logs
+#MANTA_LOG_PATH=${MANTA_SRC_PATH}/logs
+
+#######
+# These ones should always be set, but their values can be overriden from
the command line
+
+# Number of cores to run the tests on
NP=16
+# Number of threads to use for a parallel build
MAKE_PARALLEL=1
-#TEST_TYPE=Experimental
+# Type of test, can be Experimental or Nightly (or something supported by
ctest)
TEST_TYPE=Nightly
+# Weather or not to do a clean build
CLEAN_BUILD=ON
-# Make the log directory if it doesn't exist
-if [[ ! -d ${MANTA_LOG_DIR} ]]; then mkdir ${MANTA_LOG_DIR};fi
-
-#ctest -S /Users/bigler/manta/testing/src/tests/SmokeTest.cmake -V >>
/Users/bigler/manta/testing/logs/`date +%F`.log 2>&1
-
-cd ${MANTA_SRC_PATH}/tests
+# Make sure you pass in the script arguments '$@'
+setup $@;
-###################################################################
-echo "Starting SSETest: "`date`
-cmake -DBUILD_DIR:STRING=build-ctest-sse -DCLEAN_BUILD:BOOL=$CLEAN_BUILD
-DTEST_TYPE:STRING=$TEST_TYPE -DNUM_CORES:INTEGER=$NP
-DMAKE_PARALLEL:INTEGER=$MAKE_PARALLEL -DENABLE_SSE:BOOL=TRUE
-DREAL_TYPE:STRING=float -DSCRIPT_NAME:STRING=arachne.sse.cmake -P
GenerateTest.cmake
-#
-ctest -S arachne.sse.cmake -V >> ${MANTA_LOG_DIR}/`date +%F`.log 2>&1
-
-###################################################################
-echo "Starting NoSSEFloatTest: "`date`
-cmake -DBUILD_DIR:STRING=build-ctest-nosse-float
-DCLEAN_BUILD:BOOL=$CLEAN_BUILD -DTEST_TYPE:STRING=$TEST_TYPE
-DNUM_CORES:INTEGER=$NP -DMAKE_PARALLEL:INTEGER=$MAKE_PARALLEL
-DENABLE_SSE:BOOL=FALSE -DREAL_TYPE:STRING=float
-DSCRIPT_NAME:STRING=arachne.nosse-float.cmake -P GenerateTest.cmake
-#
-ctest -S arachne.nosse-float.cmake -V >> ${MANTA_LOG_DIR}/`date +%F`.log 2>&1
-#ctest -S ${MANTA_SRC_PATH}/tests/NoSSEFloatTest.cmake -V >>
${MANTA_LOG_DIR}/`date +%F`.log 2>&1
-
-###################################################################
-echo "Starting NoSSEDoubleTest: "`date`
-cmake -DBUILD_DIR:STRING=build-ctest-nosse-double
-DCLEAN_BUILD:BOOL=$CLEAN_BUILD -DTEST_TYPE:STRING=$TEST_TYPE
-DNUM_CORES:INTEGER=$NP -DMAKE_PARALLEL:INTEGER=$MAKE_PARALLEL
-DENABLE_SSE:BOOL=FALSE -DREAL_TYPE:STRING=double
-DSCRIPT_NAME:STRING=arachne.nosse-double.cmake -P GenerateTest.cmake
-#
-ctest -S arachne.nosse-double.cmake -V >> ${MANTA_LOG_DIR}/`date +%F`.log
2>&1
-#ctest -S ${MANTA_SRC_PATH}/tests/NoSSEDoubleTest.cmake -V >>
${MANTA_LOG_DIR}/`date +%F`.log 2>&1
+run_sse_test;
+run_nosse_float_test;
+run_nosse_double_test;
-echo "#"
-echo "Finished "`date`
+finish_time;
Modified: trunk/tests/SmokeTest.taz.sh
==============================================================================
--- trunk/tests/SmokeTest.taz.sh (original)
+++ trunk/tests/SmokeTest.taz.sh Thu Feb 28 16:01:24 2008
@@ -2,13 +2,46 @@
#
# 1 02 * * * bash
/Users/bigler/manta/testing/src/tests/SmokeTest.taz.sh >>
/Users/bigler/manta/testing/logs/tests.log 2>&1
#
-echo "#############################################"
-echo "Started "`date`
-echo "#"
-source /Users/bigler/.bashrc
-#ctest -S /Users/bigler/manta/testing/src/tests/SmokeTest.cmake -V >>
/Users/bigler/manta/testing/logs/`date +%F`.log 2>&1
-ctest -S /Users/bigler/manta/testing/src/tests/SSETest.cmake -V >>
/Users/bigler/manta/testing/logs/`date +%F`.log 2>&1
-ctest -S /Users/bigler/manta/testing/src/tests/NoSSEFloatTest.cmake -V >>
/Users/bigler/manta/testing/logs/`date +%F`.log 2>&1
-ctest -S /Users/bigler/manta/testing/src/tests/NoSSEDoubleTest.cmake -V >>
/Users/bigler/manta/testing/logs/`date +%F`.log 2>&1
-echo "#"
-echo "Finished "`date`
+
+# Get the path to the script directory
+TEST_SCRIPT_PATH=`dirname $0`
+source $TEST_SCRIPT_PATH/common.sh
+
+start_time;
+
+#######################################################
+# Set parameters. Set these before calling setup below
+
+#########
+# These ones will figure them selves out, but you can override them here
+
+# Set this if cmake isn't in your default path
+PATH_TO_CMAKE=/opt/local/bin
+
+# Path to manta source tree
+#MANTA_SRC_PATH=/home/sci/bigler/manta/testing/src
+
+# Path to where to write the script logs
+#MANTA_LOG_PATH=${MANTA_SRC_PATH}/logs
+
+#######
+# These ones should always be set, but their values can be overriden from
the command line
+
+# Number of cores to run the tests on
+NP=8
+# Number of threads to use for a parallel build
+MAKE_PARALLEL=12
+# Type of test, can be Experimental or Nightly (or something supported by
ctest)
+TEST_TYPE=Nightly
+# Weather or not to do a clean build
+CLEAN_BUILD=ON
+
+
+# Make sure you pass in the script arguments '$@'
+setup $@;
+
+run_sse_test;
+run_nosse_float_test;
+run_nosse_double_test;
+
+finish_time;
Added: trunk/tests/common.sh
==============================================================================
--- (empty file)
+++ trunk/tests/common.sh Thu Feb 28 16:01:24 2008
@@ -0,0 +1,116 @@
+# This defines some functions common to all the test scripts
+
+start_time()
+{
+ echo "#############################################"
+ echo "Started "`date`
+ echo "#"
+}
+
+finish_time()
+{
+ echo "#"
+ echo "Finished "`date`
+}
+
+setup()
+{
+ while [ "$1" != "" ]; do
+ case "$1" in
+ --experimental)
+ echo "doing experimental build";
+ TEST_TYPE=Experimental;;
+ --nightly)
+ echo "doing nightly build";
+ TEST_TYPE=Nightly;;
+ --cleanbuild)
+ echo "cleaning the build before running test";
+ CLEAN_BUILD=ON;;
+ --nocleanbuild)
+ echo "not cleaning the build before running test";
+ CLEAN_BUILD=OFF;;
+ --makeparallel)
+ shift 1;
+ MAKE_PARALLEL=$1;
+ echo "Using $MAKE_PARALLEL tread(s) for compilation";;
+ --np)
+ shift 1;
+ NP=$1;
+ echo "Testing with $NP core(s)";;
+ *)
+ echo "unrecognized argument ${1}";;
+ esac
+ shift 1
+ done
+
+ # Add the path to cmake to the list if specified
+ if [[ -d $PATH_TO_CMAKE ]]; then
+ echo "adding $PATH_TO_CMAKE to the path"
+ export PATH=$PATH_TO_CMAKE:$PATH;
+ echo "PATH = $PATH"
+ fi
+
+ # Set the MANTA_SRC_PATH
+ if [[ ! $MANTA_SRC_PATH ]]; then
+ MANTA_SRC_PATH=$TEST_SCRIPT_PATH/..;
+ echo "MANTA_SRC_PATH not found. Setting to $MANTA_SRC_PATH";
+ fi
+
+ echo "MANTA_SRC_PATH = $MANTA_SRC_PATH"
+
+ if [[ ! $MANTA_LOG_PATH ]]; then
+ MANTA_LOG_PATH=$MANTA_SRC_PATH/logs
+ echo "MANTA_LOG_PATH not found. Setting to $MANTA_LOG_PATH";
+ fi
+
+ # Make sure the log directory exists
+ if [[ ! -d ${MANTA_LOG_PATH} ]]; then
+ mkdir ${MANTA_LOG_PATH};
+ fi
+
+ # Move to our working directory
+ cd $MANTA_SRC_PATH/tests
+}
+
+run_test()
+{
+ if [[ $# != 3 ]]; then
+ echo "Wrong number of arguments passed to $0. Wanted 3 and got $#"
+ return 1;
+ fi
+
+ test_name=$1
+ enable_sse=$2
+ real_type=$3
+ script_name=`hostname`.$test_name.cmake
+ echo "#"
+ echo "Starting $test_name test: "`date`
+
+ cmake \
+ -DBUILD_DIR:STRING=build-ctest-$test_name \
+ -DCLEAN_BUILD:BOOL=$CLEAN_BUILD \
+ -DTEST_TYPE:STRING=$TEST_TYPE \
+ -DNUM_CORES:INTEGER=$NP \
+ -DMAKE_PARALLEL:INTEGER=$MAKE_PARALLEL \
+ -DENABLE_SSE:BOOL=$enable_sse \
+ -DREAL_TYPE:STRING=$real_type \
+ -DSCRIPT_NAME:STRING=$script_name \
+ -P GenerateTest.cmake
+
+ ctest -S $script_name -V >> ${MANTA_LOG_PATH}/`date +%F`.log 2>&1
+}
+
+run_sse_test()
+{
+ run_test "sse" "TRUE" "float"
+}
+
+run_nosse_float_test()
+{
+ run_test "nosse-float" "FALSE" "float"
+}
+
+run_nosse_double_test()
+{
+ run_test "nosse-double" "FALSE" "double"
+}
- [Manta] r2134 - trunk/tests, James Bigler, 02/28/2008
Archive powered by MHonArc 2.6.16.