mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-10 21:53:57 +08:00
ci: propagate RUNC_ALLOW_UNSAFE_TESTS to ssh session
The RUNC_ALLOW_UNSAFE_TESTS variable set in the Cirrus CI env block
does not reach the integration tests because they are executed via
"ssh -tt localhost make ...", which starts a new login shell that
does not inherit the caller's environment. As a result, unsafe tests
are always skipped in Cirrus CI even though the intent is to run them.
Fix this by exporting the variable in /root/.bashrc (same way we
already handle PATH), so the ssh session picks it up.
See #5212 (comment).
Fixes: 9932ad19 ("tests/int: introduce the concept of unsafe tests")
Signed-off-by: RedMakeUp <girafeeblue@gmail.com>
This commit is contained in:
+2
-2
@@ -15,8 +15,6 @@ task:
|
||||
BATS_VERSION: "v1.12.0"
|
||||
LIBPATHRS_VERSION: "0.2.4"
|
||||
RPMS: gcc git-core iptables jq glibc-static libseccomp-devel make criu fuse-sshfs container-selinux policycoreutils cargo lld wget
|
||||
# Allow potentially unsafe tests.
|
||||
RUNC_ALLOW_UNSAFE_TESTS: yes
|
||||
# yamllint disable rule:key-duplicates
|
||||
matrix:
|
||||
- DISTRO: almalinux-8
|
||||
@@ -85,6 +83,8 @@ task:
|
||||
/home/runc/script/setup_rootless.sh
|
||||
# set PATH
|
||||
echo 'export PATH=/usr/local/go/bin:/usr/local/bin:$PATH' >> /root/.bashrc
|
||||
# Allow potentially unsafe tests.
|
||||
echo 'export RUNC_ALLOW_UNSAFE_TESTS=yes' >> /root/.bashrc
|
||||
# Setup ssh localhost for terminal emulation (script -e did not work)
|
||||
ssh-keygen -t ed25519 -f /root/.ssh/id_ed25519 -N ""
|
||||
cat /root/.ssh/id_ed25519.pub >> /root/.ssh/authorized_keys
|
||||
|
||||
Reference in New Issue
Block a user