Skip to content

Commit

Permalink
ci/tests: added CMAKE option to turn ON/OFF JS automated tests
Browse files Browse the repository at this point in the history
Signed-off-by: Ionut Muthi <ionut.muthi@analog.com>
  • Loading branch information
IonutMuthi committed Jul 25, 2024
1 parent d93a956 commit 6ad7fa7
Showing 1 changed file with 19 additions and 20 deletions.
39 changes: 19 additions & 20 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
cmake_minimum_required(VERSION 3.5)

# JS AUTOMATED TESTS
option(ENABLE_AUTOMATED_TESTS "Enable JS Automated Tests" OFF)
#JS AUTOMATED TESTS
option(ENABLE_AUTOMATED_TESTS "Enable JS Automated Tests" OFF)

if(ENABLE_AUTOMATED_TESTS)
# Set build path as CMAKE CACHE variable to use in tests
set(SCOPY_BUILD_PATH ${CMAKE_BINARY_DIR} CACHE STRING "SCOPY_BUILD_PATH" FORCE)
if(ENABLE_AUTOMATED_TESTS)
#Set build path as CMAKE CACHE variable to use in tests
set(SCOPY_BUILD_PATH ${CMAKE_BINARY_DIR} CACHE STRING "SCOPY_BUILD_PATH" FORCE)

# SCOPY GENERIC TESTS
add_test(NAME "ScopyDefaultJSTests"
COMMAND bash ${CMAKE_SOURCE_DIR}/js/test.sh "${CMAKE_SOURCE_DIR}/resources/emuXml/"
"${CMAKE_SOURCE_DIR}/js/scopyDefaultTests.js"
)
#SCOPY GENERIC TESTS
add_test(NAME "ScopyDefaultJSTests" COMMAND bash ${CMAKE_SOURCE_DIR} / js /
test.sh "${CMAKE_SOURCE_DIR}/resources/emuXml/"
"${CMAKE_SOURCE_DIR}/js/scopyDefaultTests.js")

# PLUGIN SPECIFIC TESTS
#PLUGIN SPECIFIC TESTS

# DATALOGGER
if(ENABLE_PLUGIN_DATALOGGER)
add_test(NAME "DataloggerLogAndLoadJSTests"
COMMAND bash ${CMAKE_SOURCE_DIR}/js/test.sh "${CMAKE_SOURCE_DIR}/resources/emuXml/"
"${CMAKE_SOURCE_DIR}/plugins/datalogger/js/dataLoggerAutomatedTest.js"
)
endif()
#DATALOGGER
if(ENABLE_PLUGIN_DATALOGGER) add_test(
NAME "DataloggerLogAndLoadJSTests" COMMAND bash ${CMAKE_SOURCE_DIR} /
js /
test.sh
"${CMAKE_SOURCE_DIR}/resources/emuXml/"
"${CMAKE_SOURCE_DIR}/plugins/datalogger/js/dataLoggerAutomatedTest.js")
endif()

endif()
>>>>>>> 79195ef1... fixup
endif()

0 comments on commit 6ad7fa7

Please sign in to comment.