Skip to content

Commit 3a04bec

Browse files
committed
test: drop --interactive in non-interactive docker sessions
With a self-hosted runner we get the following classic error when calling `make test-unit`: make[1]: Entering directory '/home/runner/_work/infix/infix/buildroot' /home/runner/_work/infix/infix/test/env /home/runner/_work/infix/infix/test/9pm/9pm.py /home/runner/_work/infix/infix/test/case/all-repo.yaml /home/runner/_work/infix/infix/test/case/all-unit.yaml the input device is not a TTY make[2]: *** [/home/runner/_work/infix/infix/board/x86_64/board.mk:14: test-unit] Error 1 This patch drops interactive from all non-interactive docker sessions. Signed-off-by: Joachim Wiberg <[email protected]>
1 parent 9aa9a60 commit 3a04bec

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

board/x86_64/board.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ test test-qeneth:
1818
$(BR2_EXTERNAL_INFIX_PATH)/test/9pm/9pm.py \
1919
$(INFIX_TESTS))
2020
test-sh test-qeneth-sh:
21-
$(call test-env-qeneth,/bin/sh)
21+
$(call test-env-qeneth,-i /bin/sh)
2222

2323
test-run: | ~/.infix-test-venv
2424
$(call test-env-run,\

test/env

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ name()
104104
containerize=yes
105105
[ -c /dev/kvm ] && kvm="--device=/dev/kvm"
106106

107-
while getopts "Cf:hKp:q:t:" opt; do
107+
while getopts "Cf:hiKp:q:t:" opt; do
108108
case ${opt} in
109109
C)
110110
containerize=
@@ -115,6 +115,9 @@ while getopts "Cf:hKp:q:t:" opt; do
115115
h)
116116
usage && exit 0
117117
;;
118+
i)
119+
interactive="--interactive"
120+
;;
118121
K)
119122
kvm=
120123
;;
@@ -146,7 +149,7 @@ if [ "$containerize" ]; then
146149
--expose 9001-9010 --publish-all \
147150
--hostname "$(name)" \
148151
--name "$(name)" \
149-
--interactive \
152+
$interactive \
150153
--rm \
151154
--security-opt seccomp=unconfined \
152155
--sysctl net.ipv6.conf.all.disable_ipv6=0 \

0 commit comments

Comments
 (0)