[RISCV] Add RVVConstraint to SiFive custom matrix multiply instructions. (#124055)
[llvm-project.git] / lldb / test / API / test_utils / base / TestBaseTest.py
blob41ba481b9b74fea6de9d7a523ad2dc856abff403
1 """
2 Test TestBase test functions.
3 """
5 import io
7 from lldbsuite.test.lldbtest import *
8 from lldbsuite.test_event import build_exception
11 class TestBuildMethod(Base):
12 def setUp(self):
13 super().setUp()
14 self._traces = []
15 self.traceAlways = True
17 # override the parent trace method
18 def trace(self, *args, **kwargs):
19 buf = io.StringIO()
20 print(*args, file=buf, **kwargs)
21 self._traces.append(buf.getvalue())
23 def test_build_fails_helpfully(self):
24 try:
25 self.build(dictionary={"CXX_SOURCES": "nonexisting-file.cpp"})
26 except build_exception.BuildError as e:
27 self.assertIn("nonexisting-file.cpp", str(e))
28 else:
29 self.fail("BuildError not raised!")
31 def test_build_logs_traces(self):
32 self.build(dictionary={"CXX_SOURCES": "return0.cpp"})
33 self.assertIn("CXX_SOURCES", self._traces[0])
34 self.assertIn("return0.o", self._traces[1])