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