]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
tests-extra: fix test location info in the case.log
authorDaniel Salzman <daniel.salzman@nic.cz>
Sat, 26 Sep 2020 07:10:20 +0000 (09:10 +0200)
committerDaniel Salzman <daniel.salzman@nic.cz>
Sat, 26 Sep 2020 07:10:20 +0000 (09:10 +0200)
tests-extra/tools/dnstest/utils.py

index d30c6aadab19de7d265b282560371d5d86c781a3..e5a30e251f02bdec3389f8d5d87be836962f35d5 100644 (file)
@@ -29,8 +29,9 @@ def test_info():
     info = ""
     frames = inspect.getouterframes(inspect.currentframe())
     for frame in frames:
-        if Context().test_dir == os.path.dirname(frame[1]):
-            info = "%s#%i" % (Context().test_dir, frame[2])
+        frame_dir = os.path.normpath(os.path.dirname(frame[1]))
+        if frame_dir in Context().test_dir:
+            info = "%s#%i" % (frame_dir, frame[2])
             break
     parts = info.split("/")