[PATCH compass-ci] sbin/run_job: update the script

[why] 1.host-info is adapted in physical machine, so replace yaml-file 2.after running multi-docker and multi-qemu, these processes need to be deleted Signed-off-by: Hu XueJiao <1034502035@qq.com> --- sbin/run_job | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sbin/run_job b/sbin/run_job index 325fa9f..03bb061 100755 --- a/sbin/run_job +++ b/sbin/run_job @@ -24,7 +24,7 @@ submit_one_job() submit_job() { - yaml_args=("$cci_makepkg_file" "host-info.yaml") + yaml_args=("$cci_makepkg_file" "ebizzy.yaml") for yaml in "${yaml_args[@]}" do submit_one_job & @@ -72,6 +72,16 @@ run_docker() done } +kill_process() +{ + multi_qemu=`ps -ef |grep multi-qemu |grep "$USER" |awk '{print $2}'` + multi_docker=`ps -ef |grep multi-docker |grep "$USER" |awk '{print $2}'` + kill -9 $multi_qemu + kill -9 $multi_docker +} + run_qemu run_docker wait + +kill_process -- 2.23.0

+kill_process() +{ + multi_qemu=`ps -ef |grep multi-qemu |grep "$USER" |awk '{print $2}'` + multi_docker=`ps -ef |grep multi-docker |grep "$USER" |awk '{print $2}'` + kill -9 $multi_qemu + kill -9 $multi_docker
That's awkward. Can let multi_qemu/multi_docker --pidfile to save pid to a file. And kill pids in that file instead. QEMU also supports -pidfile man qemu -pidfile file Store the QEMU process PID in file. It is useful if you launch QEMU from a script. Thanks, Fengguang

On Mon, Jan 11, 2021 at 04:56:19PM +0800, Hu Xuejiao wrote:
+kill_process() +{ + multi_qemu=`ps -ef |grep multi-qemu |grep "$USER" |awk '{print $2}'` + multi_docker=`ps -ef |grep multi-docker |grep "$USER" |awk '{print $2}'` + kill -9 $multi_qemu + kill -9 $multi_docker +}
kill -9 $(cat $CCI_SRC/providers/pid) 2> /dev/null use this file root@2288hv5-2s44p-384g--b5 /c/compass-ci/providers# cat pid 380973 380974 380975 380976 Thanks, Yinsi
+ run_qemu run_docker wait + +kill_process -- 2.23.0
participants (3)
-
Hu Xuejiao
-
Liu Yinsi
-
Wu Fengguang