Running the flang tests on an in-tree build

I did an in-tree build of mlir and flang. Specifically, I first created a “build” directory and then went into that directory and ran this command:

cmake -G Ninja …/llvm -DCMAKE_BUILD_TYPE=Release \




This seemed to go well. I then ran “ninja install” which also went well. Then I ran “ninja check-all”. This command produced some error messages, but it seemed to run all of the flang tests and put the results in the directory “build/tools/flang/test”. Unfortunately, though, the output did not include any summary information for the results of the flang tests. Also unfortunately, this command said that it ran 37,839 tests, and there are only about 350 flang tests.

I have two questions –

First, what command can I execute that will only run the flang tests?

Second, how do I get a summary of which tests pass and fail?


Hi Peter,

The command that you’re looking for to just run the flang unit tests is “ninja check-flang”; this should just run the flang tests and hopefully these will all pass!
When you run one of these targets it should tell you the lit command it’s running; if you add -v to this command then it should give you detailed output for failures.

Let me know if any of this doesn’t work!