Commit 8bdb4fc4 authored by Jørgen Lind's avatar Jørgen Lind
Browse files

Update roundtrip test

parent 3e86fa43
......@@ -13,6 +13,7 @@ include(GNUInstallDirs)
set (TEST_DATA_PATH "" CACHE PATH "Test data path")
set (TEST_SEGY_FILE "" CACHE FILEPATH "SEGY test file")
set (TEST_SEGY_HEADER_FILE "" CACHE FILEPATH "Json file describing the header data of SEGY test file")
set (TEST_URL "" CACHE STRING "Test url for OpenOptions")
set (TEST_CONNECTION "" CACHE STRING "Test connection string for OpenOptions")
......
......@@ -112,6 +112,7 @@ if (TEST_SEGY_FILE AND TEST_URL)
-DTEST_URL=${TEST_URL}
-DTEST_CONNECTION=${TEST_CONNECTION_ESCAPED}
-DTEST_SEGY_FILE=${TEST_SEGY_FILE}
-DTEST_SEGY_HEADER_FILE=${TEST_SEGY_HEADER_FILE}
-P ${CMAKE_CURRENT_SOURCE_DIR}/RunRoundtrip.cmake
)
endif()
......
......@@ -9,18 +9,22 @@ check_variable(SEGYExport)
check_variable(TEST_URL)
check_variable(TEST_SEGY_FILE)
set(connection_parameter "--url ${TEST_URL}")
if (TEST_CONNECTION)
set(CONNECTION "--connection")
endif()
if (TEST_SEGY_HEADER_FILE)
set(HEADER "-h")
endif()
execute_process(COMMAND ${SEGYImport} --persistentID roundtrip_test --url "${TEST_URL}" ${CONNECTION} ${TEST_CONNECTION} ${TEST_SEGY_FILE} RESULT_VARIABLE CMD_RESULT)
message("Running: ${SEGYImport} --persistentID roundtrip_test --url "${TEST_URL}" ${CONNECTION} ${TEST_CONNECTION} ${HEADER} ${TEST_SEGY_HEADER_FILE} ${TEST_SEGY_FILE}")
execute_process(COMMAND ${SEGYImport} --persistentID roundtrip_test --url "${TEST_URL}" ${CONNECTION} ${TEST_CONNECTION} ${HEADER} ${TEST_SEGY_HEADER_FILE} ${TEST_SEGY_FILE} RESULT_VARIABLE CMD_RESULT)
if (CMD_RESULT)
message(FATAL_ERROR "Failed to run SEGYImport")
endif()
message("Running: ${SEGYExport} --persistentID roundtrip_test --url "${TEST_URL}" ${CONNECTION} ${TEST_CONNECTION} roundtrip_test.segy")
execute_process(COMMAND ${SEGYExport} --persistentID roundtrip_test --url "${TEST_URL}" ${CONNECTION} ${TEST_CONNECTION} roundtrip_test.segy RESULT_VARIABLE CMD_RESULT)
if (CMD_RESULT)
message(FATAL_ERROR "Failed to run SEGYExport")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment