aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/command_base.py
diff options
context:
space:
mode:
authorGlenn Watson <github@intuitionlibrary.com>2016-09-23 08:39:16 +1000
committerGlenn Watson <github@intuitionlibrary.com>2016-09-28 11:57:33 +1000
commitcdb69d442317e5ba57d571913007ae258879afc1 (patch)
tree3894cf3fefa344ca0b60054f03bccaa1de280df6 /python/servo/command_base.py
parent06bb57bdcb7eb60ffe4058ced7301a5f285eede5 (diff)
downloadservo-cdb69d442317e5ba57d571913007ae258879afc1.tar.gz
servo-cdb69d442317e5ba57d571913007ae258879afc1.zip
Add OSMesa headless mode, run WPT against Webrender, update tests.
Diffstat (limited to 'python/servo/command_base.py')
-rw-r--r--python/servo/command_base.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py
index 7c4827f8b62..c6ea363dd05 100644
--- a/python/servo/command_base.py
+++ b/python/servo/command_base.py
@@ -7,6 +7,7 @@
# option. This file may not be copied, modified, or distributed
# except according to those terms.
+from glob import glob
import gzip
import itertools
import locale
@@ -47,6 +48,17 @@ def setlocale(name):
locale.setlocale(locale.LC_ALL, saved_locale)
+def find_dep_path_newest(package, bin_path):
+ deps_path = path.join(path.split(bin_path)[0], "build")
+ with cd(deps_path):
+ candidates = glob(package + '-*')
+ candidates = (path.join(deps_path, c) for c in candidates)
+ candidate_times = sorted(((path.getmtime(c), c) for c in candidates), reverse=True)
+ if len(candidate_times) > 0:
+ return candidate_times[0][1]
+ return None
+
+
def archive_deterministically(dir_to_archive, dest_archive, prepend_path=None):
"""Create a .tar.gz archive in a deterministic (reproducible) manner.