Revision: 76743
http://sourceforge.net/p/brlcad/code/76743
Author: starseeker
Date: 2020-08-13 19:27:49 +0000 (Thu, 13 Aug 2020)
Log Message:
-----------
Add some regression tests for gdiff - there are a lot of combinations, and
recent experience suggests it's easy to break one while altering another...
Modified Paths:
--------------
brlcad/branches/RELEASE/regress/CMakeLists.txt
Added Paths:
-----------
brlcad/branches/RELEASE/regress/gdiff/
brlcad/branches/RELEASE/regress/gdiff/CMakeLists.txt
brlcad/branches/RELEASE/regress/gdiff/gdiff.ref
brlcad/branches/RELEASE/regress/gdiff/moss_1.g
brlcad/branches/RELEASE/regress/gdiff/moss_2.g
brlcad/branches/RELEASE/regress/gdiff/moss_3.g
brlcad/branches/RELEASE/regress/gdiff/regress-gdiff.cmake.in
Modified: brlcad/branches/RELEASE/regress/CMakeLists.txt
===================================================================
--- brlcad/branches/RELEASE/regress/CMakeLists.txt 2020-08-13 19:26:34 UTC
(rev 76742)
+++ brlcad/branches/RELEASE/regress/CMakeLists.txt 2020-08-13 19:27:49 UTC
(rev 76743)
@@ -34,6 +34,9 @@
# Fuzz tests (if supported by the compiler)
add_subdirectory(fuzz)
+# Geometry difference reporting
+add_subdirectory(gdiff)
+
# Image Conversion Regression Tests
add_subdirectory(icv)
Added: brlcad/branches/RELEASE/regress/gdiff/CMakeLists.txt
===================================================================
--- brlcad/branches/RELEASE/regress/gdiff/CMakeLists.txt
(rev 0)
+++ brlcad/branches/RELEASE/regress/gdiff/CMakeLists.txt 2020-08-13
19:27:49 UTC (rev 76743)
@@ -0,0 +1,27 @@
+set(LOG_FILE "${CMAKE_CURRENT_BINARY_DIR}/regress-gdiff.log")
+set(GDIFF_CLEAN_FILE ${CMAKE_CURRENT_BINARY_DIR}/gdiff.out)
+
+BRLCAD_REGRESSION_TEST(regress-gdiff "gdiff" EXEC gdiff)
+
+DISTCLEAN(
+ ${LOG_FILE}
+ ${GDIFF_CLEAN_FILE}
+ ${CMAKE_CURRENT_BINARY_DIR}/gdiff_ref.log
+ ${CMAKE_CURRENT_BINARY_DIR}/gdiff_out.log
+ )
+
+CMAKEFILES(
+ CMakeLists.txt
+ gdiff.ref
+ regress-gdiff.cmake.in
+ moss_1.g
+ moss_2.g
+ moss_3.g
+ )
+
+# Local Variables:
+# tab-width: 8
+# mode: cmake
+# indent-tabs-mode: t
+# End:
+# ex: shiftwidth=2 tabstop=8
Property changes on: brlcad/branches/RELEASE/regress/gdiff/CMakeLists.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: brlcad/branches/RELEASE/regress/gdiff/gdiff.ref
===================================================================
--- brlcad/branches/RELEASE/regress/gdiff/gdiff.ref
(rev 0)
+++ brlcad/branches/RELEASE/regress/gdiff/gdiff.ref 2020-08-13 19:27:49 UTC
(rev 76743)
@@ -0,0 +1,156 @@
+Starting gdiff test run...
+
+Test 0: gdiff moss_1.g moss_2.g
+M cone.r
+D box.r
+M all.g
+D tor
+A box2.r
+A tor.s
+
+Test 1: gdiff moss_1.g moss_3.g
+M ellipse.r
+M cone.s
+M tor
+
+Test 2: gdiff moss_2.g moss_3.g
+M ellipse.r
+M cone.s
+M cone.r
+D box2.r
+D tor.s
+M all.g
+A box.r
+A tor
+
+Test 3: gdiff -v moss_1.g moss_2.g
+- "cone.r" id(p): 3000
++ "cone.r" id(p): 0
+D "cone.r" region_id(a): 3000
+D box.r
+- "all.g" tree(p): u {u {u {l platform.r} {l box.r {1 0 0 -23.69892883301 0 1
0 13.40998744965 0 0 1 8.023991584778 0 0 0 1}}} {u {l cone.r {1 0 0
22.0492401123 0 1 0 12.23486709595 0 0 1 2.111249841619e-07 0 0 0 1}} {l
ellipse.r {1 0 0 14.67929267883 0 1 0 -41.60771179199 0 0 1 38.79878234863 0
0 0 1}}}} {u {l tor.r} {l light.r}}
++ "all.g" tree(p): u {u {u {l platform.r} {l box2.r {1 0 0 -23.69892883301 0
1 0 13.40998744965 0 0 1 8.023991584778 0 0 0 1}}} {u {l cone.r {1 0 0
22.0492401123 0 1 0 12.23486709595 0 0 1 2.111249841619e-07 0 0 0 1}} {l
ellipse.r {1 0 0 14.67929267883 0 1 0 -41.60771179199 0 0 1 38.79878234863 0
0 0 1}}}} {u {l tor.r} {l light.r}}
+D tor
+A box2.r
+A tor.s
+
+Test 4: gdiff -vv moss_1.g moss_2.g
+- "cone.r" id(p): 3000
++ "cone.r" id(p): 0
+D "cone.r" region_id(a): 3000
+D "box.r" tree(p): l box.s
+D "box.r" rgb(p): 100 190 190
+D "box.r" id(p): 2000
+D "box.r" region(p): yes
+D "box.r" DB5_MINORTYPE(p): comb
+D "box.r" color(a): 100/190/190
+D "box.r" region(a): R
+D "box.r" region_id(a): 2000
+- "all.g" tree(p): u {u {u {l platform.r} {l box.r {1 0 0 -23.69892883301 0 1
0 13.40998744965 0 0 1 8.023991584778 0 0 0 1}}} {u {l cone.r {1 0 0
22.0492401123 0 1 0 12.23486709595 0 0 1 2.111249841619e-07 0 0 0 1}} {l
ellipse.r {1 0 0 14.67929267883 0 1 0 -41.60771179199 0 0 1 38.79878234863 0
0 0 1}}}} {u {l tor.r} {l light.r}}
++ "all.g" tree(p): u {u {u {l platform.r} {l box2.r {1 0 0 -23.69892883301 0
1 0 13.40998744965 0 0 1 8.023991584778 0 0 0 1}}} {u {l cone.r {1 0 0
22.0492401123 0 1 0 12.23486709595 0 0 1 2.111249841619e-07 0 0 0 1}} {l
ellipse.r {1 0 0 14.67929267883 0 1 0 -41.60771179199 0 0 1 38.79878234863 0
0 0 1}}}} {u {l tor.r} {l light.r}}
+D "tor" r_h(p): 5.079999923705999620437979
+D "tor" r_a(p): 25.39999718822056706812873
+D "tor" H(p): 0 1 0
+D "tor" V(p): 4.91623592376700013772961 -32.8022308349599995835888
31.71177673340000069401867
+D "tor" DB5_MINORTYPE(p): tor
+A "box2.r" tree(p): l box.s
+A "box2.r" rgb(p): 100 190 190
+A "box2.r" id(p): 2000
+A "box2.r" region(p): yes
+A "box2.r" DB5_MINORTYPE(p): comb
+A "box2.r" color(a): 100/190/190
+A "box2.r" region(a): R
+A "box2.r" region_id(a): 2000
+A "tor.s" r_h(p): 5.079999923705999620437979
+A "tor.s" r_a(p): 25.39999718822056706812873
+A "tor.s" H(p): 0 1 0
+A "tor.s" V(p): 4.91623592376700013772961 -32.8022308349599995835888
31.71177673340000069401867
+A "tor.s" DB5_MINORTYPE(p): tor
+
+Test 5: gdiff -a -d moss_1.g moss_2.g
+
+Test 6: gdiff -m moss_1.g moss_2.g
+M ellipse.r
+M cone.s
+M tor
+
+Test 7: gdiff -u moss_1.g moss_3.g
+ platform.r
+ light.r
+ cone.r
+ tor.r
+ box.r
+
+Test 8: gdiff -F "-type region" moss_1.g moss_2.g
+M cone.r
+D box.r
+A box2.r
+
+Test 9: gdiff -F "-type region" -a -d moss_1.g moss_2.g
+D box.r
+A box2.r
+
+Test 10: gdiff -F "! -attr region_id" -a -d moss_1.g moss_2.g
+M all.g
+D tor
+A tor.s
+
+Test 11: gdiff moss_2.g moss_1.g moss_3.g
+M ellipse.r
+M cone.s
+M cone.r
+D(L) box.r
+M all.g
+C tor
+A(L) box2.r
+A(L) tor.s
+
+Test 12: gdiff -v moss_2.g moss_1.g moss_3.g
+A(R) "ellipse.r" prop1(p): 1
+M(R) "cone.s" D(p): 4.997601260198356598607461 4.997601260198356598607461 0
+M(R) "cone.s" C(p): 4.997601260198356598607461 -4.997601260198356598607461 0
+M(R) "cone.s" V(p): 19.38951648775079661390919 -42.80785935392668761778623
-10.87609632321004937693942
+M(L) "cone.r" id(p): 0
+D(L) "cone.r" region_id(p): 3000
+D(L) box.r
+M(L) "all.g" tree(p): u {u {u {l platform.r} {l box2.r {1 0 0 -23.69892883301
0 1 0 13.40998744965 0 0 1 8.023991584778 0 0 0 1}}} {u {l cone.r {1 0 0
22.0492401123 0 1 0 12.23486709595 0 0 1 2.111249841619e-07 0 0 0 1}} {l
ellipse.r {1 0 0 14.67929267883 0 1 0 -41.60771179199 0 0 1 38.79878234863 0
0 0 1}}}} {u {l tor.r} {l light.r}}
+C(LD,RM) tor
+A(L) box2.r
+A(L) tor.s
+
+Test 13: gdiff -vv moss_2.g moss_1.g moss_3.g
+A(R) "ellipse.r" prop1(p): 1
+M(R) "cone.s" D(p): 4.997601260198356598607461 4.997601260198356598607461 0
+M(R) "cone.s" C(p): 4.997601260198356598607461 -4.997601260198356598607461 0
+M(R) "cone.s" V(p): 19.38951648775079661390919 -42.80785935392668761778623
-10.87609632321004937693942
+M(L) "cone.r" id(p): 0
+D(L) "cone.r" region_id(p): 3000
+D(L) "box.r" tree(p): l box.s
+D(L) "box.r" rgb(p): 100 190 190
+D(L) "box.r" id(p): 2000
+D(L) "box.r" region(p): yes
+D(L) "box.r" DB5_MINORTYPE(p): comb
+D(L) "box.r" color(p): 100/190/190
+D(L) "box.r" region(p): R
+D(L) "box.r" region_id(p): 2000
+M(L) "all.g" tree(p): u {u {u {l platform.r} {l box2.r {1 0 0 -23.69892883301
0 1 0 13.40998744965 0 0 1 8.023991584778 0 0 0 1}}} {u {l cone.r {1 0 0
22.0492401123 0 1 0 12.23486709595 0 0 1 2.111249841619e-07 0 0 0 1}} {l
ellipse.r {1 0 0 14.67929267883 0 1 0 -41.60771179199 0 0 1 38.79878234863 0
0 0 1}}}} {u {l tor.r} {l light.r}}
+C(RM) "tor" r_h(p): 6.191849347007689630117966
+C(L-) "tor" r_h(p): 5.079999923705999620437979
+C(RM) "tor" r_a(p): 30.95924377281203021539113
+C(L-) "tor" r_a(p): 25.39999718822056706812873
+D(L) "tor" H(p): 0 1 0
+D(L) "tor" V(p): 4.91623592376700013772961 -32.8022308349599995835888
31.71177673340000069401867
+D(L) "tor" DB5_MINORTYPE(p): tor
+A(L) "box2.r" tree(p): l box.s
+A(L) "box2.r" rgb(p): 100 190 190
+A(L) "box2.r" id(p): 2000
+A(L) "box2.r" region(p): yes
+A(L) "box2.r" DB5_MINORTYPE(p): comb
+A(L) "box2.r" color(p): 100/190/190
+A(L) "box2.r" region(p): R
+A(L) "box2.r" region_id(p): 2000
+A(L) "tor.s" r_h(p): 5.079999923705999620437979
+A(L) "tor.s" r_a(p): 25.39999718822056706812873
+A(L) "tor.s" H(p): 0 1 0
+A(L) "tor.s" V(p): 4.91623592376700013772961 -32.8022308349599995835888
31.71177673340000069401867
+A(L) "tor.s" DB5_MINORTYPE(p): tor
Property changes on: brlcad/branches/RELEASE/regress/gdiff/gdiff.ref
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: brlcad/branches/RELEASE/regress/gdiff/moss_1.g
===================================================================
(Binary files differ)
Index: brlcad/branches/RELEASE/regress/gdiff/moss_1.g
===================================================================
--- brlcad/branches/RELEASE/regress/gdiff/moss_1.g 2020-08-13 19:26:34 UTC
(rev 76742)
+++ brlcad/branches/RELEASE/regress/gdiff/moss_1.g 2020-08-13 19:27:49 UTC
(rev 76743)
Property changes on: brlcad/branches/RELEASE/regress/gdiff/moss_1.g
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: brlcad/branches/RELEASE/regress/gdiff/moss_2.g
===================================================================
(Binary files differ)
Index: brlcad/branches/RELEASE/regress/gdiff/moss_2.g
===================================================================
--- brlcad/branches/RELEASE/regress/gdiff/moss_2.g 2020-08-13 19:26:34 UTC
(rev 76742)
+++ brlcad/branches/RELEASE/regress/gdiff/moss_2.g 2020-08-13 19:27:49 UTC
(rev 76743)
Property changes on: brlcad/branches/RELEASE/regress/gdiff/moss_2.g
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: brlcad/branches/RELEASE/regress/gdiff/moss_3.g
===================================================================
(Binary files differ)
Index: brlcad/branches/RELEASE/regress/gdiff/moss_3.g
===================================================================
--- brlcad/branches/RELEASE/regress/gdiff/moss_3.g 2020-08-13 19:26:34 UTC
(rev 76742)
+++ brlcad/branches/RELEASE/regress/gdiff/moss_3.g 2020-08-13 19:27:49 UTC
(rev 76743)
Property changes on: brlcad/branches/RELEASE/regress/gdiff/moss_3.g
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: brlcad/branches/RELEASE/regress/gdiff/regress-gdiff.cmake.in
===================================================================
--- brlcad/branches/RELEASE/regress/gdiff/regress-gdiff.cmake.in
(rev 0)
+++ brlcad/branches/RELEASE/regress/gdiff/regress-gdiff.cmake.in
2020-08-13 19:27:49 UTC (rev 76743)
@@ -0,0 +1,180 @@
+# Values set at CMake configure time
+set(CBDIR "@CMAKE_CURRENT_BINARY_DIR@")
+set(CSDIR "@CMAKE_CURRENT_SOURCE_DIR@")
+set(GDIFF_CF "@GDIFF_CLEAN_FILE@")
+set(LOGFILE "@LOG_FILE@")
+
+function(GDIFF_CHECK_INIT msg)
+ math(EXPR TN "${TN} + 1")
+ set(TN "${TN}" PARENT_SCOPE)
+ file(APPEND "${LOGFILE}" "${msg}")
+ unset(gdiff_log PARENT_SCOPE)
+ unset(gdiff_result PARENT_SCOPE)
+endfunction(GDIFF_CHECK_INIT msg)
+
+function(GDIFF_CHECK_RESULT result)
+ file(APPEND "${LOGFILE}" "${gdiff_log}")
+ set(gdiff_result ${${result}})
+ if("${gdiff_result}" STREQUAL "-1")
+ file(READ "${LOGFILE}" LOG)
+ message(FATAL_ERROR "Fatal gdiff error (${gdiff_result}), aborting.\nSee
${LOGFILE} for more details:\n${LOG}")
+ endif("${gdiff_result}" STREQUAL "-1")
+endfunction(GDIFF_CHECK_RESULT result)
+
+
+file(WRITE "${LOGFILE}" "Starting gdiff test 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 "\\" "" GDIFF "${EXEC}")
+if (NOT EXISTS "${GDIFF}")
+ file(WRITE "${LOGFILE}" "regress_gdiff not found at location \"${GDIFF}\" -
aborting\n")
+ message(FATAL_ERROR "Unable to find regress_gdiff, aborting.\nSee ${LOGFILE}
for more details.")
+endif (NOT EXISTS "${GDIFF}")
+
+# Clean up in case we've run before
+execute_process(COMMAND "@CMAKE_COMMAND@" -E remove -f "${GDIFF_CF}")
+
+set(TN 0)
+
+GDIFF_CHECK_INIT("\nTest ${TN}: gdiff moss_1.g moss_2.g\n")
+execute_process(
+ COMMAND "${GDIFF}" "${CSDIR}/moss_1.g" "${CSDIR}/moss_2.g"
+ RESULT_VARIABLE gdiff_result OUTPUT_VARIABLE gdiff_log ERROR_VARIABLE
gdiff_log
+ WORKING_DIRECTORY ${CBDIR}
+ )
+GDIFF_CHECK_RESULT(gdiff_result)
+
+GDIFF_CHECK_INIT("\nTest ${TN}: gdiff moss_1.g moss_3.g\n")
+execute_process(
+ COMMAND "${GDIFF}" "${CSDIR}/moss_1.g" "${CSDIR}/moss_3.g"
+ RESULT_VARIABLE gdiff_result OUTPUT_VARIABLE gdiff_log ERROR_VARIABLE
gdiff_log
+ WORKING_DIRECTORY ${CBDIR}
+ )
+GDIFF_CHECK_RESULT(gdiff_result)
+
+GDIFF_CHECK_INIT("\nTest ${TN}: gdiff moss_2.g moss_3.g\n")
+execute_process(
+ COMMAND "${GDIFF}" "${CSDIR}/moss_2.g" "${CSDIR}/moss_3.g"
+ RESULT_VARIABLE gdiff_result OUTPUT_VARIABLE gdiff_log ERROR_VARIABLE
gdiff_log
+ WORKING_DIRECTORY ${CBDIR}
+ )
+GDIFF_CHECK_RESULT(gdiff_result)
+
+GDIFF_CHECK_INIT("\nTest ${TN}: gdiff -v moss_1.g moss_2.g\n")
+execute_process(
+ COMMAND "${GDIFF}" -v "${CSDIR}/moss_1.g" "${CSDIR}/moss_2.g"
+ RESULT_VARIABLE gdiff_result OUTPUT_VARIABLE gdiff_log ERROR_VARIABLE
gdiff_log
+ WORKING_DIRECTORY ${CBDIR}
+ )
+GDIFF_CHECK_RESULT(gdiff_result)
+
+GDIFF_CHECK_INIT("\nTest ${TN}: gdiff -vv moss_1.g moss_2.g\n")
+execute_process(
+ COMMAND "${GDIFF}" -vv "${CSDIR}/moss_1.g" "${CSDIR}/moss_2.g"
+ RESULT_VARIABLE gdiff_result OUTPUT_VARIABLE gdiff_log ERROR_VARIABLE
gdiff_log
+ WORKING_DIRECTORY ${CBDIR}
+ )
+GDIFF_CHECK_RESULT(gdiff_result)
+
+GDIFF_CHECK_INIT("\nTest ${TN}: gdiff -a -d moss_1.g moss_2.g\n")
+execute_process(
+ COMMAND "${GDIFF}" -a -d "${CSDIR}/moss_1.g" "${CSDIR}/moss_3.g"
+ RESULT_VARIABLE gdiff_result OUTPUT_VARIABLE gdiff_log ERROR_VARIABLE
gdiff_log
+ WORKING_DIRECTORY ${CBDIR}
+ )
+GDIFF_CHECK_RESULT(gdiff_result)
+
+GDIFF_CHECK_INIT("\nTest ${TN}: gdiff -m moss_1.g moss_2.g\n")
+execute_process(
+ COMMAND "${GDIFF}" -m "${CSDIR}/moss_1.g" "${CSDIR}/moss_3.g"
+ RESULT_VARIABLE gdiff_result OUTPUT_VARIABLE gdiff_log ERROR_VARIABLE
gdiff_log
+ WORKING_DIRECTORY ${CBDIR}
+ )
+GDIFF_CHECK_RESULT(gdiff_result)
+
+GDIFF_CHECK_INIT("\nTest ${TN}: gdiff -u moss_1.g moss_3.g\n")
+execute_process(
+ COMMAND "${GDIFF}" -u "${CSDIR}/moss_1.g" "${CSDIR}/moss_3.g"
+ RESULT_VARIABLE gdiff_result OUTPUT_VARIABLE gdiff_log ERROR_VARIABLE
gdiff_log
+ WORKING_DIRECTORY ${CBDIR}
+ )
+GDIFF_CHECK_RESULT(gdiff_result)
+
+GDIFF_CHECK_INIT("\nTest ${TN}: gdiff -F \"-type region\" moss_1.g moss_2.g\n")
+execute_process(
+ COMMAND "${GDIFF}" -F "-type region" "${CSDIR}/moss_1.g" "${CSDIR}/moss_2.g"
+ RESULT_VARIABLE gdiff_result OUTPUT_VARIABLE gdiff_log ERROR_VARIABLE
gdiff_log
+ WORKING_DIRECTORY ${CBDIR}
+ )
+GDIFF_CHECK_RESULT(gdiff_result)
+
+GDIFF_CHECK_INIT("\nTest ${TN}: gdiff -F \"-type region\" -a -d moss_1.g
moss_2.g\n")
+execute_process(
+ COMMAND "${GDIFF}" -F "-type region" -a -d "${CSDIR}/moss_1.g"
"${CSDIR}/moss_2.g"
+ RESULT_VARIABLE gdiff_result OUTPUT_VARIABLE gdiff_log ERROR_VARIABLE
gdiff_log
+ WORKING_DIRECTORY ${CBDIR}
+ )
+GDIFF_CHECK_RESULT(gdiff_result)
+
+GDIFF_CHECK_INIT("\nTest ${TN}: gdiff -F \"! -attr region_id\" -a -d moss_1.g
moss_2.g\n")
+execute_process(
+ COMMAND "${GDIFF}" -F "! -attr region_id" "${CSDIR}/moss_1.g"
"${CSDIR}/moss_2.g"
+ RESULT_VARIABLE gdiff_result OUTPUT_VARIABLE gdiff_log ERROR_VARIABLE
gdiff_log
+ WORKING_DIRECTORY ${CBDIR}
+ )
+GDIFF_CHECK_RESULT(gdiff_result)
+
+GDIFF_CHECK_INIT("\nTest ${TN}: gdiff moss_2.g moss_1.g moss_3.g\n")
+execute_process(
+ COMMAND "${GDIFF}" "${CSDIR}/moss_2.g" "${CSDIR}/moss_1.g"
"${CSDIR}/moss_3.g"
+ RESULT_VARIABLE gdiff_result OUTPUT_VARIABLE gdiff_log ERROR_VARIABLE
gdiff_log
+ WORKING_DIRECTORY ${CBDIR}
+ )
+GDIFF_CHECK_RESULT(gdiff_result)
+
+GDIFF_CHECK_INIT("\nTest ${TN}: gdiff -v moss_2.g moss_1.g moss_3.g\n")
+execute_process(
+ COMMAND "${GDIFF}" -v "${CSDIR}/moss_2.g" "${CSDIR}/moss_1.g"
"${CSDIR}/moss_3.g"
+ RESULT_VARIABLE gdiff_result OUTPUT_VARIABLE gdiff_log ERROR_VARIABLE
gdiff_log
+ WORKING_DIRECTORY ${CBDIR}
+ )
+GDIFF_CHECK_RESULT(gdiff_result)
+
+GDIFF_CHECK_INIT("\nTest ${TN}: gdiff -vv moss_2.g moss_1.g moss_3.g\n")
+execute_process(
+ COMMAND "${GDIFF}" -vv "${CSDIR}/moss_2.g" "${CSDIR}/moss_1.g"
"${CSDIR}/moss_3.g"
+ RESULT_VARIABLE gdiff_result OUTPUT_VARIABLE gdiff_log ERROR_VARIABLE
gdiff_log
+ WORKING_DIRECTORY ${CBDIR}
+ )
+GDIFF_CHECK_RESULT(gdiff_result)
+
+
+# Tests complete, check log against expected output
+file(READ "${CSDIR}/gdiff.ref" GDIFF_REF)
+file(READ "${LOGFILE}" GDIFF_LOG)
+# Strip long numerical values so floating point doesn't interfere
+string(REGEX REPLACE "[.][0-9]+" "" GDIFF_REF2 "${GDIFF_REF}")
+file(WRITE "${CBDIR}/gdiff_ref.log" "${GDIFF_REF}")
+string(REGEX REPLACE "[.][0-9]+" "" GDIFF_LOG2 "${GDIFF_LOG}")
+file(WRITE "${CBDIR}/gdiff_out.log" "${GDIFF_LOG}")
+execute_process(
+ COMMAND "${CMAKE_COMMAND}" -E compare_files "${CBDIR}/gdiff_ref.log"
"${CBDIR}/gdiff_out.log"
+ RESULT_VARIABLE cmp_result
+ )
+
+if (cmp_result)
+ message(FATAL_ERROR "${CBDIR}/gdiff_ref.log and ${CBDIR}/gdiff_out.log do
not match, haulting.")
+endif (cmp_result)
+
+file(REMOVE "${CBDIR}/gdiff_ref.log")
+file(REMOVE "${CBDIR}/gdiff_out.log")
+
+# Local Variables:
+# tab-width: 8
+# mode: cmake
+# indent-tabs-mode: t
+# End:
+# ex: shiftwidth=2 tabstop=8
+
Property changes on:
brlcad/branches/RELEASE/regress/gdiff/regress-gdiff.cmake.in
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
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