Running the regression tests on an embedded device
Mike Mohr
akihana at gmail.com
Sat Dec 26 01:14:24 UTC 2015
Hello,
I'm interested in porting the full GMP test suite to Android and
implementing an Android application on top of it to run all tests and
report success/failure back up to the Dalvik VM. In order to do so, all
tests must be compiled into a shared object. To facilitate this test
suite, some changes must be made to the individual test programs:
1) All calls to exit and abort must be replaced with something else.
Probably the calls to exit(0) at the end of each test program would need to
be changed to "return 0;" and the calls to abort() would be replaced by
"return -1;".
2) The function name "main" would have to be replaced by something else,
probably something similar to the test name (i.e., "gmp_t_hightomask",
"gmp_t_bswap", etc).
3) Any test-specific data located in the source files would have to be
explicitly made static.
I believe that goals 1 and 2 could be accomplished using ifdefs or macros
so that the current behavior would remain the same when compiled for a
normal test run (backwards compatible to today's behavior). Goal 3 should
be a straightforward change that won't affect existing functionality.
The reason I'm writing this email is that I'd like to gauge the interest
amongst the GMP developers in someone doing such a port (not necessarily
any of them). If I were to do so, would the GMP developers be amenable to
receiving and applying a patch to the test suite? If so, is there any
preference as to how it should be done (macros vs ifdefs)? How about
function naming? Anything else?
I can certainly perform this work independently of the GMP development
team, but I'd prefer it if I had a way to contribute back, as a thank you
for all of the hard work you folks put into this library. Additionally, it
would make further enhancements to the test suite easier to port in the
future if this pattern were followed. I can do the work on one test
program at a time, awaiting code review, if that helps.
Merry Christmas,
Mike
More information about the gmp-discuss
mailing list