aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-10-13 23:04:05 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-10-15 15:50:33 +0700
commit43f211a77d13b6f8039a88c7616383874857b87a (patch)
tree902f51155fad7e00c6bac56bc09736bfbbfea1e7
parent7b239f40cb4809b63e930522ab37b060536ab2e4 (diff)
tests/power_test: also match stderr, not only stdout
-rw-r--r--tests/power/Makefile.am2
-rw-r--r--tests/power/power_test.c4
-rw-r--r--tests/power/power_test.err23
-rw-r--r--tests/testsuite.at3
4 files changed, 30 insertions, 2 deletions
diff --git a/tests/power/Makefile.am b/tests/power/Makefile.am
index ac45f238..de83760d 100644
--- a/tests/power/Makefile.am
+++ b/tests/power/Makefile.am
@@ -3,7 +3,7 @@ AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOCODEC_CFLAGS) $(LIBOSMOGSM_CFLA
LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOCODEC_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) $(LIBOSMOTRAU_LIBS)
noinst_PROGRAMS = power_test
-EXTRA_DIST = power_test.ok
+EXTRA_DIST = power_test.ok power_test.err
power_test_SOURCES = power_test.c $(srcdir)/../stubs.c
power_test_LDADD = $(top_builddir)/src/common/libbts.a $(LIBOSMOABIS_LIBS) $(LDADD)
diff --git a/tests/power/power_test.c b/tests/power/power_test.c
index 9b1a762b..6cc06a35 100644
--- a/tests/power/power_test.c
+++ b/tests/power/power_test.c
@@ -130,6 +130,10 @@ int main(int argc, char **argv)
msgb_talloc_ctx_init(tall_bts_ctx, 0);
osmo_init_logging2(tall_bts_ctx, &bts_log_info);
+ osmo_stderr_target->categories[DLOOP].loglevel = LOGL_DEBUG;
+ osmo_stderr_target->categories[DL1C].loglevel = LOGL_DEBUG;
+ log_set_print_filename(osmo_stderr_target, 0);
+ log_set_use_color(osmo_stderr_target, 0);
test_power_loop();
diff --git a/tests/power/power_test.err b/tests/power/power_test.err
new file mode 100644
index 00000000..4aa03749
--- /dev/null
+++ b/tests/power/power_test.err
@@ -0,0 +1,23 @@
+(null) Keeping MS power at control level 15, 0 dBm (rx-ms-pwr-lvl 15, max-ms-pwr-lvl 2, rx-current -60 dBm, rx-target -75 dBm)
+(null) Raising MS power from control level 15 (0 dBm) to 13, 4 dBm (rx-ms-pwr-lvl 15, max-ms-pwr-lvl 2, rx-current -90 dBm, rx-target -75 dBm)
+(null) Raising MS power from control level 13 (4 dBm) to 11, 8 dBm (rx-ms-pwr-lvl 13, max-ms-pwr-lvl 2, rx-current -90 dBm, rx-target -75 dBm)
+(null) Raising MS power from control level 11 (8 dBm) to 9, 12 dBm (rx-ms-pwr-lvl 11, max-ms-pwr-lvl 2, rx-current -90 dBm, rx-target -75 dBm)
+(null) Raising MS power from control level 9 (12 dBm) to 7, 16 dBm (rx-ms-pwr-lvl 9, max-ms-pwr-lvl 2, rx-current -90 dBm, rx-target -75 dBm)
+(null) Raising MS power from control level 7 (16 dBm) to 5, 20 dBm (rx-ms-pwr-lvl 7, max-ms-pwr-lvl 2, rx-current -90 dBm, rx-target -75 dBm)
+(null) Keeping MS power at control level 5, 20 dBm (rx-ms-pwr-lvl 5, max-ms-pwr-lvl 2, rx-current -75 dBm, rx-target -75 dBm)
+(null) Raising MS power from control level 5 (20 dBm) to 3, 24 dBm (rx-ms-pwr-lvl 5, max-ms-pwr-lvl 2, rx-current -90 dBm, rx-target -75 dBm)
+(null) Raising MS power from control level 3 (24 dBm) to 2, 26 dBm (rx-ms-pwr-lvl 3, max-ms-pwr-lvl 2, rx-current -90 dBm, rx-target -75 dBm)
+(null) Keeping MS power at control level 2, 26 dBm (rx-ms-pwr-lvl 2, max-ms-pwr-lvl 2, rx-current -90 dBm, rx-target -75 dBm)
+(null) Raising MS power from control level 2 (26 dBm) to 0, 30 dBm (rx-ms-pwr-lvl 2, max-ms-pwr-lvl 0, rx-current -90 dBm, rx-target -75 dBm)
+(null) Keeping MS power at control level 0, 30 dBm (rx-ms-pwr-lvl 0, max-ms-pwr-lvl 0, rx-current -90 dBm, rx-target -75 dBm)
+(null) Raising MS power from control level 0 (30 dBm) to 30, 34 dBm (rx-ms-pwr-lvl 0, max-ms-pwr-lvl 29, rx-current -90 dBm, rx-target -75 dBm)
+(null) Raising MS power from control level 30 (34 dBm) to 29, 36 dBm (rx-ms-pwr-lvl 30, max-ms-pwr-lvl 29, rx-current -90 dBm, rx-target -75 dBm)
+(null) Keeping MS power at control level 29, 36 dBm (rx-ms-pwr-lvl 29, max-ms-pwr-lvl 29, rx-current -90 dBm, rx-target -75 dBm)
+(null) Keeping MS power at control level 29, 36 dBm (rx-ms-pwr-lvl 29, max-ms-pwr-lvl 29, rx-current -75 dBm, rx-target -75 dBm)
+(null) Lowering MS power from control level 29 (36 dBm) to 1, 28 dBm (rx-ms-pwr-lvl 29, max-ms-pwr-lvl 29, rx-current -45 dBm, rx-target -75 dBm)
+(null) Lowering MS power from control level 1 (28 dBm) to 5, 20 dBm (rx-ms-pwr-lvl 1, max-ms-pwr-lvl 29, rx-current -45 dBm, rx-target -75 dBm)
+(null) Lowering MS power from control level 5 (20 dBm) to 9, 12 dBm (rx-ms-pwr-lvl 5, max-ms-pwr-lvl 29, rx-current -45 dBm, rx-target -75 dBm)
+(null) Lowering MS power from control level 9 (12 dBm) to 10, 10 dBm (rx-ms-pwr-lvl 9, max-ms-pwr-lvl 29, rx-current -73 dBm, rx-target -75 dBm)
+(null) Raising MS power from control level 10 (10 dBm) to 9, 12 dBm (rx-ms-pwr-lvl 10, max-ms-pwr-lvl 29, rx-current -77 dBm, rx-target -75 dBm)
+(null) Lowering MS power from control level 9 (12 dBm) to 14, 2 dBm (rx-ms-pwr-lvl 9, max-ms-pwr-lvl 14, rx-current -73 dBm, rx-target -75 dBm)
+(null) Lowering MS power from control level 14 (2 dBm) to 15, 0 dBm (rx-ms-pwr-lvl 14, max-ms-pwr-lvl 0, rx-current -40 dBm, rx-target -75 dBm)
diff --git a/tests/testsuite.at b/tests/testsuite.at
index d9bc1cee..e9d6e46e 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -34,7 +34,8 @@ AT_CLEANUP
AT_SETUP([power])
AT_KEYWORDS([power])
cat $abs_srcdir/power/power_test.ok > expout
-AT_CHECK([$abs_top_builddir/tests/power/power_test], [], [expout], [ignore])
+cat $abs_srcdir/power/power_test.err > experr
+AT_CHECK([$abs_top_builddir/tests/power/power_test], [], [expout], [experr])
AT_CLEANUP
AT_SETUP([tx_power])