[PATCH compass-ci] delimiter/utils.rb: deal submit job failed

3 Feb
2021
3 Feb
'21
4:31 p.m.
If we submit job failed, we get the response "xxx job id=0, error: xxx", we should match the response at first and return nil Signed-off-by: Cao Xueliang <caoxl78320@163.com> --- src/delimiter/utils.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/src/delimiter/utils.rb b/src/delimiter/utils.rb index 41b65de..3120ca6 100644 --- a/src/delimiter/utils.rb +++ b/src/delimiter/utils.rb @@ -69,6 +69,7 @@ module Utils save_job_to_yaml(job, PROCESS_JOB_YAML) response = %x(#{LKP_SRC}/sbin/submit #{PROCESS_JOB_YAML}) puts "submit job response: #{response}" + return nil if response =~ /job id=0/ return $1 if response =~ /job id=(.*)/ return nil -- 2.23.0
1484
Age (days ago)
1484
Last active (days ago)
0 comments
1 participants
participants (1)
-
Cao Xueliang