From 53cb03b0279e40781a96e0329d8c74982335289d Mon Sep 17 00:00:00 2001
From: Nicolas KAROLAK <nicolas@karolak.fr>
Date: Fri, 18 Oct 2019 08:20:35 +0000
Subject: [PATCH] remove useless check on utils.py file

---
 tests/test_ntp.py | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/tests/test_ntp.py b/tests/test_ntp.py
index 86991d27..38718d28 100755
--- a/tests/test_ntp.py
+++ b/tests/test_ntp.py
@@ -37,15 +37,8 @@ def main():
         return 1
     u.success('System is NTP synchronized.')
 
-    os.chdir(os.path.dirname(__file__))
-
     u.log('Checking NTP server conforms to conf...')
-    if not os.path.isfile('../utils.py'):
-        u.error('Could not find envsetup conf file or not running from expected location.')
-        return 1
-
     conf = u.load_conf()
-
     expected_servers = None
     if conf.get('NTP_SERVER'):
         expected_servers = [s.strip() for s in conf['NTP_SERVER'].split(',')]
@@ -54,7 +47,6 @@ def main():
             expected_servers = ['ntp.ubuntu.com']
         else:
             expected_servers = ['0.debian.pool.ntp.org']
-
     with open(ntpconf, 'r') as fo:
         content = fo.read()
     servers = list()
@@ -69,6 +61,7 @@ def main():
         else:
             u.log('Expected NTP server %s found in configuration (total servers: %s).' % (expected_server, len(servers)))
     u.success('NTP OK.')
+
     return 0
 
 
-- 
GitLab