aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2019-04-18 22:14:44 +0200
committerRiccardo Spagni <ric@spagni.net>2019-04-18 22:14:44 +0200
commitef1f1c531414dc824a8e1a3d5577bfefdf738f5f (patch)
treeba1398a00a792ad36b81b0133501af39dc0e77b8 /tests
parentMerge pull request #5464 (diff)
parentfunctional_tests: detect requests python module (diff)
downloadmonero-ef1f1c531414dc824a8e1a3d5577bfefdf738f5f.tar.xz
Merge pull request #5465
3e50a9e8 functional_tests: detect requests python module (moneromooo-monero)
Diffstat (limited to 'tests')
-rw-r--r--tests/functional_tests/CMakeLists.txt12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/functional_tests/CMakeLists.txt b/tests/functional_tests/CMakeLists.txt
index 60060f56f..fd49ba623 100644
--- a/tests/functional_tests/CMakeLists.txt
+++ b/tests/functional_tests/CMakeLists.txt
@@ -50,6 +50,12 @@ target_link_libraries(functional_tests
${CMAKE_THREAD_LIBS_INIT}
${EXTRA_LIBRARIES})
-add_test(
- NAME functional_tests_rpc
- COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/functional_tests_rpc.py" "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" all)
+execute_process(COMMAND ${PYTHON_EXECUTABLE} "-c" "import requests; print('OK')" OUTPUT_VARIABLE REQUESTS_OUTPUT OUTPUT_STRIP_TRAILING_WHITESPACE)
+if (REQUESTS_OUTPUT STREQUAL "OK")
+ add_test(
+ NAME functional_tests_rpc
+ COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/functional_tests_rpc.py" "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" all)
+else()
+ message(WARNING "functional_tests_rpc skipped, needs the 'requests' python module")
+ set(CTEST_CUSTOM_TESTS_IGNORE ${CTEST_CUSTOM_TESTS_IGNORE} functional_tests_rpc)
+endif()