RFR: JDK-8239860 Add support for testing the configure script

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Mon Feb 24 13:15:54 UTC 2020


We've been sorely lacking a way to test the configure script, leading to 
just pre-checkin adhoc testing.

Here is a simple framework for running unit tests of functions in our 
configure script. The initial tests included are more to be considered 
placeholders.

I put the assert function in util.m4 and not test.m4, since I think it 
can be useful to add asserts not only in test code. I presume this 
simple assert function will grow into a family as the need to assert 
other things than string equality arises.

test-configure.sh is essentially a stripped-down version of the main 
make/autoconf/configure script. I've used the custom extension mechanism 
to hook in the unit testing framework in configure.ac.

Bug: https://bugs.openjdk.java.net/browse/JDK-8239860
WebRev: 
http://cr.openjdk.java.net/~ihse/JDK-8239860-add-testing-of-configure/webrev.01

/Magnus



More information about the build-dev mailing list