> On 1 Dec 2019, at 23:46, Régis Décamps <re...@de...> wrote:
> but I haven’t figured out yet for instance how to get a list of all available test targets (or how to run them all).
>
> Usually I just run them all [... is recursive]
> bazel test //...
>
> Or just the integration tests [and you can pick the directory of your choice]
> bazel test //javatests/jflex/testcase/...
Thanks, that is what I was really looking for. Has already made life much easier. I should probably actually read the documentation ;-)
>
> There is also a query syntax which may be useful to understand the dependencies, and can be used to answer your first question (list all tests)
> bazel query 'kind(".*test rule", //...)'
>
> Speaking about the tests, I'm also migrating the test suite to bazel. After moving a few by hand, I made a tool to automate the process.
>
> In the process, I also make some cleanup, such as updating the sourceforge bug to a github bug number.
Very nice. The old testing framework has been around for quite a while, it’s good to move that forward a bit.
> Also, generally, I think the regression tests should be based on expected behavior rather than the content of System.out. For instance, the eofclose test can check whether the reader throws an exception rather than printing the exception and asserting that System.out contains this message.
Yes, I agree.
> I also wrote some small utility code. For instance, maybe we could offer the ScannerFactory in the main distribution. If offers utility methods to create a scanner from different inputs (kind of rolls back #195 Remove InputStream-param constructor in a more elegant way)
The question is how to distribute it without requiring a jflex runtime or the jflex jar at runtime. Every time I use CUP, I’m happy that we don’t do that. I guess we could just include it in the distribution and people can either copy it from there (it’s small enough) or decide to include it directly if they want to.
Cheers,
Gerwin
|