Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

archive.php removes tests while not archiving #546

Closed
artursudnik opened this issue Dec 14, 2015 · 4 comments
Closed

archive.php removes tests while not archiving #546

artursudnik opened this issue Dec 14, 2015 · 4 comments

Comments

@artursudnik
Copy link

@artursudnik artursudnik commented Dec 14, 2015

I am still verifying this but it is alarming.

After 475d3c3 commit I lost many tests and archive directory does not contain them.

@artursudnik

This comment has been minimized.

Copy link
Author

@artursudnik artursudnik commented Dec 14, 2015

I confirm that on WPT instance created from AMI this also happens. Tests are removed by script without archiving them.

@artursudnik

This comment has been minimized.

Copy link
Author

@artursudnik artursudnik commented Dec 14, 2015

I am not sure but this is possible patch:

diff --git a/www/cli/archive.php b/www/cli/archive.php
index debad14..225cd39 100644
--- a/www/cli/archive.php
+++ b/www/cli/archive.php
@@ -225,8 +225,8 @@ function CheckTest($testPath, $id, $elapsedDays) {

   $delete = false;
   if (!is_file("$dir/$test/testinfo.ini") &&
-      !is_file("$dir/$test/testinfo.json.gz") &&
-      !is_file("$dir/$test/testinfo.json")) {
+      (!is_file("$dir/$test/testinfo.json.gz") ||
+      !is_file("$dir/$test/testinfo.json"))) {
       $delete = true;
   } else {
       $elapsed = TestLastAccessed($id);
@artursudnik artursudnik changed the title archive.php removes test while not archiving archive.php removes tests while not archiving Dec 14, 2015
@pmeenan pmeenan closed this in a6eae0b Dec 14, 2015
@pmeenan

This comment has been minimized.

Copy link
Contributor

@pmeenan pmeenan commented Dec 14, 2015

Argh, I'm not sure how I didn't catch that when I ran it but thank you for catching and reporting it (and super sorry for any tests you may have lost)

@artursudnik

This comment has been minimized.

Copy link
Author

@artursudnik artursudnik commented Dec 14, 2015

no problem :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.