[PATCH] D17180: Fix failing python bindings test

Jonathan B Coe via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 11 17:59:33 PST 2016


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']):


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17180.47758.patch
Type: text/x-patch
Size: 1223 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160212/ec3f07dd/attachment.bin>


More information about the cfe-commits mailing list