~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to runall.pl

simple way to generate lcov genhtml reports from runall.pl

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
    $redefine_file, $seed, $mask, $mask_level, $mem, $rows,
58
58
    $varchar_len, $xml_output, $valgrind, $views, $start_dirty,
59
59
    $filter, $build_thread, $testname, $report_xml_tt, $report_xml_tt_type,
60
 
    $report_xml_tt_dest, $notnull, $sqltrace);
 
60
    $report_xml_tt_dest, $notnull, $sqltrace, $lcov);
61
61
 
62
62
my $threads = my $default_threads = 10;
63
63
my $queries = my $default_queries = 1000;
104
104
        'start-dirty'   => \$start_dirty,
105
105
        'filter=s'      => \$filter,
106
106
    'mtr-build-thread=i' => \$build_thread,
107
 
    'testname=s' => \$testname
 
107
    'testname=s' => \$testname,
 
108
        'lcov' => \$lcov
108
109
);
109
110
 
110
111
$ENV{RQG_DEBUG} = 1 if defined $debug;
199
200
 
200
201
my $cwd = cwd();
201
202
 
 
203
if ($lcov) {
 
204
        unlink(tmpdir()."/lcov-rqg.info");
 
205
        system("lcov --directory $basedirs[0] --zerocounters");
 
206
}
 
207
 
202
208
#
203
209
# Start servers. Use rpl_alter if replication is needed.
204
210
#
233
239
        push @mtr_options, "--mysqld=--master-retry-count=65535";
234
240
 
235
241
        push @mtr_options, "--start-dirty" if defined $start_dirty;
236
 
#       push @mtr_options, "--gcov";
 
242
        push @mtr_options, "--gcov" if $lcov;
237
243
 
238
244
        if (($rpl_mode ne '') && ($server_id != 0)) {
239
245
                # If we are running in replication, and we start the slave separately (because it is a different binary)
369
375
 
370
376
my $gentest_result = system("perl $ENV{RQG_HOME}gentest.pl ".join(' ', @gentest_options)) >> 8;
371
377
say("gentest.pl exited with exit status ".status2text($gentest_result). " ($gentest_result)");
 
378
 
 
379
if ($lcov) {
 
380
        say("Trying to generate a genhtml lcov report in ".tmpdir()."/rqg-lcov-$$ ...");
 
381
        system("lcov --quiet --directory $basedirs[0] --capture --output-file ".tmpdir()."/lcov-rqg.info");
 
382
        system("genhtml --quiet --no-sort --output-directory=".tmpdir()."/rqg-lcov-$$ ".tmpdir()."/lcov-rqg.info");
 
383
        say("genhtml lcov report may have been generated in ".tmpdir()."/rqg-lcov-$$ .");
 
384
 
 
385
}       
 
386
 
372
387
exit_test($gentest_result) if $gentest_result > 0;
373
388
 
374
389
if ($rpl_mode) {