[problem]: submit test.yaml testbox=vm-2p8g hosts_file not exist: /home/lys/lkp-tests/hosts/vm-2p8g, maybe need check testbox field submit test.yaml, got job_id=crystal.114424
but there is no need to puts above error message, if we have got the hosts file from lab-z9. And even not got hosts file, submit job also will success.
submit test.yaml testbox=vm-2p8g.hjhjgg hosts_file not exist: /home/lys/lkp-tests/hosts/vm-2p8g.hjhjgg, maybe need check testbox field submit test.yaml, got job_id=crystal.114428 --- lib/job.rb | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/lib/job.rb b/lib/job.rb index 9fc7b17f..01719c2e 100755 --- a/lib/job.rb +++ b/lib/job.rb @@ -334,20 +334,14 @@ class Job end
def get_hosts_file + lab_hosts_file = get_lab_hosts_file + return lab_hosts_file if lab_hosts_file + hosts_file_name = @job['tbox_group'].split('--')[0] hosts_file = "#{LKP_SRC}/hosts/#{hosts_file_name}" + return hosts_file if File.file?(hosts_file)
- lab_hosts_file = get_lab_hosts_file - if lab_hosts_file - hosts_file = lab_hosts_file - end - - if File.file?(hosts_file) - hosts_file - else - puts("hosts_file not exist: #{hosts_file}, maybe need check testbox field") - nil - end + raise ArgumentError, "hosts file not exist: #{hosts_file_name}, maybe need check testbox field" end
def include_files