[test suite] don't remove output/ directory in --list mode, closes #53
This commit is contained in:
parent
cccab3c22b
commit
57773993e4
@ -4574,38 +4574,40 @@ sub init() {
|
|||||||
chmod 0600, $cf{$name} or die "[*] Could not chmod 0600 $cf{$name}";
|
chmod 0600, $cf{$name} or die "[*] Could not chmod 0600 $cf{$name}";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (-d $output_dir) {
|
unless ($list_mode) {
|
||||||
if (-d "${output_dir}.last") {
|
if (-d $output_dir) {
|
||||||
rmtree "${output_dir}.last"
|
if (-d "${output_dir}.last") {
|
||||||
or die "[*] rmtree ${output_dir}.last $!";
|
rmtree "${output_dir}.last"
|
||||||
|
or die "[*] rmtree ${output_dir}.last $!";
|
||||||
|
}
|
||||||
|
move $output_dir, "${output_dir}.last" or die $!;
|
||||||
|
if (-e "$output_dir/init") {
|
||||||
|
copy "$output_dir/init", "${output_dir}.last/init";
|
||||||
|
}
|
||||||
|
if (-e $logfile) {
|
||||||
|
copy $logfile, "${output_dir}.last/$logfile" or die $!;
|
||||||
|
}
|
||||||
|
$saved_last_results = 1;
|
||||||
|
} else {
|
||||||
|
mkdir $output_dir or die "[*] Could not mkdir $output_dir: $!";
|
||||||
}
|
}
|
||||||
move $output_dir, "${output_dir}.last" or die $!;
|
|
||||||
if (-e "$output_dir/init") {
|
if (-d $run_dir) {
|
||||||
copy "$output_dir/init", "${output_dir}.last/init";
|
rmtree $run_dir or die $!;
|
||||||
}
|
}
|
||||||
if (-e $logfile) {
|
mkdir $run_dir or die "[*] Could not mkdir $run_dir: $!";
|
||||||
copy $logfile, "${output_dir}.last/$logfile" or die $!;
|
|
||||||
|
for my $dir ($output_dir, $run_dir) {
|
||||||
|
next if -d $dir;
|
||||||
|
mkdir $dir or die "[*] Could not mkdir $dir: $!";
|
||||||
}
|
}
|
||||||
$saved_last_results = 1;
|
|
||||||
} else {
|
|
||||||
mkdir $output_dir or die "[*] Could not mkdir $output_dir: $!";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (-d $run_dir) {
|
for my $file (glob("$output_dir/*.test"), "$output_dir/init",
|
||||||
rmtree $run_dir or die $!;
|
$tmp_rc_file, $tmp_pkt_file, $tmp_args_file,
|
||||||
}
|
$logfile, $key_gen_file) {
|
||||||
mkdir $run_dir or die "[*] Could not mkdir $run_dir: $!";
|
next unless -e $file;
|
||||||
|
unlink $file or die "[*] Could not unlink($file)";
|
||||||
for my $dir ($output_dir, $run_dir) {
|
}
|
||||||
next if -d $dir;
|
|
||||||
mkdir $dir or die "[*] Could not mkdir $dir: $!";
|
|
||||||
}
|
|
||||||
|
|
||||||
for my $file (glob("$output_dir/*.test"), "$output_dir/init",
|
|
||||||
$tmp_rc_file, $tmp_pkt_file, $tmp_args_file,
|
|
||||||
$logfile, $key_gen_file) {
|
|
||||||
next unless -e $file;
|
|
||||||
unlink $file or die "[*] Could not unlink($file)";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($test_include) {
|
if ($test_include) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user