diff options
Diffstat (limited to 'unittests/platformagnostictests.py')
-rw-r--r-- | unittests/platformagnostictests.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/unittests/platformagnostictests.py b/unittests/platformagnostictests.py index b5907a1..6e0951f 100644 --- a/unittests/platformagnostictests.py +++ b/unittests/platformagnostictests.py @@ -70,3 +70,16 @@ class PlatformAgnosticTests(BasePlatformTests): def test_python_dependency_without_pkgconfig(self): testdir = os.path.join(self.unit_test_dir, '102 python without pkgconfig') self.init(testdir, override_envvars={'PKG_CONFIG': 'notfound'}) + + def test_debug_function_outputs_to_meson_log(self): + testdir = os.path.join(self.unit_test_dir, '104 debug function') + log_msg = 'This is an example debug output, should only end up in debug log' + output = self.init(testdir) + + # Check if message is not printed to stdout while configuring + assert(log_msg not in output) + + # Check if message is written to the meson log + mesonlog = os.path.join(self.builddir, 'meson-logs/meson-log.txt') + with open(mesonlog, mode='r', encoding='utf-8') as file: + assert(log_msg in file.read()) |