Revision 8ff1cbef5fdfd753d85c90a5c5b9c57f4936cdc0 authored by Ian Ferguson on 04 April 2013, 22:41:58 UTC, committed by Scott Smith on 05 April 2013, 15:02:59 UTC
Removed default reference sequence parameters from GMT/Varscan/CopyNumberParallel, CopySegmentParallel, QuickReadcounts, Readcounts, Somatic, SomaticParallel, SomaticParallelFilter, and SomaticParallelMerge. If the reference sequence was marked as is_optional => 1 in those classes, it is now marked as is_optional => 0. Changed the reference sequence parameters to is_optional => 0 in Consensus, NormalizeCopySegments, and SomaticMt (they had recently had their default reference sequence removed). Also reformatted class definitions for all modules under GMT/Varscan (added line breaks and fixed indentation for better consistency and readability).
1 parent c11ace8
compile_modules.t
use strict;
use warnings;
use above "Genome";
use Genome::Utility::Test qw(run_ok);
use Test::Builder;
use Test::More;
use File::Spec qw();
use IPC::Cmd qw(can_run);
use IPC::System::Simple qw(capture);
my $start_point = resolve_start_point();
my @files_to_compile = files_to_compile($start_point);;
plan tests => scalar(@files_to_compile) + 1;
ok(1); # need a test for when @files_to_compile == 0
for my $file (@files_to_compile) {
my $pid = fork();
if (!defined $pid) {
die 'failed to fork';
} elsif ($pid) {
waitpid $pid, 0;
my $rel_path = File::Spec->abs2rel($file);
ok($? == 0, qq(compiled '$rel_path'));
} else {
my $exit = compile_file($file);
exit($exit);
}
}
sub compile_file {
my $file = shift;
my @output = qx(perl -c "$file" 2>&1);
my $exit = $? >> 8;
if ($exit != 0) {
diag @output;
}
return $exit;
}
sub is_perl_file {
my $file = shift;
return ($file =~ /\.(pm|t|pl)$/ && -f $file);
}
sub resolve_start_point {
my $start_point_arg = (shift @ARGV) || '';
if ($start_point_arg) {
return $start_point_arg;
}
if ($ENV{JENKINS_STABLE_REVISION}) {
return $ENV{JENKINS_STABLE_REVISION};
}
return '@{u}';
}
sub files_to_compile {
my $start_point = shift;
my @files;
my $git_dir = capture('git', 'rev-parse', '--show-toplevel');
chomp $git_dir;
my @cmd = ('git', 'diff', '--name-only', $start_point);
@files = capture(@cmd);
chomp @files;
@files = map { File::Spec->join($git_dir, $_) } @files;
@files = grep { is_perl_file $_ } @files;
return @files;
}
Computing file changes ...