Skip to content

Commit ffce2eb

Browse files
sgngitster
authored andcommitted
ci/lib-docker: preserve required environment variables
We're using "su -m" to preserve environment variables in the shell run by "su". But, that options will be ignored while "-l" (aka "--login") is specified in util-linux and busybox's su. In a later patch this script will be reused for checking Git for Linux with musl libc on Alpine Linux, Alpine Linux uses "su" from busybox. Since we don't have interest in all environment variables, pass only those necessary variables to the inner script. Signed-off-by: Đoàn Trần Công Danh <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d2fae19 commit ffce2eb

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

ci/run-linux32-build.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,17 @@ else
5151
fi
5252

5353
# Build and test
54-
linux32 --32bit i386 su -m -l $CI_USER -c '
54+
linux32 --32bit i386 su -m -l $CI_USER -c "
5555
set -ex
56+
export DEVELOPER='$DEVELOPER'
57+
export DEFAULT_TEST_TARGET='$DEFAULT_TEST_TARGET'
58+
export GIT_PROVE_OPTS='$GIT_PROVE_OPTS'
59+
export GIT_TEST_OPTS='$GIT_TEST_OPTS'
60+
export GIT_TEST_CLONE_2GB='$GIT_TEST_CLONE_2GB'
61+
export MAKEFLAGS='$MAKEFLAGS'
62+
export cache_dir='$cache_dir'
5663
cd /usr/src/git
57-
test -n "$cache_dir" && ln -s "$cache_dir/.prove" t/.prove
64+
test -n '$cache_dir' && ln -s '$cache_dir/.prove' t/.prove
5865
make
5966
make test
60-
'
67+
"

0 commit comments

Comments
 (0)