my $saved_last_results = 0;
my $diff_mode = 0;
my $enable_recompilation_warnings_check = 0;
+my $enable_make_distcheck = 0;
my $sudo_path = '';
my $platform = '';
my $help = 0;
'exclude=s' => \$test_exclude, ### synonym
'enable-recompile-check' => \$enable_recompilation_warnings_check,
'enable-ip-resolve' => \$enable_client_ip_resolve_test,
+ 'enable-distcheck' => \$enable_make_distcheck,
'List-mode' => \$list_mode,
'enable-valgrind' => \$use_valgrind,
'valgrind-path=s' => \$valgrindCmd,
'fatal' => $NO
},
{
+ 'category' => 'make distcheck',
+ 'detail' => 'ensure proper distribution creation',
+ 'err_msg' => 'could not create proper tarball',
+ 'function' => \&make_distcheck,
+ 'fatal' => $NO
+ },
+ {
'category' => 'build',
'subcategory' => 'client',
'detail' => 'binary exists',
return 1;
}
+sub make_distcheck() {
+
+ ### 'make clean' as root
+ return 0 unless &run_cmd('make -C .. distcheck',
+ $cmd_out_tmp, $current_test_file);
+
+ ### look for compilation warnings - something like:
+ ### warning: ‘test’ is used uninitialized in this function
+ return 1 if &file_find_regex([qr/archives\sready\sfor\sdistribution/],
+ $MATCH_ALL, $current_test_file);
+
+ return 0;
+}
+
+
sub binary_exists() {
my $test_hr = shift;
return 0 unless $test_hr->{'binary'};
push @tests_to_exclude, 'recompilation';
}
+ unless ($enable_make_distcheck) {
+ push @tests_to_exclude, 'distcheck';
+ }
+
unless ($enable_client_ip_resolve_test) {
push @tests_to_exclude, 'IP resolve';
}