1. vm-hi1620-2p8g--USER -> vm-2p8g--taishan200-2280-2s48p-256g--a71
2. test in tbox, so remove my-qemu.sh
3. get job run time by es-find
Signed-off-by: Liu Yinsi liuyinsi@163.com --- .../maintain/walk-os-test/iperf-walk-os.yaml | 2 +- .../maintain/walk-os-test/walk-os-iperf-test | 19 +++++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/user-client/maintain/walk-os-test/iperf-walk-os.yaml b/user-client/maintain/walk-os-test/iperf-walk-os.yaml index 2991743..b215730 100644 --- a/user-client/maintain/walk-os-test/iperf-walk-os.yaml +++ b/user-client/maintain/walk-os-test/iperf-walk-os.yaml @@ -7,7 +7,7 @@ if role server: if role client: iperf: protocol: tcp -testbox: vm-hi1620-2p8g--USER +testbox: vm-2p8g--taishan200-2280-2s48p-256g--a71 os: OS os_arch: OS_ARCH os_version: OS_VER diff --git a/user-client/maintain/walk-os-test/walk-os-iperf-test b/user-client/maintain/walk-os-test/walk-os-iperf-test index 21e1428..9c2b612 100755 --- a/user-client/maintain/walk-os-test/walk-os-iperf-test +++ b/user-client/maintain/walk-os-test/walk-os-iperf-test @@ -43,12 +43,23 @@ create_test_yaml() { echo "$hwarch $os/$os_arch/$os_ver" }
+get_job_state() { + job_state='' + until [ -n "$job_state" ] + do + job_state=$(es-find id=$job_id| grep job_state) + sleep 5 + done +} + job_test() { local job_id bef aft - job_id=$(submit test.yaml |awk '{print $NF}') - bef=$(date +%s) - ./my-qemu.sh - aft=$(date +%s) + job_id=$(submit test.yaml |awk -F '=' '{print $NF}') + get_job_state + start_time=$(es-find id=$job_id| grep start_time| awk -F '"' '{print $4}') + end_time=$(es-find id=$job_id| grep end_time| awk -F '"' '{print $4}') + bef=$(date -d "$start_time" +%s) + aft=$(date -d "$end_time" +%s) logging "$1" "$2" "$3" "$(sec2date $bef)" "$(sec2date $aft)" "$((aft - bef))" "$job_id" }
CC Zhende.
+get_job_state() {
Is it possible to use submit -m instead of DIY check here?
Thanks, Fengguang
- job_state=''
- until [ -n "$job_state" ]
- do
job_state=$(es-find id=$job_id| grep job_state)
sleep 5
- done
+}
job_test() { local job_id bef aft
- job_id=$(submit test.yaml |awk '{print $NF}')
- bef=$(date +%s)
- ./my-qemu.sh
- aft=$(date +%s)
- job_id=$(submit test.yaml |awk -F '=' '{print $NF}')
- get_job_state
- start_time=$(es-find id=$job_id| grep start_time| awk -F '"' '{print $4}')
- end_time=$(es-find id=$job_id| grep end_time| awk -F '"' '{print $4}')
- bef=$(date -d "$start_time" +%s)
- aft=$(date -d "$end_time" +%s) logging "$1" "$2" "$3" "$(sec2date $bef)" "$(sec2date $aft)" "$((aft - bef))" "$job_id"
}
-- 2.23.0