[PATCH lkp-tests] fix PATH exclude $CCI_SRC/sbin

when run job, the PATH=$PATH:$LKP_SRC/bin exclude $CCI_SRC/sbin, when run multi-docker job, the docker-pull command can't be use Signed-off-by: Xiao Shenwei <xiaoshenwei96@163.com> --- daemon/multi-docker | 2 ++ 1 file changed, 2 insertions(+) diff --git a/daemon/multi-docker b/daemon/multi-docker index b47c23e2..bd79595e 100755 --- a/daemon/multi-docker +++ b/daemon/multi-docker @@ -8,6 +8,8 @@ multi_docker() { export CCI_SRC=/c/compass-ci + export PATH="$PATH:$CCI_SRC/sbin" + local hostname=$tbox_group--$HOSTNAME $CCI_SRC/providers/multi-docker -n $hostname -c $nr_container } -- 2.23.0

On Thu, Oct 15, 2020 at 04:55:42PM +0800, Xiao Shenwei wrote:
when run job, the PATH=$PATH:$LKP_SRC/bin exclude $CCI_SRC/sbin,
when run multi-docker job, the docker-pull command can't be use
Signed-off-by: Xiao Shenwei <xiaoshenwei96@163.com> --- daemon/multi-docker | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/daemon/multi-docker b/daemon/multi-docker index b47c23e2..bd79595e 100755 --- a/daemon/multi-docker +++ b/daemon/multi-docker @@ -8,6 +8,8 @@ multi_docker() { export CCI_SRC=/c/compass-ci + export PATH="$PATH:$CCI_SRC/sbin"
1. If we need to use the file under $CCI_SRC/sbin, we'd better put this dir at the beginning of $PATH. Otherwise it might get covered. So maybe you can modify as follow: export PATH="$CCI_SRC/sbin:$PATH" 2. add the {} of var may avoid some distortions. export PATH="${CCI_SRC}/sbin:$PATH" -------- Thanks Yu Chuan
+ local hostname=$tbox_group--$HOSTNAME $CCI_SRC/providers/multi-docker -n $hostname -c $nr_container } -- 2.23.0

On Thu, Oct 15, 2020 at 05:12:31PM +0800, Yu Chuan wrote:
On Thu, Oct 15, 2020 at 04:55:42PM +0800, Xiao Shenwei wrote:
when run job, the PATH=$PATH:$LKP_SRC/bin exclude $CCI_SRC/sbin,
when run multi-docker job, the docker-pull command can't be use
Signed-off-by: Xiao Shenwei <xiaoshenwei96@163.com> --- daemon/multi-docker | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/daemon/multi-docker b/daemon/multi-docker index b47c23e2..bd79595e 100755 --- a/daemon/multi-docker +++ b/daemon/multi-docker @@ -8,6 +8,8 @@ multi_docker() { export CCI_SRC=/c/compass-ci + export PATH="$PATH:$CCI_SRC/sbin"
1. If we need to use the file under $CCI_SRC/sbin, we'd better put this dir at the beginning of $PATH. Otherwise it might get covered. So maybe you can modify as follow: export PATH="$CCI_SRC/sbin:$PATH"
you means for search order, $CCI_SRC is better write in front of $PATH ? Thanks, Shenwei
2. add the {} of var may avoid some distortions. export PATH="${CCI_SRC}/sbin:$PATH"
-------- Thanks Yu Chuan
+ local hostname=$tbox_group--$HOSTNAME $CCI_SRC/providers/multi-docker -n $hostname -c $nr_container } -- 2.23.0

On Thu, Oct 15, 2020 at 05:28:20PM +0800, Xiao Shenwei wrote:
On Thu, Oct 15, 2020 at 05:12:31PM +0800, Yu Chuan wrote:
On Thu, Oct 15, 2020 at 04:55:42PM +0800, Xiao Shenwei wrote:
when run job, the PATH=$PATH:$LKP_SRC/bin exclude $CCI_SRC/sbin,
when run multi-docker job, the docker-pull command can't be use
Signed-off-by: Xiao Shenwei <xiaoshenwei96@163.com> --- daemon/multi-docker | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/daemon/multi-docker b/daemon/multi-docker index b47c23e2..bd79595e 100755 --- a/daemon/multi-docker +++ b/daemon/multi-docker @@ -8,6 +8,8 @@ multi_docker() { export CCI_SRC=/c/compass-ci + export PATH="$PATH:$CCI_SRC/sbin"
1. If we need to use the file under $CCI_SRC/sbin, we'd better put this dir at the beginning of $PATH. Otherwise it might get covered. So maybe you can modify as follow: export PATH="$CCI_SRC/sbin:$PATH"
you means for search order, $CCI_SRC is better write in front of $PATH ?
Yeap. -------- Thanks Yu Chuan
Thanks, Shenwei
2. add the {} of var may avoid some distortions. export PATH="${CCI_SRC}/sbin:$PATH"
-------- Thanks Yu Chuan
+ local hostname=$tbox_group--$HOSTNAME $CCI_SRC/providers/multi-docker -n $hostname -c $nr_container } -- 2.23.0

On Thu, Oct 15, 2020 at 04:55:42PM +0800, Xiao Shenwei wrote:
when run job, the PATH=$PATH:$LKP_SRC/bin exclude $CCI_SRC/sbin,
when run multi-docker job, the docker-pull command can't be use
Run docker-pull with full path? Thanks, Fengguang
Signed-off-by: Xiao Shenwei <xiaoshenwei96@163.com> --- daemon/multi-docker | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/daemon/multi-docker b/daemon/multi-docker index b47c23e2..bd79595e 100755 --- a/daemon/multi-docker +++ b/daemon/multi-docker @@ -8,6 +8,8 @@ multi_docker() { export CCI_SRC=/c/compass-ci + export PATH="$PATH:$CCI_SRC/sbin" + local hostname=$tbox_group--$HOSTNAME $CCI_SRC/providers/multi-docker -n $hostname -c $nr_container } -- 2.23.0
participants (3)
-
Wu Fengguang
-
Xiao Shenwei
-
Yu Chuan