[PATCH lkp-tests] lib/job.rb: no need puts the a warning

[why] we can get hostname from the repo lab-z9 there is no need to check hostname file whether exist under the path lkp-tests/hosts --- lib/job.rb | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/job.rb b/lib/job.rb index 5c2c9517..1948a479 100755 --- a/lib/job.rb +++ b/lib/job.rb @@ -341,13 +341,6 @@ class Job 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 end def include_files -- 2.23.0

On Tue, Nov 03, 2020 at 04:46:13PM +0800, Li Ping wrote:
[why] we can get hostname from the repo lab-z9 there is no need to check hostname file whether exist under the path lkp-tests/hosts --- lib/job.rb | 7 ------- 1 file changed, 7 deletions(-)
diff --git a/lib/job.rb b/lib/job.rb index 5c2c9517..1948a479 100755 --- a/lib/job.rb +++ b/lib/job.rb @@ -341,13 +341,6 @@ class Job if lab_hosts_file hosts_file = lab_hosts_file end - - if File.file?(hosts_file)
if need not check under lkp-tests/hosts may be can remove get_hosts_file function, use get_lab_hosts_file directly Thanks, Shenwei
- hosts_file - else - puts("hosts_file not exist: #{hosts_file}, maybe need check testbox field") - nil - end end
def include_files -- 2.23.0

On Tue, Nov 03, 2020 at 04:53:12PM +0800, Xiao Shenwei wrote:
On Tue, Nov 03, 2020 at 04:46:13PM +0800, Li Ping wrote:
[why] we can get hostname from the repo lab-z9 there is no need to check hostname file whether exist under the path lkp-tests/hosts --- lib/job.rb | 7 ------- 1 file changed, 7 deletions(-)
diff --git a/lib/job.rb b/lib/job.rb index 5c2c9517..1948a479 100755 --- a/lib/job.rb +++ b/lib/job.rb @@ -341,13 +341,6 @@ class Job if lab_hosts_file hosts_file = lab_hosts_file end - - if File.file?(hosts_file)
if need not check under lkp-tests/hosts may be can remove get_hosts_file function, use get_lab_hosts_file directly
ok, i got it. Thanks, Ping
Thanks, Shenwei
- hosts_file - else - puts("hosts_file not exist: #{hosts_file}, maybe need check testbox field") - nil - end end
def include_files -- 2.23.0
participants (2)
-
Li Ping
-
Xiao Shenwei