commit 557b684c39f27a8f886c7e90f5fb4ffd93dc1960 Author: David Malcolm dmalcolm@redhat.com Date: Thu Oct 6 12:23:01 2011 -0400
run-test-suite.py: remove exact numbers from declarations
Avoid baking-in exact IDs into "gold" outputs by generalizing certain numeric expressions before comparison.
This makes the test suite less dependent on exact GCC versions
run-test-suite.py | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) --- diff --git a/run-test-suite.py b/run-test-suite.py index ae7857e..e270903 100644 --- a/run-test-suite.py +++ b/run-test-suite.py @@ -91,6 +91,13 @@ class TestStream: line = re.sub(' object at (0x[0-9a-f]*)>', ' object at 0xdeadbeef>', line) + + # Remove exact numbers from declarations + # (e.g. from "D.12021->fieldA" to "D.nnnnn->fieldA"): + line = re.sub('D.([0-9]+)', 'D.nnnnn', line) + line = re.sub('VarDecl(([0-9]+))', 'VarDecl(nnnn)', line) + line = re.sub('LabelDecl(([0-9]+))', 'LabelDecl(nnnn)', line) + result += line + '\n' return result
gcc-python-plugin-commits@lists.stg.fedorahosted.org