dexonsmith added inline comments.

================
Comment at: clang/test/ClangScanDeps/relative_directory.cpp:12-13
+
+// The output order is non-deterministic when using more than one thread,
+// so check the output using two runs.
+// RUN: clang-scan-deps -compilation-database %t.cdb -j 2 | FileCheck 
--check-prefix=CHECK1 %s
----------------
saudi wrote:
> dexonsmith wrote:
> > Can you use `CHECK-DAG` for this?
> > https://www.llvm.org/docs/CommandGuide/FileCheck.html#the-check-dag-directive
> If I understand correctly from the doc, it would lose the order (CHECK1, 
> CHECK1-NEXT).
> We need 2 blocks of 3 lines to be present, but only the blocks can be in any 
> order.
> 
> I did this mimicking what is done in other tests like regular_cdb.cpp.
> 
> If I understand correctly from the doc, it would lose the order (CHECK1, 
> CHECK1-NEXT).
We need 2 blocks of 3 lines to be present, but only the blocks can be in any 
order.

That's correct, but I think it's safe to assume in this test that the general 
format of the output is correct. Best would be to add a `CHECK-DAG-NEXT:` 
feature to FileCheck but that seems above and beyond for fixing this bug.

> I did this mimicking what is done in other tests like regular_cdb.cpp.

Sure, it's probably fine either way, and it might be better to match the other 
tests.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91204/new/

https://reviews.llvm.org/D91204

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to