Revision: 23012
Author:   [email protected]
Date:     Sat Aug  9 08:31:01 2014 UTC
Log:      Fix v8 landmines script.

Currently, some builders are in a clobber-landmine loop.

Clobber deletes the .landmines tracker (sigh). Difficult to
know if we are right after a clobber or if it is first-time
landmines deployment. Also, a landmine-triggered clobber
right after a clobber is not possible. Different clobber
methods for msvs, xcode and make all have different
blacklists of files that are not deleted.

After the branch point, all v8 branch builders have to be
manually clobbered, because the appearance of the
landmines.py script and the first landmine request are in
the same branch CL.

[email protected]

Review URL: https://codereview.chromium.org/457063002
http://code.google.com/p/v8/source/detail?r=23012

Modified:
 /branches/bleeding_edge/build/landmines.py
 /branches/bleeding_edge/tools/run-tests.py

=======================================
--- /branches/bleeding_edge/build/landmines.py  Fri Aug  8 14:51:16 2014 UTC
+++ /branches/bleeding_edge/build/landmines.py  Sat Aug  9 08:31:01 2014 UTC
@@ -61,30 +61,30 @@
   if not os.path.exists(landmines_path):
     print "Landmines tracker didn't exists."

-  # Make sure the landmines tracker exists.
-  open(landmines_path, 'a').close()
-
-  triggered = os.path.join(out_dir, '.landmines_triggered')
-  with open(landmines_path, 'r') as f:
-    old_landmines = f.readlines()
-  if old_landmines != new_landmines:
-    old_date = time.ctime(os.stat(landmines_path).st_ctime)
-    diff = difflib.unified_diff(old_landmines, new_landmines,
-        fromfile='old_landmines', tofile='new_landmines',
-        fromfiledate=old_date, tofiledate=time.ctime(), n=0)
+  # FIXME(machenbach): Clobber deletes the .landmines tracker. Difficult
+ # to know if we are right after a clobber or if it is first-time landmines
+  # deployment. Also, a landmine-triggered clobber right after a clobber is
+  # not possible. Different clobber methods for msvs, xcode and make all
+  # have different blacklists of files that are not deleted.
+  if os.path.exists(landmines_path):
+    triggered = os.path.join(out_dir, '.landmines_triggered')
+    with open(landmines_path, 'r') as f:
+      old_landmines = f.readlines()
+    if old_landmines != new_landmines:
+      old_date = time.ctime(os.stat(landmines_path).st_ctime)
+      diff = difflib.unified_diff(old_landmines, new_landmines,
+          fromfile='old_landmines', tofile='new_landmines',
+          fromfiledate=old_date, tofiledate=time.ctime(), n=0)

-    with open(triggered, 'w') as f:
-      f.writelines(diff)
-    print "Setting landmine: %s" % triggered
-  elif os.path.exists(triggered):
-    # Remove false triggered landmines.
-    os.remove(triggered)
-    print "Removing landmine: %s" % triggered
+      with open(triggered, 'w') as f:
+        f.writelines(diff)
+      print "Setting landmine: %s" % triggered
+    elif os.path.exists(triggered):
+      # Remove false triggered landmines.
+      os.remove(triggered)
+      print "Removing landmine: %s" % triggered
   with open(landmines_path, 'w') as f:
     f.writelines(new_landmines)
-  with open(landmines_path, 'r') as f:
-    print "Content of the landmines tracker:"
-    print f.read()


 def process_options():
=======================================
--- /branches/bleeding_edge/tools/run-tests.py  Fri Aug  8 18:33:58 2014 UTC
+++ /branches/bleeding_edge/tools/run-tests.py  Sat Aug  9 08:31:01 2014 UTC
@@ -267,14 +267,6 @@
     # Buildbots run presubmit tests as a separate step.
     options.no_presubmit = True
     options.no_network = True
-
-    # FIXME(machenbach): Temporary hack to debug landmines on buildbot.
-    # Hardcoded for make/ninja.
-    src_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
-    target_dir  = options.mode[0] if options.mode else 'Release'
-    out_dir = os.path.join(src_dir, 'out', target_dir, '.landmines')
-    if os.path.exists(out_dir):
-      print "[INFO] Landmines tracker exists."
   if options.command_prefix:
     print("Specifying --command-prefix disables network distribution, "
           "running tests locally.")

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to