Skip to content

Commit f853e1e

Browse files
committed
Modernize testcase
1 parent e7c38ef commit f853e1e

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

lldb/test/API/lang/swift/system_framework/TestSwiftSystemFramework.py

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22
from lldbsuite.test.decorators import *
33
import lldbsuite.test.lldbtest as lldbtest
44
import lldbsuite.test.lldbutil as lldbutil
5-
import os
65
import unittest2
76

8-
97
class TestSwiftSystemFramework(lldbtest.TestBase):
108

119
mydir = lldbtest.TestBase.compute_mydir(__file__)
10+
NO_DEBUG_INFO_TESTCASE = True
1211

1312
@swiftTest
1413
@skipIf(oslist=no_match(["macosx"]))
@@ -22,16 +21,7 @@ def test_system_framework(self):
2221
self.runCmd('log enable lldb types -f "%s"' % log)
2322
self.expect("settings set target.use-all-compiler-flags true")
2423
self.expect("expression -- 0")
25-
pos = 0
26-
neg = 0
27-
import io
28-
with open(log, "r", encoding='utf-8') as logfile:
29-
for line in logfile:
30-
if "-- rejecting framework path " in line:
31-
pos += 1
32-
elif ("reflection metadata" not in line) and \
33-
("/System/Library/Frameworks" in line):
34-
neg += 1
35-
36-
self.assertGreater(pos, 0, "sanity check failed")
37-
self.assertEqual(neg, 0, "found /System/Library/Frameworks in log")
24+
self.filecheck('platform shell cat "%s"' % log, __file__)
25+
# CHECK: SwiftASTContextForExpressions{{.*}}-- rejecting framework path
26+
# CHECK: SwiftASTContextForExpressions{{.*}}LogConfiguration()
27+
# CHECK-NOT: LogConfiguration(){{.*}}/System/Library/Frameworks

0 commit comments

Comments
 (0)