Running the compiler-rt builtins unit tests

Hello all,
I’m unsure of how the tests located in compiler-rt/test/builtins/Unit are run. They’re not attached to the cmake check-all target, as mentioned in compiler-rt/test/CMakeLists.txt:10, and they have no lit test suite associated with them. There is a shell script called “test” in test/builtins/Unit, but it hasn’t been touched since 2010, and make reference to no longer existing directories.

Is there any place where these tests are documented, or buildbots that run them? Is the shell script actually unused?

Any help would be appreciated!
Erik

Hi Erik,

It's disappointing that the test driver doesn't take advantage of compiler-rt's cmake infrastructure. It looks like people have been hacking up test scripts to run the unit tests.

CC'ing Michal, who's been working on this recently, and who may know more.

vedant

W dniu 28.02.2017, wto o godzinie 15∶45 -0800, użytkownik Vedant Kumar
napisał:

Hi Erik,

It's disappointing that the test driver doesn't take advantage of compiler-rt's cmake infrastructure. It looks like people have been hacking up test scripts to run the unit tests.

CC'ing Michal, who's been working on this recently, and who may know more.

Our hacky code pretty much boils down to compiling all the .c files
(except for the few which do not contain unit tests) and running them.

Don't expect much. Most of the tests have little to no output (even on
error you just get exit status). A few may even fail depending on
the platform used since they aren't widely used.

The tests should be ported to lit/gtest one day but I hasn't been able
to find time to work on that.