@@ -33,23 +33,31 @@ output_failed_logs() {
33
33
}
34
34
trap output_failed_logs 0
35
35
36
+ env=" "
37
+ if [ ! -z " ${SUDO} " ]; then
38
+ env=" ${env} SUDO=${SUDO} "
39
+ fi
36
40
if [ ! -z " ${TCMALLOC_STACKTRACE_METHOD} " ]; then
37
- echo TCMALLOC_STACKTRACE_METHOD=" ${TCMALLOC_STACKTRACE_METHOD} "
38
- echo export TCMALLOC_STACKTRACE_METHOD
39
- export TCMALLOC_STACKTRACE_METHOD
41
+ env=" ${env} TCMALLOC_STACKTRACE_METHOD=${TCMALLOC_STACKTRACE_METHOD} "
42
+ fi
43
+ if [ ! -z " ${TEST_SSH_SSHD_ENV} " ]; then
44
+ env=" ${env} TEST_SSH_SSHD_ENV=${TEST_SSH_SSHD_ENV} "
45
+ fi
46
+ if [ ! -z " ${env} " ]; then
47
+ env=" env${env} "
40
48
fi
41
49
42
50
if [ -z " ${LTESTS} " ]; then
43
- make ${TEST_TARGET} SKIP_LTESTS=" ${SKIP_LTESTS} "
51
+ ${env} make ${TEST_TARGET} SKIP_LTESTS=" ${SKIP_LTESTS} "
44
52
else
45
- make ${TEST_TARGET} SKIP_LTESTS=" ${SKIP_LTESTS} " LTESTS=" ${LTESTS} "
53
+ ${env} make ${TEST_TARGET} SKIP_LTESTS=" ${SKIP_LTESTS} " LTESTS=" ${LTESTS} "
46
54
fi
47
55
48
56
if [ ! -z " ${SSHD_CONFOPTS} " ]; then
49
57
echo " rerunning t-exec with TEST_SSH_SSHD_CONFOPTS='${SSHD_CONFOPTS} '"
50
58
if [ -z " ${LTESTS} " ]; then
51
- make t-exec SKIP_LTESTS=" ${SKIP_LTESTS} " TEST_SSH_SSHD_CONFOPTS=" ${SSHD_CONFOPTS} "
59
+ ${env} make t-exec SKIP_LTESTS=" ${SKIP_LTESTS} " TEST_SSH_SSHD_CONFOPTS=" ${SSHD_CONFOPTS} "
52
60
else
53
- make t-exec SKIP_LTESTS=" ${SKIP_LTESTS} " LTESTS=" ${LTESTS} " TEST_SSH_SSHD_CONFOPTS=" ${SSHD_CONFOPTS} "
61
+ ${env} make t-exec SKIP_LTESTS=" ${SKIP_LTESTS} " LTESTS=" ${LTESTS} " TEST_SSH_SSHD_CONFOPTS=" ${SSHD_CONFOPTS} "
54
62
fi
55
63
fi
0 commit comments