With the new file storage scheme the Step directories only contain generated files and thus they can all be deleted.
Signed-off-by: Francois Gouget fgouget@codeweavers.com ---
Restarting an old job that still uses the old scheme will delete the input file, thus breaking that job. However the restart button is currently only available on three jobs, two where only the administrator can trigger it (39025 and 39003), and one job which is already broken (39001, I attribute this one to a temporary insanity episode of the TestBot, it's a multiple modules test patch).
testbot/lib/WineTestBot/Jobs.pm | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/testbot/lib/WineTestBot/Jobs.pm b/testbot/lib/WineTestBot/Jobs.pm index 3fd78aaa2..b3512e1f2 100644 --- a/testbot/lib/WineTestBot/Jobs.pm +++ b/testbot/lib/WineTestBot/Jobs.pm @@ -352,7 +352,6 @@ sub Restart($) return "This job is already " . $self->Status; }
- my $FirstStep = 1; my $Steps = $self->Steps; my @SortedSteps = sort { $a->No <=> $b->No } @{$Steps->GetItems()}; foreach my $Step (@SortedSteps) @@ -360,21 +359,13 @@ sub Restart($) my $Tasks = $Step->Tasks; foreach my $Task (@{$Tasks->GetItems()}) { - if ($FirstStep) - { - # The first step contains the patch or test executable - # so only delete its task folders - $Task->RmTree(); - } $Task->Status("queued"); $Task->Started(undef); $Task->Ended(undef); $Task->TestFailures(undef); } - # Subsequent steps only contain files generated by the previous steps - $Step->RmTree() if (!$FirstStep); - $FirstStep = undef; $Step->Status("queued"); + $Step->RmTree(); } $self->Status("queued"); $self->Submitted(time);