JDevlieghere created this revision.
Herald added a project: All.
JDevlieghere requested review of this revision.

Remove default argument from lldbtest.getBuildArtifact.


https://reviews.llvm.org/D127336

Files:
  lldb/packages/Python/lldbsuite/test/lldbtest.py
  lldb/test/API/functionalities/gdb_remote_client/TestPlatformKill.py
  lldb/test/API/iohandler/sigint/TestProcessIOHandlerInterrupt.py
  lldb/test/API/lang/cpp/class_types/TestClassTypes.py
  lldb/test/API/macosx/simulator/TestSimulatorPlatform.py
  lldb/test/API/qemu/TestQemuLaunch.py

Index: lldb/test/API/qemu/TestQemuLaunch.py
===================================================================
--- lldb/test/API/qemu/TestQemuLaunch.py
+++ lldb/test/API/qemu/TestQemuLaunch.py
@@ -45,7 +45,7 @@
 
     def _create_target(self):
         self.build()
-        exe = self.getBuildArtifact()
+        exe = self.getBuildArtifact("a.out")
 
         # Create a target using our platform
         error = lldb.SBError()
@@ -78,7 +78,7 @@
     def test_basic_launch(self):
         state = self._run_and_get_state()
 
-        self.assertEqual(state["program"], self.getBuildArtifact())
+        self.assertEqual(state["program"], self.getBuildArtifact("a.out"))
         self.assertEqual(state["args"],
                 ["dump:" + self.getBuildArtifact("state.log")])
 
@@ -118,7 +118,7 @@
 
     def test_stdio_redirect(self):
         self.build()
-        exe = self.getBuildArtifact()
+        exe = self.getBuildArtifact("a.out")
 
         # Create a target using our platform
         error = lldb.SBError()
@@ -168,7 +168,7 @@
         self.addTearDownHook(cleanup)
         state = self._run_and_get_state()
 
-        self.assertEqual(state["program"], self.getBuildArtifact())
+        self.assertEqual(state["program"], self.getBuildArtifact("a.out"))
         self.assertEqual(state["args"],
                 ["dump:" + self.getBuildArtifact("state.log")])
 
@@ -247,7 +247,7 @@
         self.runCmd("settings set target.arg0 ARG0")
         state = self._run_and_get_state(target)
 
-        self.assertEqual(state["program"], self.getBuildArtifact())
+        self.assertEqual(state["program"], self.getBuildArtifact("a.out"))
         self.assertEqual(state["0"], "ARG0")
 
     def test_sysroot(self):
Index: lldb/test/API/macosx/simulator/TestSimulatorPlatform.py
===================================================================
--- lldb/test/API/macosx/simulator/TestSimulatorPlatform.py
+++ lldb/test/API/macosx/simulator/TestSimulatorPlatform.py
@@ -14,7 +14,7 @@
     def check_load_commands(self, expected_load_command):
         """sanity check the built binary for the expected number of load commands"""
         load_cmds = subprocess.check_output(
-            ['otool', '-l', self.getBuildArtifact()]
+            ['otool', '-l', self.getBuildArtifact("a.out")]
         ).decode("utf-8")
         found = 0
         for line in load_cmds.split('\n'):
Index: lldb/test/API/lang/cpp/class_types/TestClassTypes.py
===================================================================
--- lldb/test/API/lang/cpp/class_types/TestClassTypes.py
+++ lldb/test/API/lang/cpp/class_types/TestClassTypes.py
@@ -69,7 +69,7 @@
         fsDir = os.path.normpath(filespec.GetDirectory())
         fsFile = filespec.GetFilename()
 
-        self.assertTrue(fsDir == os.path.dirname(self.getBuildArtifact())
+        self.assertTrue(fsDir == os.path.dirname(self.getBuildArtifact("a.out"))
                         and fsFile == "a.out",
                         "FileSpec matches the executable")
 
@@ -184,7 +184,7 @@
         fsDir = os.path.normpath(filespec.GetDirectory())
         fsFile = filespec.GetFilename()
 
-        self.assertTrue(fsDir == os.path.dirname(self.getBuildArtifact())
+        self.assertTrue(fsDir == os.path.dirname(self.getBuildArtifact("a.out"))
                         and fsFile == "a.out",
                         "FileSpec matches the executable")
 
Index: lldb/test/API/iohandler/sigint/TestProcessIOHandlerInterrupt.py
===================================================================
--- lldb/test/API/iohandler/sigint/TestProcessIOHandlerInterrupt.py
+++ lldb/test/API/iohandler/sigint/TestProcessIOHandlerInterrupt.py
@@ -17,7 +17,7 @@
     @skipIf(oslist=["linux"], archs=["arm", "aarch64"])
     def test(self):
         self.build(dictionary={"CXX_SOURCES":"cat.cpp"})
-        self.launch(executable=self.getBuildArtifact())
+        self.launch(executable=self.getBuildArtifact("a.out"))
 
         self.child.sendline("process launch")
         self.child.expect("Process .* launched")
Index: lldb/test/API/functionalities/gdb_remote_client/TestPlatformKill.py
===================================================================
--- lldb/test/API/functionalities/gdb_remote_client/TestPlatformKill.py
+++ lldb/test/API/functionalities/gdb_remote_client/TestPlatformKill.py
@@ -15,7 +15,7 @@
         """Test connecting to a remote linux platform"""
 
         self.build(dictionary={"CXX_SOURCES":"sleep.cpp"})
-        host_process = self.spawnSubprocess(self.getBuildArtifact())
+        host_process = self.spawnSubprocess(self.getBuildArtifact("a.out"))
 
         # Create a fake remote process with the same PID as host_process
         class MyResponder(MockGDBServerResponder):
Index: lldb/packages/Python/lldbsuite/test/lldbtest.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -701,7 +701,7 @@
             shutil.rmtree(bdir)
         lldbutil.mkdir_p(bdir)
 
-    def getBuildArtifact(self, name="a.out"):
+    def getBuildArtifact(self):
         """Return absolute path to an artifact in the test's build directory."""
         return os.path.join(self.getBuildDir(), name)
 
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to