Revision: 75912
http://sourceforge.net/p/brlcad/code/75912
Author: starseeker
Date: 2020-05-24 17:20:13 +0000 (Sun, 24 May 2020)
Log Message:
-----------
More regress test work
Modified Paths:
--------------
brlcad/branches/bioh/regress/CMakeLists.txt
brlcad/branches/bioh/regress/burst/CMakeLists.txt
brlcad/branches/bioh/regress/nurbs/regress-nurbs-test.cmake.in
brlcad/branches/bioh/regress/pkg/CMakeLists.txt
Added Paths:
-----------
brlcad/branches/bioh/regress/burst/regress-burst.cmake.in
Removed Paths:
-------------
brlcad/branches/bioh/regress/burst/regress-burst-ktank.cmake.in
Modified: brlcad/branches/bioh/regress/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/regress/CMakeLists.txt 2020-05-24 15:45:06 UTC (rev
75911)
+++ brlcad/branches/bioh/regress/CMakeLists.txt 2020-05-24 17:20:13 UTC (rev
75912)
@@ -24,10 +24,10 @@
add_subdirectory(nurbs)
# libpkg Regression Tests
-#add_subdirectory(pkg)
+add_subdirectory(pkg)
# Burst Regression Tests
-#add_subdirectory(burst)
+add_subdirectory(burst)
# RtWizard Image Generation Regression Tests
#add_subdirectory(rtwizard)
Modified: brlcad/branches/bioh/regress/burst/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/regress/burst/CMakeLists.txt 2020-05-24 15:45:06 UTC
(rev 75911)
+++ brlcad/branches/bioh/regress/burst/CMakeLists.txt 2020-05-24 17:20:13 UTC
(rev 75912)
@@ -1,9 +1,3 @@
-if(CMAKE_CONFIGURATION_TYPES)
- set(cfg_testname "-${CMAKE_CFG_INTDIR}")
-else(CMAKE_CONFIGURATION_TYPES)
- set(cfg_testname "")
-endif(CMAKE_CONFIGURATION_TYPES)
-
set(BURST_INPUT_FILES
ktank.b
ktank_air.ids
@@ -11,6 +5,8 @@
ktank_crit.ids
)
+BRLCAD_REGRESSION_TEST(regress-burst "burst;ktank.g" EXEC burst)
+
set(BURST_CLEAN_FILES
ktank_burst.plot
ktank_burst.pix
@@ -19,33 +15,12 @@
ktank_burst.shotlines
burst_ktank.log
)
-
-set(LOG_FILE
"${CMAKE_CURRENT_BINARY_DIR}/regress${cfg_testname}-burst-ktank.log")
-set(STAMP_FILE "${CMAKE_CURRENT_BINARY_DIR}/burst-ktank${cfg_testname}.done")
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/regress-burst-ktank.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/regress-burst-ktank.cmake" @ONLY)
-add_custom_command(
- OUTPUT "${STAMP_FILE}"
- COMMAND "${CMAKE_COMMAND}" -P
"${CMAKE_CURRENT_BINARY_DIR}/regress-burst-ktank.cmake"
- DEPENDS ${depends_list}
- )
-add_test(NAME regress-burst-ktank COMMAND "${CMAKE_COMMAND}" -P
"${CMAKE_CURRENT_BINARY_DIR}/regress-burst-ktank.cmake")
-add_custom_target(regress-burst-ktank DEPENDS ktank.g burst "${STAMP_FILE}")
-set_target_properties(regress-burst-ktank PROPERTIES FOLDER "BRL-CAD
Regression Tests")
-Add_Regression_Test(burst-ktank "ktank.g;burst")
-
-CMAKEFILES(
- CMakeLists.txt
- ${BURST_INPUT_FILES}
- )
-
-DISTCLEAN(
- ${STAMP_FILE}
- ${LOG_FILE}
- ${TARGET_IMAGE}
- )
foreach(BCF ${BURST_CLEAN_FILES})
DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/${BCF}")
endforeach(BCF ${BURST_CLEAN_FILES})
+DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/regress-burst.log")
+
+# If we copied the input files, clear them out as well
if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
foreach(BIF ${BURST_INPUT_FILES})
DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/${BCF}")
@@ -52,6 +27,11 @@
endforeach(BIF ${BURST_INPUT_FILES})
endif(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
+CMAKEFILES(
+ CMakeLists.txt
+ ${BURST_INPUT_FILES}
+ )
+
# Local Variables:
# tab-width: 8
# mode: cmake
Deleted: brlcad/branches/bioh/regress/burst/regress-burst-ktank.cmake.in
===================================================================
--- brlcad/branches/bioh/regress/burst/regress-burst-ktank.cmake.in
2020-05-24 15:45:06 UTC (rev 75911)
+++ brlcad/branches/bioh/regress/burst/regress-burst-ktank.cmake.in
2020-05-24 17:20:13 UTC (rev 75912)
@@ -1,66 +0,0 @@
-set(CBDIR "@CMAKE_CURRENT_BINARY_DIR@")
-set(CSDIR "@CMAKE_CURRENT_SOURCE_DIR@")
-set(DDIR "@DATA_DIR@")
-set(BURST_CF "@BURST_CLEAN_FILES@")
-set(BURST_IF "@BURST_INPUT_FILES@")
-
-set(SBDIR "@CMAKE_RUNTIME_OUTPUT_DIRECTORY@")
-set(DBDIR "@CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG@")
-set(RBDIR "@CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE@")
-# Use the mechanism created to allow multiconfig builds to
-# know what the current build type is.
-if(EXISTS "@CMAKE_BINARY_DIR@/CMakeTmp/CURRENT_PATH/Release")
- set(BDIR "${RBDIR}")
- set(test_suffix "-Release")
-elseif(EXISTS "@CMAKE_BINARY_DIR@/CMakeTmp/CURRENT_PATH/Debug")
- set(BDIR "${DBDIR}")
- set(test_suffix "-Debug")
-else(EXISTS "@CMAKE_BINARY_DIR@/CMakeTmp/CURRENT_PATH/Release")
- set(BDIR "${SBDIR}")
- set(test_suffix)
-endif(EXISTS "@CMAKE_BINARY_DIR@/CMakeTmp/CURRENT_PATH/Release")
-
-get_filename_component(EXE "@CMAKE_COMMAND@" EXT)
-set(BURST "${BDIR}/burst${EXE}")
-
-# Clean up in case we've run before
-foreach(BCF ${BURST_CF})
- execute_process(COMMAND "@CMAKE_COMMAND@" -E remove "${CBDIR}/${BCF}")
-endforeach(BCF ${BURST_CF})
-
-# Stage the input files
-if (NOT "${CSDIR}" STREQUAL "${CBDIR}")
- foreach(BIF ${BURST_IF})
- execute_process(COMMAND "@CMAKE_COMMAND@" -E copy "${CSDIR}/${BIF}"
"${CBDIR}/${BIF}")
- endforeach(BIF ${BURST_IF})
-endif (NOT "${CSDIR}" STREQUAL "${CBDIR}")
-
-execute_process(COMMAND "@CMAKE_COMMAND@" -E copy
"${BDIR}/../${DDIR}/db/ktank.g" "${CBDIR}/ktank.g")
-
-file(WRITE "${CBDIR}/burst_ktank.log" "Running burst on ktank.g:\n${BURST} -b
${CBDIR}/ktank.b\n")
-
-execute_process(
- COMMAND "${BURST}" -b "${CBDIR}/ktank.b" RESULT_VARIABLE burst_result
- OUTPUT_VARIABLE burst_log ERROR_VARIABLE burst_log
- WORKING_DIRECTORY ${CBDIR}
- )
-file(APPEND "${CBDIR}/burst_ktank.log" "${burst_log}")
-set(burst_log)
-if(NOT EXISTS "${CBDIR}/ktank.burst")
- message(FATAL_ERROR "${BURST} failed to process ktank.b, aborting.\nSee
${CBDIR}/burst_ktank.log for more details.")
-endif(NOT EXISTS "${CBDIR}/ktank.burst")
-
-if(burst_result)
- file(APPEND "${CBDIR}/burst_ktank.log" "\n\nError: return code
${burst_result}")
- message(FATAL_ERROR "[burst] Failure, see ${CBDIR}/burst_ktank.log for more
info.\n")
-else(burst_result)
- execute_process(COMMAND "@CMAKE_COMMAND@" -E touch
"@CMAKE_CURRENT_BINARY_DIR@/burst-ktank${test_suffix}.done")
-endif(burst_result)
-
-# Local Variables:
-# tab-width: 8
-# mode: cmake
-# indent-tabs-mode: t
-# End:
-# ex: shiftwidth=2 tabstop=8
-
Copied: brlcad/branches/bioh/regress/burst/regress-burst.cmake.in (from rev
75911, brlcad/branches/bioh/regress/burst/regress-burst-ktank.cmake.in)
===================================================================
--- brlcad/branches/bioh/regress/burst/regress-burst.cmake.in
(rev 0)
+++ brlcad/branches/bioh/regress/burst/regress-burst.cmake.in 2020-05-24
17:20:13 UTC (rev 75912)
@@ -0,0 +1,63 @@
+set(CBDIR "@CMAKE_CURRENT_BINARY_DIR@")
+set(CSDIR "@CMAKE_CURRENT_SOURCE_DIR@")
+set(BURST_CF "@BURST_CLEAN_FILES@")
+set(BURST_IF "@BURST_INPUT_FILES@")
+set(DDIR "@DATA_DIR@")
+set(LOGFILE "${CBDIR}/regress-burst.log")
+
+file(WRITE "${LOGFILE}" "Starting burst run\n")
+
+# The executable locations aren't know at CMake configure time, so one of them
+# is passed in via the EXEC variable at runtime. De-quote it and assign it to
+# the appropriate variable.
+string(REPLACE "\\" "" BURST "${EXEC}")
+if (NOT EXISTS "${BURST}")
+ file(APPEND "${LOGFILE}" "burst not found at location \"${BURST}\" -
aborting\n")
+ message(FATAL_ERROR "Unable to find burst, aborting.\nSee ${LOGFILE} for
more details.")
+endif (NOT EXISTS "${BURST}")
+
+# Clean up in case we've run before
+foreach(BCF ${BURST_CF})
+ execute_process(COMMAND "@CMAKE_COMMAND@" -E remove -f "${CBDIR}/${BCF}")
+endforeach(BCF ${BURST_CF})
+
+# Stage the input files, if we're not in the source directory
+if (NOT "${CSDIR}" STREQUAL "${CBDIR}")
+ foreach(BIF ${BURST_IF})
+ execute_process(COMMAND "@CMAKE_COMMAND@" -E copy "${CSDIR}/${BIF}"
"${CBDIR}/${BIF}")
+ endforeach(BIF ${BURST_IF})
+endif (NOT "${CSDIR}" STREQUAL "${CBDIR}")
+
+# TODO - this breaks if BIN_DIR is not one deep
+get_filename_component(BDIR "${BURST}" DIRECTORY)
+execute_process(COMMAND "@CMAKE_COMMAND@" -E copy
"${BDIR}/../${DDIR}/db/ktank.g" "${CBDIR}/ktank.g")
+
+file(APPEND "${LOGFILE}" "Running burst on ktank.g:\n${BURST} -b
${CBDIR}/ktank.b\n")
+
+execute_process(
+ COMMAND "${BURST}" -b "${CBDIR}/ktank.b"
+ RESULT_VARIABLE burst_result OUTPUT_VARIABLE burst_log ERROR_VARIABLE
burst_log
+ WORKING_DIRECTORY ${CBDIR}
+ )
+file(APPEND "${LOGFILE}" "${burst_log}")
+set(burst_log)
+if(NOT EXISTS "${CBDIR}/ktank.burst" OR burst_result)
+ file(APPEND "${LOGFILE}" "Failure: ${burst_result}\n")
+ message(FATAL_ERROR "${BURST} failed to process ktank.b, aborting.\nSee
${LOGFILE} for more details.")
+endif(NOT EXISTS "${CBDIR}/ktank.burst" OR burst_result)
+
+# If we copied the input files, clear them out as well
+if(NOT "${CSDIR}" STREQUAL "${CBDIR}")
+ foreach(BIF ${BURST_INPUT_FILES})
+ execute_process(COMMAND "@CMAKE_COMMAND@" -E remove -f "${CBDIR}/${BCF}")
+ endforeach(BIF ${BURST_INPUT_FILES})
+endif(NOT "${CSDIR}" STREQUAL "${CBDIR}")
+
+
+# Local Variables:
+# tab-width: 8
+# mode: cmake
+# indent-tabs-mode: t
+# End:
+# ex: shiftwidth=2 tabstop=8
+
Modified: brlcad/branches/bioh/regress/nurbs/regress-nurbs-test.cmake.in
===================================================================
--- brlcad/branches/bioh/regress/nurbs/regress-nurbs-test.cmake.in
2020-05-24 15:45:06 UTC (rev 75911)
+++ brlcad/branches/bioh/regress/nurbs/regress-nurbs-test.cmake.in
2020-05-24 17:20:13 UTC (rev 75912)
@@ -36,8 +36,6 @@
if(nurbs_result)
message(FATAL_ERROR "[nurbs] Failure, unexpected result running ${NHIT}
@NHIT_OPTS@ @NHIT_GFILE@ @NHIT_ARGS@\n ${nurbs_log}\n")
-else(nurbs_result)
- execute_process(COMMAND "@CMAKE_COMMAND@" -E touch
"@CMAKE_CURRENT_BINARY_DIR@/@NHIT_NAME@${test_suffix}.done")
endif(nurbs_result)
# Local Variables:
Modified: brlcad/branches/bioh/regress/pkg/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/regress/pkg/CMakeLists.txt 2020-05-24 15:45:06 UTC
(rev 75911)
+++ brlcad/branches/bioh/regress/pkg/CMakeLists.txt 2020-05-24 17:20:13 UTC
(rev 75912)
@@ -9,21 +9,9 @@
target_compile_definitions(regress_pkg PUBLIC BRLCADBUILD HAVE_CONFIG_H)
set_target_properties(regress_pkg PROPERTIES FOLDER "BRL-CAD Regression
Tests/libpkg")
-add_test(NAME regress-pkg
- COMMAND $<TARGET_FILE:regress_pkg>
- )
-set_tests_properties(regress-pkg PROPERTIES LABELS "Regression")
+BRLCAD_REGRESSION_TEST(regress-pkg "regress_pkg" EXEC regress_pkg)
+DISTCLEAN(${CMAKE_CURRENT_BINARY_DIR}/regress-pkg.log)
-if (CMAKE_CONFIGURATION_TYPES)
- add_custom_target(regress-pkg COMMAND ${CMAKE_CTEST_COMMAND} -C
${CMAKE_CFG_INTDIR} -R ^regress-pkg --output-on-failure)
-else (CMAKE_CONFIGURATION_TYPES)
- add_custom_target(regress-pkg COMMAND ${CMAKE_CTEST_COMMAND} -R ^regress-pkg
--output-on-failure)
-endif (CMAKE_CONFIGURATION_TYPES)
-add_dependencies(regress-pkg regress_pkg)
-
-set_target_properties(regress-pkg PROPERTIES FOLDER "BRL-CAD Regression Tests")
-set_target_properties(regress-pkg PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 1)
-
CMAKEFILES(
CMakeLists.txt
)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits