Rename log_sink to log_write_func to make it more clear.
Remember the list of log targets as static member LogTarget.all_targets.
Make each LogTarget instance register with the list of targets implicitly.
No longer create a default log target, rather create one explicitly in
osmo-gsm-tester.py.
Change-Id: I5844485eaed536cb34b44bfe23dc635fe1982dcd
Add flag raise_if_missing, and if False, instead of raising an exception,
return an empty list for that kind of resource. This makes sense for a caller
that requests a single resource.
When finding a single resource to use in ReservedResources.get(), use this to
raise a more adequate exception message if none was found.
Change-Id: Ia296ea68a787bede037a6cea38563b570fb0766e
The prompt() is useful for supervisor (user) interaction during tests.
However it had numerous problems:
- closed stdin, so second prompt() didn't work
- no editing
- no utf-8 multichar
- unflexible poll interval (poll often to stay responsive to input)
and unrelated:
- stdin was hijacked by subprocess.Popen
Firstly pass stdin=PIPE to all subprocesses to leave the tester's stdin
untouched.
Secondly use python input() to read the user entry (instead of mucking about
with the stdin fd), and import readline for history and editing features.
The old approach was put in place to allow polling DBus and processes
regularly. Instead, allow this by running input() in a separate thread while
polling regularly and slowly in the main thread.
The prompt code is now simpler, cleaner and works better.
Will be used in the upcoming 'debug' suite.
Change-Id: I580aca52cd038b59418055259d0d09e9aab49124
Collect incoming signals in a defer queue and handle them once the DBus polling
is through.
Related: OS#2220
Change-Id: Ic7520f2165888a4ee0f83b779cd58d20c4e45fa0
trials-cleanup.sh was still using the old 'SEEN' marker and thus didn't work.
In trial.py, make sure that *every* trial that is run is marked as taken, not
only those discovered by Trial.next().
Change-Id: I8aa6b2eece5d43266a7c84e6b2974b8fe7f3cda1
On failure to find an unused resource (in case a test tries to use more
resources than are reserved), the handling code had a bug: print
reserved_resources from the proper source, i.e. suite_run.
Change-Id: Ifdc4201581b3293605196292339e841543ea284e
Allow tokens to be passed for SMS composition, and use that to pass MO and MT
modem names into the SMS text for easier debugging.
Change-Id: I5e0d066ffa7a4631e8568c6cd4f210627f209122
For some reason the code there catches exceptions happening while interfaces
are being established. That's not a good idea, drop it.
Related: OS#2220
Change-Id: Ida7731ed6ff3cad44ff437137abe2d6a424fcaa4
Tweak test expectations to include the new debug logging.
Go through the paths in alphabetical order to get deterministic logging output,
so the test expectations always match.
Change-Id: I11a905b2467cda691d9ccea30ae436bac96476c9
Use it to set root user for SysmoBTS, otherwise if osmo-gsm-tester is
run by another user it will fail to connect
Change-Id: I67d4126fc75cb9c2d249c713cd6f14db1f1e21da
The nested wait was definitely a bad idea. This here is certainly not very
nice either, but an attempt to catch cases where a dbus interface cannot
be used yet despite being signalled by ofono (sporadically happens).
Change-Id: I2ac7eb0f5174250f4b97e2bf758666410d8cb854
So far for bool only because we don't have a non-bool setting yet. Should
be extended once we have.
Keep the probably unneeded 'poll()' to not mix changes too much.
Apply various fixes that arose from test case code rot. These tests will now be
used to verify patches submitted to gerrit, so they need to be up to par.
Change-Id: I5277be0c434226d9d02e038f0bc72fd2557350c1
Related: OS#2215
Clearly separate the kinds of BTS hardware the GSM tester knows ('type') from
the NITB's bts/type config item ('osmobsc_bts_type' -- not 'osmonitb_...' to
stay in tune with future developments: it is the libbsc that needs this).
For BTS hardware kinds, use the full name of the binary for osmo driven models:
osmo-bts-sysmo, osmo-bts-trx, osmo-bts-octphy.
Change-Id: I1aa9b48e74013a93f9db1a34730f17717fb3b36c
I know that these commit messages aren't very good, but the code is not stable
yet, so I'm not bothering with details.
Change-Id: I2d5e5f4a5407725d71093cbd71ef97b271eb8197
The original osmo-gsm-tester was an internal development at sysmocom, mostly by
D. Laszlo Sitzer <dlsitzer@sysmocom.de>, of which this public osmo-gsm-tester
is a refactoring / rewrite.
This imports an early state of the refactoring and is not functional yet. Bits
from the earlier osmo-gsm-tester will be added as needed. The earlier commit
history is not imported.