[PATCH] D146567: Assert in codesize.py that we have exactly one of size..text and size.__text
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 21 14:38:59 PDT 2023
paquette created this revision.
paquette added a reviewer: azharudd.
Herald added a project: All.
paquette requested review of this revision.
Make sure that we only get one of these possible output formats to prevent duplicate data later in LNT. Also makes it clearer what the valid outputs can be.
Repository:
rT test-suite
https://reviews.llvm.org/D146567
Files:
litsupport/modules/codesize.py
Index: litsupport/modules/codesize.py
===================================================================
--- litsupport/modules/codesize.py
+++ litsupport/modules/codesize.py
@@ -37,6 +37,12 @@
name = values[0]
val = int(values[1])
metrics['size.%s' % name] = val
+ # Darwin and GNU produce different output here. Check that
+ # we have exactly one of the valid outputs.
+ assert not ('size.__text' in metrics and
+ 'size..text' in metrics), """Both 'size.__text'
+ and 'size..text' present in metrics.
+ Only one of them should exist."""
except ValueError:
logging.info("Ignoring malformed output line: %s", line)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146567.507127.patch
Type: text/x-patch
Size: 869 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230321/8ee08b6e/attachment.bin>
More information about the llvm-commits
mailing list