@@ -90,6 +90,7 @@ Building Options:
90
90
--build-arg Specify an additional argument for the ant build
91
91
--bc-arg Specify arguments for the bootimage compiler
92
92
--checkstyle Perform source code style checks.
93
+ --test-image Run unit tests on the built RVM image and fail the build if the tests fail
93
94
-p, --profile Perform a profiled build (including creation of a profile)
94
95
--comp-cache-dir Specify a cache location for component downloads
95
96
--clear-cc Clear out the component caches
@@ -145,6 +146,7 @@ GetOptions(
145
146
" nuke" => \$nuke ,
146
147
" c|cross-to=s" => \$target ,
147
148
" checkstyle" => \$checkstyle ,
149
+ " test-image" => \$test_image ,
148
150
" p|profile" => \$profile ,
149
151
" u|user=s" => \$cmd_user ,
150
152
" build-user=s" => \$cmd_hostUser ,
@@ -438,13 +440,26 @@ if ($test_list ne "") {
438
440
#
439
441
# Configuration
440
442
#
443
+
444
+ # Read out test-run properties that affect the build config (e.g. for checkstyle and
445
+ # unit tests on the images) and add them to the build arguments.
446
+ #
447
+ # Those properties would be ignored otherwise because buildit always skips builds in test-runs.
441
448
if ($test_set && !$checkstyle ) {
442
449
$checkstyle = ` grep ^require.checkstyle=true\$ $localRoot /build/test-runs/$test_set .properties` ;
443
450
chomp ($checkstyle );
444
451
if ($checkstyle ne " " ) {
445
452
$checkstyle = 1;
446
453
}
447
454
}
455
+ if ($test_set && !$test_image ) {
456
+ $test_image = ` grep ^require.rvm-unit-tests=true\$ $localRoot /build/test-runs/$test_set .properties` ;
457
+ chomp ($test_image );
458
+ if ($test_image ne " " ) {
459
+ $test_image = 1;
460
+ }
461
+ }
462
+
448
463
$implicitconfigs = ($#gcs == -1 && $compiler eq " " );
449
464
if ($#gcs == -1 && $test_set && $compiler eq " " ) {
450
465
my $rawconfigs = ` grep \" ^test.configs=.*$\ " $localRoot /build/test-runs/$test_set .properties` ;
@@ -653,7 +668,10 @@ if ($ok) {
653
668
}
654
669
if ($checkstyle ne " " ) {
655
670
$defs .= " -Drequire.checkstyle=true " ;
656
- }
671
+ }
672
+ if ($test_image ne " " ) {
673
+ $defs .= " -Drequire.rvm-unit-tests=true " ;
674
+ }
657
675
if ($x87 ne " " ) {
658
676
$defs .= " -Dtarget.arch.sse2=none " ;
659
677
}
0 commit comments