]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Port mesh_converter tests part II
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 20 Oct 2013 13:35:01 +0000 (13:35 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 20 Oct 2013 13:35:01 +0000 (13:35 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@31329 0785d39b-7218-0410-832d-ea1e28bc413d

15 files changed:
deal.II/cmake/config/Config.cmake.in
deal.II/cmake/scripts/CMakeLists.txt
deal.II/cmake/scripts/normalize.pl
deal.II/contrib/mesh_conversion/CMakeLists.txt
deal.II/contrib/parameter_gui/CMakeLists.txt
deal.II/tests/CMakeLists.txt
deal.II/tests/mesh_converter/CMakeLists.txt
deal.II/tests/mesh_converter/meshes/2d/2d_test.ucd
deal.II/tests/mesh_converter/meshes/2d/quad.ucd
deal.II/tests/mesh_converter/meshes/3d/CC_cubit_new.ucd
deal.II/tests/mesh_converter/meshes/3d/CC_cubit_old.ucd
deal.II/tests/mesh_converter/meshes/3d/other_simple.ucd
deal.II/tests/mesh_converter/meshes/3d/test_cube_1.ucd
deal.II/tests/mesh_converter/meshes/3d/test_cube_pave_1.ucd
deal.II/tests/mesh_converter/meshes/3d/test_cube_two_materials.ucd

index 53417f2bdf1b42c8b88224527a799eb7efca8551..8d5cd1a74dc598907d5949391f8352f6c686c46e 100644 (file)
@@ -173,6 +173,7 @@ SET(DEAL_II_LIBRARIES "@CONFIG_LIBRARIES@")
 #
 
 IF(DEAL_II_BUILD_DIR)
+  SET(DEAL_II_EXECUTABLE_CONFIG "${DEAL_II_PATH}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Executables.cmake")
   SET(DEAL_II_TARGET_CONFIG "${DEAL_II_PATH}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}BuildTargets.cmake")
 ELSE()
   SET(DEAL_II_TARGET_CONFIG "${DEAL_II_PATH}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Targets.cmake")
index 0032e33aaf6b44a54556b196451882df08e8f67c..6e000ece9b064e13ba29326425a3ced122a1bf4a 100644 (file)
@@ -22,7 +22,6 @@ IF(NOT CMAKE_CROSSCOMPILING)
       PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEAL_II_COMMON_RELDIR}/scripts
       )
     INSTALL(TARGETS expand_instantiations
-      EXPORT ${DEAL_II_PROJECT_CONFIG_NAME}Targets
       DESTINATION ${DEAL_II_COMMON_RELDIR}/scripts
       COMPONENT compat_files
       )
@@ -94,8 +93,11 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
     )
 
   INSTALL(TARGETS make_dependencies report_features
-    EXPORT ${DEAL_II_PROJECT_CONFIG_NAME}Targets
     DESTINATION ${DEAL_II_COMMON_RELDIR}/scripts
     COMPONENT compat_files
     )
+  EXPORT(TARGETS make_dependencies report_features
+    FILE ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Executables.cmake
+    APPEND
+    )
 ENDIF()
index 2f08a93153e87c76e324152c6e9f4a4e04b070a6..b29534ec1be27508fc72c22426d9009a281c45aa 100644 (file)
 
 s/JobId.*//;
 
+# Remove Input File Name:
+
+s/# Input file name:.*//;
+
 # Several date and time strings
 
 s/%%Creation Date:.*//;
index 72e26ef2c4df77a3102206c362016fc47bed1a8c..f17569af7d5ee1b64af3b489cbdd14b28951a2e7 100644 (file)
@@ -32,7 +32,11 @@ IF("${DEAL_II_EXECUTABLE_RELDIR}" STREQUAL "")
 ENDIF()
 
 INSTALL(TARGETS mesh_converter_exe
-  RUNTIME
-  DESTINATION ${DEAL_II_EXECUTABLE_RELDIR}
+  RUNTIME DESTINATION ${DEAL_II_EXECUTABLE_RELDIR}
   COMPONENT mesh_converter
   )
