summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPetr Štetiar <ynezz@true.cz>2021-03-22 21:16:51 +0100
committerPetr Štetiar <ynezz@true.cz>2021-03-22 21:16:51 +0100
commit83efca2d2e7d1b84dd57fc6d62c398705285e5b2 (patch)
tree79dcb4e35f6b8f468a35ee48793455637b5e07b1 /tests
parent2c843b2bc04c34403d9a6b4de025447e4b5d8aa4 (diff)
downloaduclient-83efca2d2e7d1b84dd57fc6d62c398705285e5b2.tar.gz
tests: fix possibly longer start of HTTP server
Seems like sometimes it can take some time to start HTTP server so let's wait for the server becoming operating before executing test cases. References: https://gitlab.com/openwrt/project/uclient/-/jobs/1118330555#L984 Signed-off-by: Petr Štetiar <ynezz@true.cz>
Diffstat (limited to 'tests')
-rw-r--r--tests/cram/CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/cram/CMakeLists.txt b/tests/cram/CMakeLists.txt
index ba75802..791cfd3 100644
--- a/tests/cram/CMakeLists.txt
+++ b/tests/cram/CMakeLists.txt
@@ -24,7 +24,8 @@ ADD_CUSTOM_TARGET(
ADD_CUSTOM_TARGET(
http-server ALL
- COMMAND ${PYTHON_VENV_DIR}/bin/python3 -m http.server 1922 --bind 127.0.0.1 > /dev/null 2>&1 &
+ COMMAND ${PYTHON_VENV_DIR}/bin/python3 -m http.server 1922 --bind 127.0.0.1 > /dev/null 2>&1 & ;
+ curl --silent --retry 3 --retry-delay 1 --retry-connrefused http://127.0.0.1:1922 > /dev/null
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/server
DEPENDS http-server-kill
)