+submit_args=(
"testbox=dc-8g cci-depends.benchmark=sshd cci-depends.yaml"
"testbox=dc-8g borrow-1h.yaml runtime=1m"
"testbox=vm-2p8g borrow-1h.yaml runtime=1m"
)
+submit_one() +{
- submit_result=$(submit -m $args group_id=selftest)
better not use variable defined in another function, hard to find when read it, you can add:
args=$1
before you use it
good
Thanks, Yinsi
Thanks, Luan Shengde
+}
+submit_all() +{
- for args in "${submit_args[@]}"
- do
submit_one $args
- done
+}
+mail() +{
job_state=$(es-jobs group_id=selftest | grep job_state)
email_content="To: $my_email
+Subject: [NOTIFY Compass-CI] Self-test report
+$job_state +"
+curl -XPOST "${SEND_MAIL_HOST:-$LKP_SERVER}:${SEND_MAIL_PORT:-10001}/send_mail_text" -d "$email_content" +}
+submit_all
2.23.0