Skip to content

Commit

Permalink
File may not exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
rjust committed Sep 6, 2024
1 parent d71ecd6 commit 46b2453
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions framework/util/get_failing_tests.pl
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,11 @@ =head1 DESCRIPTION
my $rev_id = $project->lookup($vid);
my $out_file = "$PROJECTS_DIR/$PID/failing_tests/$rev_id";

# Remove existing file, which would otherwise result in some tests being
# excluded during checkout.
Utils::exec_cmd("mv $out_file $out_file.bak", "Remove failing-tests file") or die "Cannot remove existing file";
if (-e $out_file) {
# Remove existing file, which would otherwise result in some tests being
# excluded during checkout.
Utils::exec_cmd("mv $out_file $out_file.bak", "Remove failing-tests file") or die "Cannot remove existing file";
}
$project->checkout_vid($vid) or die "Could not checkout ${vid}";
$project->compile() or die "Could not compile";
$project->compile_tests() or die "Could not compile tests";
Expand Down

0 comments on commit 46b2453

Please sign in to comment.