Skip to content

Commit

Permalink
test: drop --interactive in non-interactive docker sessions
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
troglobit committed Feb 27, 2024
1 parent 9aa9a60 commit 3a04bec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion board/x86_64/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test test-qeneth:
$(BR2_EXTERNAL_INFIX_PATH)/test/9pm/9pm.py \
$(INFIX_TESTS))
test-sh test-qeneth-sh:
$(call test-env-qeneth,/bin/sh)
$(call test-env-qeneth,-i /bin/sh)

test-run: | ~/.infix-test-venv
$(call test-env-run,\
Expand Down
7 changes: 5 additions & 2 deletions test/env
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ name()
containerize=yes
[ -c /dev/kvm ] && kvm="--device=/dev/kvm"

while getopts "Cf:hKp:q:t:" opt; do
while getopts "Cf:hiKp:q:t:" opt; do
case ${opt} in
C)
containerize=
Expand All @@ -115,6 +115,9 @@ while getopts "Cf:hKp:q:t:" opt; do
h)
usage && exit 0
;;
i)
interactive="--interactive"
;;
K)
kvm=
;;
Expand Down Expand Up @@ -146,7 +149,7 @@ if [ "$containerize" ]; then
--expose 9001-9010 --publish-all \
--hostname "$(name)" \
--name "$(name)" \
--interactive \
$interactive \
--rm \
--security-opt seccomp=unconfined \
--sysctl net.ipv6.conf.all.disable_ipv6=0 \
Expand Down

0 comments on commit 3a04bec

Please sign in to comment.