[PATCH] D75337: [debuginfo-tests][dexter] Add _verify_options to TestToolBase

Pierre van Houtryve via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 2 09:30:08 PST 2020


Pierre-vh updated this revision to Diff 247663.
Pierre-vh marked an inline comment as done.
Pierre-vh added a comment.

Adding the full stop as requested

Note that I will not commit this patch unless one of the child diffs are committed and that this change is still needed (because this patch is not useful on its own)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75337/new/

https://reviews.llvm.org/D75337

Files:
  debuginfo-tests/dexter/dex/tools/TestToolBase.py


Index: debuginfo-tests/dexter/dex/tools/TestToolBase.py
===================================================================
--- debuginfo-tests/dexter/dex/tools/TestToolBase.py
+++ debuginfo-tests/dexter/dex/tools/TestToolBase.py
@@ -93,12 +93,20 @@
                     '<d>could not create directory</> <r>"{}"</> <y>({})</>'.
                     format(options.results_directory, e.strerror))
 
+    # Checks if the provided options are valid/supported by this tool
+    # if it return false, the tool fails.
+    def _verify_options(self, options) -> bool:
+        return True
+
     def go(self) -> ReturnCode:  # noqa
         options = self.context.options
 
         options.executable = os.path.join(
             self.context.working_directory.path, 'tmp.exe')
 
+        if not self._verify_options(options):
+            return ReturnCode.FAIL
+
         if os.path.isdir(options.test_path):
 
             subdirs = sorted([


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75337.247663.patch
Type: text/x-patch
Size: 940 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200302/3d395ebf/attachment.bin>


More information about the llvm-commits mailing list