]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Provide a run script for tests to submit to a dashboard (first step...)
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 18 Sep 2013 14:06:49 +0000 (14:06 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 18 Sep 2013 14:06:49 +0000 (14:06 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@30789 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/CTestConfig.cmake
deal.II/doc/development/Config.sample
deal.II/run_testsuite.cmake [new file with mode: 0644]
tests/CMakeLists.txt
tests/README

index c6407397e88ec356cfa673a7f55392f7d990a289..901b10225937c8854f312b9997c6071114ba14e5 100644 (file)
 ##
 ## ---------------------------------------------------------------------
 
+
+########################################################################
+#                                                                      #
+#                        General configuration:                        #
+#                                                                      #
+########################################################################
+
 SET(CTEST_PROJECT_NAME "deal.II")
 
 SET(CTEST_NIGHTLY_START_TIME "1:00:00 UTC")
 
+# TODO Drop method
+
+#
+# Coverage options:
+#
+
 SET(CTEST_CUSTOM_COVERAGE_EXCLUDE
   "/bundled"
   "/CMakeFiles/CMakeTmp/"
@@ -25,3 +38,17 @@ SET(CTEST_CUSTOM_COVERAGE_EXCLUDE
   )
 
 SET(CTEST_USE_LAUNCHERS 1)
+
+
+########################################################################
+#                                                                      #
+#                    Site and Build configuration:                     #
+#                                                                      #
+########################################################################
+
+FIND_PROGRAM(HOSTNAME_COMMAND NAMES hostname)
+EXEC_PROGRAM(${HOSTNAME_COMMAND} OUTPUT_VARIABLE _hostname)
+SET(CTEST_SITE "${_hostname}")
+
+SET(CTEST_BUILD_NAME "${CMAKE_SYSTEM}-${CMAKE_SYSTEM_PROCESSOR}-compiler")
+MESSAGE(FATAL_ERROR "${CMAKE_SYSTEM}-${CMAKE_SYSTEM_PROCESSOR}")
index df14dc07d3bc0d9deb6d4a67d72906babe08d56d..0aadca83ccbcb99252465aa69ed10999459872ba 100644 (file)
 
 
 
+###########################################################################
+#                                                                         #
+#                 Configuration Options for the Testsuite:                #
+#                                                                         #
+###########################################################################
+
+
+
+#
+# You can limit the tests that will be set up by the setup_test target by
+# setting TEST_PICKUP_REGEX:
+#
+# SET(TEST_PICKUP_REGEX "" CACHE STRING
+#   "A regular expression to control which tests will be configured"
+#   )
+#
+#
+# If numdiff is found, the TEST_DIFF defaults to 'numdiff -a 1e-6 -s ' \t\n:'
+# otherwise pure diff will be used. You can set your own diff command via
+#
+# SET(TEST_DIFF "" CACHE STRING
+#   "The diff tool and command line to use"
+#   )
+#
+#
+# SET(TEST_TIME_LIMITTEST_DIFF "180" CACHE STRING
+#   "The time limit (in seconds) a single test (build, run, diff) is allowed to run"
+#   )
+#
+#
+# An optional hint to the numdiff executable:
+# SET(NUMDIFF_DIR "/.../..." CACHE PATH "")
+#
+
+
+
 ###########################################################################
 #                                                                         #
 #                         Advanced Configuration:                         #
diff --git a/deal.II/run_testsuite.cmake b/deal.II/run_testsuite.cmake
new file mode 100644 (file)
index 0000000..bb9f9e7
--- /dev/null
@@ -0,0 +1,111 @@
+## ---------------------------------------------------------------------
+## $Id$
+##
+## Copyright (C) 2013 by the deal.II authors
+##
+## This file is part of the deal.II library.
+##
+## The deal.II library is free software; you can use it, redistribute
+## it, and/or modify it under the terms of the GNU Lesser General
+## Public License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+## The full text of the license can be found in the file LICENSE at
+## the top level of the deal.II distribution.
+##
+## ---------------------------------------------------------------------
+
+########################################################################
+#                                                                      #
+#                             Test setup:                              #
+#                                                                      #
+########################################################################
+
+#
+# TRACK
+#
+# DEAL_II_NO_JOBS
+# DEAL_II_CONFIG_FILE
+#
+# CTEST_SOURCE_DIRECTORY
+# CTEST_BINARY_DIRECTORY
+#
+# CTEST_CMAKE_GENERATOR
+#
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+MESSAGE("-- This is CTest ${CTEST_VERSION}")
+
+
+IF("${CTEST_SOURCE_DIRECTORY}" STREQUAL "")
+  #
+  # If CTEST_SOURCE_DIRECTORY is not set we just assume that this script
+  # was called residing in the source directory.
+  #
+  SET(CTEST_SOURCE_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
+ENDIF()
+
+MESSAGE("-- CTEST_SOURCE_DIRECTORY: ${CTEST_SOURCE_DIRECTORY}")
+
+
+IF("${CTEST_BINARY_DIRECTORY}" STREQUAL "")
+  #
+  # If CTEST_BINARY_DIRECTORY is not set we just use the current directory
+  # except it is equal to CTEST_SOURCE_DIRECTORY in which case we fail.
+  #
+  SET(CTEST_BINARY_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+
+  IF("${CTEST_BINARY_DIRECTORY}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
+    MESSAGE(FATAL_ERROR "
+ctest was invoked in the source directory and CTEST_BINARY_DIRECTORY is not set.
+Please either call ctest from within a designated build directory, or set CTEST_BINARY_DIRECTORY accordingly."
+      )
+  ENDIF()
+ENDIF()
+
+MESSAGE("-- CTEST_BINARY_DIRECTORY: ${CTEST_BINARY_DIRECTORY}")
+
+
+IF("${DEAL_II_NO_JOBS}" STREQUAL "")
+  SET(DEAL_II_NO_JOBS "1")
+ENDIF()
+
+MESSAGE("-- DEAL_II_NO_JOBS: ${DEAL_II_NO_JOBS}")
+
+
+########################################################################
+#                                                                      #
+#                          Run the testsuite:                          #
+#                                                                      #
+########################################################################
+
+IF("${TRACK}" STREQUAL "Experimental")
+
+  #
+  # TRACK Experimental:
+  #
+  # It is assumed that the build directory is already configured
+  #
+  # - Run the configure, build and test stages and submit the results to
+  #   the "Experimental" track
+  #
+  # - No cleanup is done prior to test run
+  #
+
+  CTEST_START(Experimental TRACK Experimental)
+  CTEST_CONFIGURE() # just reconfigure (without any options)
+  CTEST_BUILD(TARGET setup_test) # setup tests
+  CTEST_BUILD(TARGET) # builds the "all" target
+  CTEST_TEST(PARALLEL_LEVEL ${DEAL_II_NO_JOBS})
+  CTEST_SUBMIT()
+
+ELSE()
+
+  MESSAGE(FATAL_ERROR "TRACK has to be set TODO")
+
+ENDIF()
+
+#IF(NOT "${DEAL_II_CONFIG_FILE}" STREQUAL "")
+#  CTEST_CONFIGURE(OPTIONS -C"${DEAL_II_CONFIG_FILE}")
+#ELSE()
+#  CTEST_CONFIGURE()
+#ENDIF()
index 95e998ccf228453926c87376a88c2e140bd97eb5..2a34868a652bf17bddb50b63ad974e4f61cab461 100644 (file)
@@ -135,7 +135,6 @@ FOREACH(_category ${_categories})
     DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_category}
     COMMENT "Processing ./tests/${_category}"
     )
-  ADD_DEPENDENCIES(setup_test_${_category} library)
   ADD_DEPENDENCIES(setup_test setup_test_${_category})
 
   ADD_CUSTOM_TARGET(clean_test_${_category}
index 349a7c47c17fd1a40802006b055eebba5b86bc78..b9c5912d0dc15d42fbb6799483c43727164c958a 100644 (file)
@@ -137,6 +137,11 @@ CMake configuration variables for the testsuite
 
 The testsuite has the following options:
 
+  TEST_PICKUP_REGEX
+    - A regular expression to filter tests. If this is a nonempty string
+      only tests that match the regular expression will be set up. An empty
+      string is interpreted as a catchall.
+
   TEST_DIFF
     - the diff tool and command line to use for comparison. If numdiff is
       available it defaults to "numdiff -a 1e-6 -q", otherwise plain diff
@@ -146,11 +151,6 @@ The testsuite has the following options:
     - The time limit (in seconds) a single test is allowed to run. Defaults
       to 180 seconds
 
-  TEST_PICKUP_REGEX
-    - A regular expression to filter tests. If this is a nonempty string
-      only tests that match the regular expression will be set up. An empty
-      string is interpreted as a catchall.
-
 These options can be set as environment variables prior to the call to the
 setup_test target:
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.