File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -217,16 +217,23 @@ if (NBL_WITH_DOCKER)
217
217
endif ()
218
218
endif ()
219
219
220
+ # helper macro for stalling the script for 5 sec
220
221
macro (wait5sec )
221
222
execute_process (COMMAND powershell -Command "Start-Sleep -Seconds 5" )
222
223
endmacro ()
224
+
225
+ # helper macro for calling docker, takes args as a string
226
+ macro (calldocker args )
227
+ execute_process (COMMAND ${DOCKER_EXECUTABLE} ${args} RESULT_VARIABLE DOCKER_EXIT_CODE OUTPUT_QUIET )
228
+ endmacro ()
223
229
230
+ # check if the docker daemon is running
224
231
# DDT stands for Docker Daemon Test
225
232
set (DDT_MAX_ATTEMPTS 10 )
226
233
set (DDT_DOCKER_RESPONDING False )
227
234
foreach (ATTEMPT RANGE 1 ${DDT_MAX_ATTEMPTS} )
228
235
message (STATUS "Attempt ${ATTEMPT} of ${DDT_MAX_ATTEMPTS} : Checking Docker Endpoint" )
229
- execute_process ( COMMAND ${DOCKER_EXECUTABLE} info RESULT_VARIABLE DOCKER_EXIT_CODE OUTPUT_QUIET )
236
+ calldocker ( " info" )
230
237
231
238
if (DOCKER_EXIT_CODE EQUAL 0 )
232
239
set (DDT_DOCKER_RESPONDING True )
@@ -239,6 +246,7 @@ if (NBL_WITH_DOCKER)
239
246
if (NOT DDT_DOCKER_RESPONDING )
240
247
message (FATAL_ERROR "Docker Daemon is not responding. Please make sure it's running in the background" )
241
248
endif ()
249
+
242
250
endif ()
243
251
244
252
set (THIRD_PARTY_SOURCE_DIR "${PROJECT_SOURCE_DIR} /3rdparty" )
You can’t perform that action at this time.
0 commit comments