diff --git a/tests/test_ntp.py b/tests/test_ntp.py index 86991d271d60b26cb28a389559225b441bfb2028..38718d281f80390452b6335a1a26848cca45f562 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