[Lldb-commits] [PATCH] D127258: [lldb] Parse the dotest output to determine the most appropriate result code

Dave Lee via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 7 18:39:17 PDT 2022


kastiglione added a comment.

> That means that if you have a test that has 3 passes and 4 skips, it will be reported as unsupported (while currently it's considered a pass).

My initial reaction to this is that I don't love it. I think N passes and M skips is a **pass**, even if M>N.



================
Comment at: lldb/test/API/lldbtest.py:94
+        result_regex = r"\((\d+) passes, (\d+) failures, (\d+) errors, (\d+) skipped, (\d+) expected failures, (\d+) unexpected successes\)"
+        results = re.search(result_regex, err)
 
----------------
previously `out` was also being searched, I take it that's not actually needed?


================
Comment at: lldb/test/API/lldbtest.py:118
+        # at the first element and rely on the sorting being stable for ties.
+        lit_results.sort(reverse=True, key=lambda tup: tup[0])
+        return lit_results[0][1], output
----------------
you could use `operator.itemgetter(0)` instead of the lambda.


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

https://reviews.llvm.org/D127258



More information about the lldb-commits mailing list