eclipse / omr

Eclipse OMR™ Cross platform components for building reliable, high performance language runtimes
http://www.eclipse.org/omr
Other
939 stars 394 forks source link

Figure out how to do platform specific testing and test-disablement in Tril #1843

Open mgaudet opened 6 years ago

mgaudet commented 6 years ago

Some test cases will be written that cannot be run on all platforms, intentionally, leading to a need to disable/enable test cases on a per platform basis.

One option is to guard them with #ifdef TR_TARGET macros, however, this is coarse choice, and doesn't help distinguish between

This discussion item is hoping to try to get some brainstorming on the right way to do this in the most productive fashion.

mgaudet commented 6 years ago

IMO, a lot of this needs to be done with a custom 'skip' patch to GoogleTest that aborts execution of a test case based on a predicate. Skips should then be reported based on categories:

TEST(Foo,Bar) { 
   SKIP(platform != x86-64, PLATFORM)
   ... 
}

TEST(Foo,Bar) { 
   SKIP(bits == 32, KNOWN_BUG)
   ... 
}

[==========] 6490 tests from 43 test cases ran. (6507 ms total)
[==========] 12 tests skipped: 8 PLATFORM 4 KNOWN_BUG
[  PASSED  ] 6490 tests.
Leonardo2718 commented 5 years ago

I have opened #3539 to introduce a basic SKIP_IF() macro. It is not nearly as sophisticated as what's discussed in this issue but I'm hoping it will enable further work by introducing some basic machinery for skipping a test.