[PATCH] D86089: [flang][driver]Add experimental flang driver and frontend with help screen

Richard Barton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 21 10:34:26 PDT 2020


richard.barton.arm added inline comments.


================
Comment at: flang/test/lit.cfg.py:40
+# exclude the tests for flang_new driver while there are two drivers
+if config.include_flang_new_driver_test == "OFF":
+  config.excludes = ['Inputs', 'CMakeLists.txt', 'README.txt', 'LICENSE.txt', 'Flang-Driver']
----------------
richard.barton.arm wrote:
> I think it would be cleaner to define config.excludes unconditionally then append the Flang-Driver dir if our condition passes.
I _think_ the pattern to follow to exclude tests for something you haven't built is to use lit features.

So you would add a feature like:
`config.available_features.add("new-driver")`

then each test that only works on the new driver would be prefixed with a statement:

`REQUIRES: new-driver`

This means that the tests can go in the test/Driver directory and you don't need to create a new directory for these tests or this hack. The additional benefit would be that all the existing tests for the throwaway driver can be re-used on the new Driver to test it. There are not many of those though and we are using a different driver name so they can't be shared either. Still think it would be a worthwhile thing to do because when looking at the test itself it is clear why it is not being run whereas with this hack it is hidden away.

 Sorry for not thinking this first time around.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86089



More information about the cfe-commits mailing list