[PATCH] D16000: Add "/dev/console" as a special file name to lit

Dan Liew via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 22 17:09:46 PST 2016


delcypher added a comment.

@ygao I'm not really a fan of the way you've gone about this.

- There is no need to add a new command line flag for this.
- The "--enable-console" option doesn't have **any influence** on the code you added to `TestRunner.py` to write to the console which is misleading.

I don't think you should be modify lit in a special way for this "feature" you want to support. Instead it should be part of your test suite configuration. That way we aren't modifying lit (which supposed to be general purpose tool) for your specific use case.

For example you could have something like this in your `lit.cfg` file which will only add the "console" feature when passed the right parameter on the command line.

  runConsoleTests = int(lit_config.params.get('enable_console','0'))
  if runConsoleTests > 0:
    config.available_features.add('console')

so when invoking lit if you want the console feature you would run it like this

  $ lit --param enable_console=1 path/to/test/suite


http://reviews.llvm.org/D16000





More information about the llvm-commits mailing list