Skip to content

Commit

Permalink
automatedTests: 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 11, 2024
1 parent ba7bf9d commit b961327
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
cmake_minimum_required(VERSION 3.5)

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

# 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
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"
)
# 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()

0 comments on commit b961327

Please sign in to comment.