Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make test_symbols.py compare files line-by-line
We currently feed full files to Python's unified_diff. It's not quite what we want though - line-by-line comparison makes more sense (we want to be able to identify missing/unnecessary lines) and is also easier to parse for humans. This patch makes sure that we compare one line at a time. This change pretties up the output formatting in the script. Output before: ``` !DEF:/m/s/xINTENT(IN)(Implicit)ObjectEntityREAL(4) !DEF:/m/s/yINTENT(INOUT)(Implicit)ObjectEntityREAL(4) -!-D-E-F-:-f-o-o-b-a-r- puresubroutines(x,y)bind(c) !REF:/m/s/x intent(in)::x ``` Proposed output after: ``` !DEF:/m/s/xINTENT(IN)(Implicit)ObjectEntityREAL(4) !DEF:/m/s/yINTENT(INOUT)(Implicit)ObjectEntityREAL(4) -!DEF:foobar puresubroutines(x,y)bind(c) !REF:/m/s/x intent(in)::x ``` Reviewed By: Meinersbur, awarzynski Differential Revision: https://reviews.llvm.org/D107954
- Loading branch information