+EXPORT(TARGETS mesh_converter_exe
+  FILE
+  ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Executables.cmake
+  APPEND
+  )
index 7ff3f24f7efac2c21502c709380cace44bca021e..c06c0823dc19e7eeb858b966ca1882ce3020df18 100644 (file)
@@ -59,4 +59,8 @@ INSTALL(TARGETS parameter_gui_exe
   RUNTIME DESTINATION ${DEAL_II_EXECUTABLE_RELDIR}
   COMPONENT parameter_gui
   )
+EXPORT(TARGETS parameter_gui_exe
+  FILE ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Executables.cmake
+  APPEND
+  )
 
index 6ae3f7be6e6e98179c3fd645fd44d009d112ac50..5c8cd37da1b9e33824cf7004859b8433c21dfff4 100644 (file)
@@ -64,7 +64,7 @@ ENDFOREACH()
 # Glob together a list of all subfolders to set up:
 #
 FILE(GLOB _categories RELATIVE ${TEST_DIR} ${TEST_DIR}/*)
-SET(_categories all-headers build_tests ${_categories})
+SET(_categories all-headers build_tests mesh_converter ${_categories})
 
 #
 # Define a subproject for every enabled category:
index 7226a6dcf09e66598c982a6bd884cbd47100e777..464e2714f42d35d6b2b3056a89653dd35ca0ed73 100644 (file)
@@ -17,7 +17,7 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
 INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
+INCLUDE(${DEAL_II_EXECUTABLE_CONFIG})
 
 #
 # Tests for the mesh_converter executable
@@ -25,17 +25,17 @@ INCLUDE(${DEAL_II_TARGET_CONFIG})
 
 SET(_category mesh_converter)
 
-FILE(GLOB _meshes ${CMAKE_CURRENT_SOURCE_DIR}/meshes/?d/*.ucd)
+FILE(GLOB _meshes ${CMAKE_CURRENT_SOURCE_DIR}/meshes/?d/*.inp)
 
 FOREACH(_full_file ${_meshes})
-  GET_FILENAME_COMPONENT(_mesh ${_full_file} NAME)
+  GET_FILENAME_COMPONENT(_mesh ${_full_file} NAME_WE)
 
   SET(_test_full ${_category}/${_mesh})
   SET(_target ${_mesh})
   SET(_diff_target ${_target}.diff)
   SET(_test_directory ${CMAKE_CURRENT_BINARY_DIR}/${_target}) # directory to run the test in
 
-  STRING(REGEX REPLACE "\\.ucd$" ".inp" _comparison_file ${_full_file})
+  STRING(REGEX REPLACE "\\.inp$" ".ucd" _comparison_file ${_full_file})
 
   SET(_dim 3)
   IF(_full_file MATCHES "meshes/2d")
@@ -56,15 +56,18 @@ FOREACH(_full_file ${_meshes})
       COMMAND rm -f ${_test_directory}/failing_output
       COMMAND touch ${_test_directory}/output
       COMMAND
-        mesh_converter ${_dim} < ${_full_file} > output
+        mesh_converter_exe ${_dim} ${_full_file} output
         || (mv ${_test_directory}/output
                ${_test_directory}/failing_output
             && echo "${_test_full}: RUN failed. ------ Result: ${_test_directory}/failing_output"
             && echo "${_test_full}: RUN failed. ------ Partial output:"
             && cat ${_test_directory}/failing_output
             && exit 1)
+      COMMAND
+        ${PERL_EXECUTABLE} -pi ${DEAL_II_SOURCE_DIR}/cmake/scripts/normalize.pl
+                               ${_test_directory}/output
       WORKING_DIRECTORY ${_test_directory}
-      DEPENDS mesh_converter
+      DEPENDS mesh_converter_exe ${DEAL_II_SOURCE_DIR}/cmake/scripts/normalize.pl
       )
     ADD_CUSTOM_COMMAND(OUTPUT ${_test_directory}/diff
       COMMAND rm -f ${_test_directory}/failing_diff
index ce3777ab7024f655e989c2e76479d94227d59e12..9f67909260969029ad9713bc64b0e4d85057356c 100644 (file)
@@ -1,6 +1,6 @@
 # FEM Mesh Converter
 # Mesh type: AVS UCD
-# Input file name: meshes/2d/2d_test.inp
+
 133    114     0       0       0
 1       -1.00000000e+00          0.00000000e+00        0.00000000e+00  
 2       -1.00000000e+00         -1.66666700e-01        0.00000000e+00  
index f795dc26f69664c8b26214cfb93407369658a812..e7f13e28f2792ea956a3c4448972ef5ccd4a271b 100644 (file)
@@ -1,6 +1,6 @@
 # FEM Mesh Converter
 # Mesh type: AVS UCD
-# Input file name: meshes/2d/quad.inp
+
 9      12      0       0       0
 1       -1.00000000e+00          1.00000000e+00        0.00000000e+00  
 2       -1.00000000e+00          0.00000000e+00        0.00000000e+00  
index 9ad647c5c0cc551002fe065a9b01aec9916e65c8..bc68a51d6d6a51b545b52d685d9352c4cc4b3727 100644 (file)
@@ -1,6 +1,6 @@
 # FEM Mesh Converter
 # Mesh type: AVS UCD
-# Input file name: meshes/3d/CC_cubit_new.inp
+
 54     48      0       0       0
 1       -5.00000000e-01         -5.00000000e-01          5.00000000e-01        
 2       -5.00000000e-01         -5.00000000e-01          0.00000000e+00        
index 9ee9cfb67196050f962316cc687cfcc6ddb5964e..bc68a51d6d6a51b545b52d685d9352c4cc4b3727 100644 (file)
@@ -1,6 +1,6 @@
 # FEM Mesh Converter
 # Mesh type: AVS UCD
-# Input file name: meshes/3d/CC_cubit_old.inp
+
 54     48      0       0       0
 1       -5.00000000e-01         -5.00000000e-01          5.00000000e-01        
 2       -5.00000000e-01         -5.00000000e-01          0.00000000e+00        
index cff408f3af2257061a228d6f7ca463a5ba05dd2b..ea545e612d5c1849ee92a8f4bf0d4ded214c763f 100644 (file)
@@ -1,6 +1,6 @@
 # FEM Mesh Converter
 # Mesh type: AVS UCD
-# Input file name: meshes/3d/other_simple.inp
+
 8      1       0       0       0
 1        0.00000000e+00          0.00000000e+00          0.00000000e+00        
 2        0.00000000e+00          0.00000000e+00          5.00000000e+01        
index b2fd6f7eab66dc1270a24086d2372bca314ede19..5f81d2d6b6b25c70eb19f84036158d10c5fa8a20 100644 (file)
@@ -1,6 +1,6 @@
 # FEM Mesh Converter
 # Mesh type: AVS UCD
-# Input file name: meshes/3d/test_cube_1.inp
+
 8      7       0       0       0
 1       -1.00000000e+00         -1.00000000e+00          1.00000000e+00        
 2       -1.00000000e+00         -1.00000000e+00         -1.00000000e+00        
index c30c24f6fb0763bad97f453b4a9b485f694c097f..71be64e6348a7197a5a244cf6dc99399d600a344 100644 (file)
@@ -1,6 +1,6 @@
 # FEM Mesh Converter
 # Mesh type: AVS UCD
-# Input file name: meshes/3d/test_cube_pave_1.inp
+
 39     48      0       0       0
 1        1.00000000e+00          1.00000000e+00          0.00000000e+00        
 2        5.00000000e-01          1.00000000e+00          0.00000000e+00        
index 0a62d1607686eca144ac2ccac1dc6a146409d326..a81424856ce128a0782de50fd0cb0b95612a404f 100644 (file)
@@ -1,6 +1,6 @@
 # FEM Mesh Converter
 # Mesh type: AVS UCD
-# Input file name: meshes/3d/test_cube_two_materials.inp
+
 27     32      0       0       0
 1       -1.00000000e+00         -1.00000000e+00          1.00000000e+00        
 2       -1.00000000e+00         -1.00000000e+00          0.00000000e+00        

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.