jbcoe created this revision. jbcoe added a reviewer: akyrtzi. jbcoe added a subscriber: cfe-commits. jbcoe set the repository for this revision to rL LLVM.
Order of compilation database commands has changed causing test failure. Reordering fixes the test `cindex.test_cdb.test_all_compilecommand`. Other Python bindings tests currently fail. I will address these in a later patch. Repository: rL LLVM http://reviews.llvm.org/D17180 Files: bindings/python/tests/cindex/test_cdb.py Index: bindings/python/tests/cindex/test_cdb.py =================================================================== --- bindings/python/tests/cindex/test_cdb.py +++ bindings/python/tests/cindex/test_cdb.py @@ -38,16 +38,17 @@ cmds = cdb.getAllCompileCommands() assert len(cmds) == 3 expected = [ + { 'wd': '/home/john.doe/MyProject', + 'line': ['clang++', '-o', 'project.o', '-c', + '/home/john.doe/MyProject/project.cpp']}, { 'wd': '/home/john.doe/MyProjectA', 'line': ['clang++', '-o', 'project2.o', '-c', '/home/john.doe/MyProject/project2.cpp']}, { 'wd': '/home/john.doe/MyProjectB', 'line': ['clang++', '-DFEATURE=1', '-o', 'project2-feature.o', '-c', - '/home/john.doe/MyProject/project2.cpp']}, - { 'wd': '/home/john.doe/MyProject', - 'line': ['clang++', '-o', 'project.o', '-c', - '/home/john.doe/MyProject/project.cpp']} + '/home/john.doe/MyProject/project2.cpp']} ] + for i in range(len(cmds)): assert cmds[i].directory == expected[i]['wd'] for arg, exp in zip(cmds[i].arguments, expected[i]['line']):
Index: bindings/python/tests/cindex/test_cdb.py =================================================================== --- bindings/python/tests/cindex/test_cdb.py +++ bindings/python/tests/cindex/test_cdb.py @@ -38,16 +38,17 @@ cmds = cdb.getAllCompileCommands() assert len(cmds) == 3 expected = [ + { 'wd': '/home/john.doe/MyProject', + 'line': ['clang++', '-o', 'project.o', '-c', + '/home/john.doe/MyProject/project.cpp']}, { 'wd': '/home/john.doe/MyProjectA', 'line': ['clang++', '-o', 'project2.o', '-c', '/home/john.doe/MyProject/project2.cpp']}, { 'wd': '/home/john.doe/MyProjectB', 'line': ['clang++', '-DFEATURE=1', '-o', 'project2-feature.o', '-c', - '/home/john.doe/MyProject/project2.cpp']}, - { 'wd': '/home/john.doe/MyProject', - 'line': ['clang++', '-o', 'project.o', '-c', - '/home/john.doe/MyProject/project.cpp']} + '/home/john.doe/MyProject/project2.cpp']} ] + for i in range(len(cmds)): assert cmds[i].directory == expected[i]['wd'] for arg, exp in zip(cmds[i].arguments, expected[i]['line']):
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits