aboutsummaryrefslogtreecommitdiffstats
path: root/selftest
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-04-10 19:51:31 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2020-04-11 19:15:53 +0200
commite8bbcbf5b8f3fd456b17595fd6ea22ce031b5427 (patch)
tree751744a22e994475120a8edde2422bd90cc5a7de /selftest
parent9b486eedb6914e815468094b1838424c5772a953 (diff)
Create core directory to contain most of code not in object classes used by tests
Diffstat (limited to 'selftest')
-rw-r--r--selftest/_prep.py3
-rwxr-xr-xselftest/config_test.py2
-rw-r--r--selftest/lock_test_help.py2
-rwxr-xr-xselftest/log_test.py4
-rwxr-xr-xselftest/process_test.py2
-rwxr-xr-xselftest/resource_test.py3
-rwxr-xr-xselftest/suite_test.py3
-rwxr-xr-xselftest/template_test.py2
-rwxr-xr-xselftest/trial_test.py2
-rwxr-xr-xselftest/util_test.py3
10 files changed, 13 insertions, 13 deletions
diff --git a/selftest/_prep.py b/selftest/_prep.py
index 3ef6e81..582b8fb 100644
--- a/selftest/_prep.py
+++ b/selftest/_prep.py
@@ -7,11 +7,10 @@ src_dir = os.path.join(top_dir, 'src')
# to find the osmo_gsm_tester py module
sys.path.append(src_dir)
-from osmo_gsm_tester import log
+from osmo_gsm_tester.core import log
log.TestsTarget()
log.set_all_levels(log.L_DBG)
if '-v' in sys.argv:
log.style_change(trace=True)
-
diff --git a/selftest/config_test.py b/selftest/config_test.py
index fa86adc..83a8d06 100755
--- a/selftest/config_test.py
+++ b/selftest/config_test.py
@@ -8,7 +8,7 @@ import io
import pprint
import copy
-from osmo_gsm_tester import config, log, schema
+from osmo_gsm_tester.core import config, log, schema
example_config_file = 'test.cfg'
example_config = os.path.join(_prep.script_dir, 'config_test', example_config_file)
diff --git a/selftest/lock_test_help.py b/selftest/lock_test_help.py
index f4e1f9b..d68bbf8 100644
--- a/selftest/lock_test_help.py
+++ b/selftest/lock_test_help.py
@@ -4,7 +4,7 @@ import os
import _prep
-from osmo_gsm_tester.util import FileLock, touch_file
+from osmo_gsm_tester.core.util import FileLock, touch_file
testdir, name = sys.argv[1:]
stop_signalling_file = os.path.join(testdir, name)
diff --git a/selftest/log_test.py b/selftest/log_test.py
index 889a8a5..f6ce02b 100755
--- a/selftest/log_test.py
+++ b/selftest/log_test.py
@@ -24,7 +24,7 @@ import _prep
import sys
import os
-from osmo_gsm_tester import log
+from osmo_gsm_tester.core import log
#log.targets[0].get_time_str = lambda: '01:02:03'
fake_time = '01:02:03'
@@ -45,7 +45,7 @@ class LogTest(log.Origin):
super().__init__(log.C_TST, *name_items, **detail_items)
t = LogTest('some', 'name', some="detail")
-
+
t.log("hello log")
t.err("hello err")
t.dbg("hello dbg not visible")
diff --git a/selftest/process_test.py b/selftest/process_test.py
index 71523c9..de4f7a6 100755
--- a/selftest/process_test.py
+++ b/selftest/process_test.py
@@ -4,7 +4,7 @@ import _prep
import time
import os
-from osmo_gsm_tester import process, util, log
+from osmo_gsm_tester.core import process, util, log
tmpdir = util.Dir(util.get_tempdir())
diff --git a/selftest/resource_test.py b/selftest/resource_test.py
index cdfe021..f399e20 100755
--- a/selftest/resource_test.py
+++ b/selftest/resource_test.py
@@ -6,7 +6,8 @@ import pprint
import shutil
import atexit
import _prep
-from osmo_gsm_tester import config, log, resource, util
+from osmo_gsm_tester.core import config, log, util
+from osmo_gsm_tester import resource
workdir = util.get_tempdir()
diff --git a/selftest/suite_test.py b/selftest/suite_test.py
index 115d76e..c4dd5bf 100755
--- a/selftest/suite_test.py
+++ b/selftest/suite_test.py
@@ -2,7 +2,8 @@
import os
import _prep
import shutil
-from osmo_gsm_tester import log, suite, config, report, util
+from osmo_gsm_tester.core import log, config, util
+from osmo_gsm_tester import suite, report
config.ENV_CONF = './suite_test'
diff --git a/selftest/template_test.py b/selftest/template_test.py
index f4f1bd5..747d508 100755
--- a/selftest/template_test.py
+++ b/selftest/template_test.py
@@ -5,7 +5,7 @@ import _prep
import sys
import os
-from osmo_gsm_tester import template, log
+from osmo_gsm_tester.core import template, log
log.set_level(log.C_CNF, log.L_DBG)
diff --git a/selftest/trial_test.py b/selftest/trial_test.py
index ba3f01b..e73ca37 100755
--- a/selftest/trial_test.py
+++ b/selftest/trial_test.py
@@ -3,7 +3,7 @@
import time
import _prep
import os
-from osmo_gsm_tester import util
+from osmo_gsm_tester.core import util
from osmo_gsm_tester.trial import Trial
workdir = util.get_tempdir()
diff --git a/selftest/util_test.py b/selftest/util_test.py
index c517655..e07b2d4 100755
--- a/selftest/util_test.py
+++ b/selftest/util_test.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
import _prep
-from osmo_gsm_tester.util import hash_obj
+from osmo_gsm_tester.core.util import hash_obj
print('- expect the same hashes on every test run')
print(hash_obj('abc'))
@@ -9,4 +9,3 @@ print(hash_obj(1))
print(hash_obj([1, 2, 3]))
print(hash_obj({ 'k': [ {'a': 1, 'b': 2}, {'a': 3, 'b': 4}, ],
'i': [ {'c': 1, 'd': 2}, {'c': 3, 'd': 4}, ] }))
-