Skip to content

Commit cf477f4

Browse files
committed
revise timeout b/c macOS doesn't support the command, nice
1 parent 899841a commit cf477f4

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,16 @@ install-kernel:
156156
MONITOR_PID=$$!; \
157157
echo "Monitor running with PID $$MONITOR_PID"; \
158158
fi; \
159-
timeout 60 bin/container --debug system start --timeout 60 --enable-kernel-install $(SYSTEM_START_OPTS)
159+
bin/container --debug system start --timeout 60 --enable-kernel-install $(SYSTEM_START_OPTS) & \
160+
CMD_PID=$$!; \
161+
TIMEOUT=120; \
162+
( sleep $$TIMEOUT && kill -TERM $$CMD_PID 2>/dev/null && echo "Command timed out after $$TIMEOUT seconds" ) & \
163+
KILLER_PID=$$!; \
164+
wait $$CMD_PID; \
165+
STATUS=$$?; \
166+
kill -TERM $$KILLER_PID 2>/dev/null; \
167+
wait $$KILLER_PID 2>/dev/null; \
168+
exit $$STATUS
160169

161170
.PHONY: coverage
162171
coverage: init-block

0 commit comments

Comments
 (0)