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, otherwise we will get the wrong job id.
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