We will use 'rspec spec/submit_spec.rb' to debug job_on_fail.yaml, and after the task is failed, it is be waiting state.
Signed-off-by: Hu XueJiao 1034502035@qq.com --- spec/submit/job_on_fail/job_on_fail.yaml | 5 +++++ .../job_on_fail/job_on_fail-3000.yaml | 22 +++++++++++++++++++ spec/submit_spec.rb | 4 ++++ 3 files changed, 31 insertions(+) create mode 100644 spec/submit/job_on_fail/job_on_fail.yaml create mode 100644 spec/submit/job_on_fail/job_on_fail/job_on_fail-3000.yaml
diff --git a/spec/submit/job_on_fail/job_on_fail.yaml b/spec/submit/job_on_fail/job_on_fail.yaml new file mode 100644 index 00000000..bf68ff40 --- /dev/null +++ b/spec/submit/job_on_fail/job_on_fail.yaml @@ -0,0 +1,5 @@ +suite: atomic + +on_fail: + sleep: 3000 +atomic: diff --git a/spec/submit/job_on_fail/job_on_fail/job_on_fail-3000.yaml b/spec/submit/job_on_fail/job_on_fail/job_on_fail-3000.yaml new file mode 100644 index 00000000..3d7ad9b5 --- /dev/null +++ b/spec/submit/job_on_fail/job_on_fail/job_on_fail-3000.yaml @@ -0,0 +1,22 @@ +--- +suite: atomic +on_fail: + sleep: 3000 +atomic: +lab: spec_lab +testbox: vm-2p8g--spec_submit +tbox_group: vm-2p8g--spec_submit +provider: qemu +template: kvm +nr_node: 1 +nr_cpu: 2 +memory: 8G +arch: aarch64 +cpufreq_governor: +need_kconfig: +- CONFIG_KVM_GUEST=y +pp: + sleep: 3000 + atomic: + cpufreq_governor: +monitors: diff --git a/spec/submit_spec.rb b/spec/submit_spec.rb index 169d7812..52d9a158 100644 --- a/spec/submit_spec.rb +++ b/spec/submit_spec.rb @@ -48,4 +48,8 @@ describe 'submit job spec' do it 'separate yaml spec' do submit_job('separate_yaml') end + + it 'job on fail' do + submit_job('job_on_fail') + end end