aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/testing_commands.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/testing_commands.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/testing_commands.py')
-rw-r--r--python/servo/testing_commands.py28
1 files changed, 27 insertions, 1 deletions
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py
index 96dfd789bed..fba90a17994 100644
--- a/python/servo/testing_commands.py
+++ b/python/servo/testing_commands.py
@@ -25,7 +25,7 @@ from mach.decorators import (
Command,
)
-from servo.command_base import CommandBase, call, cd, check_call, host_triple
+from servo.command_base import BuildNotFound, CommandBase, call, cd, check_call, find_dep_path_newest, host_triple
from wptrunner import wptcommandline
from update import updatecommandline
from servo_tidy import tidy
@@ -413,6 +413,32 @@ class MachCommands(CommandBase):
# Helper for test_css and test_wpt:
def wptrunner(self, run_file, **kwargs):
+ # On Linux and mac, find the OSMesa software rendering library and
+ # add it to the dynamic linker search path.
+ if sys.platform.startswith('linux'):
+ try:
+ args = [self.get_binary_path(True, False)]
+ osmesa_path = path.join(find_dep_path_newest('osmesa-src', args[0]), "out", "lib", "gallium")
+ os.environ["LD_LIBRARY_PATH"] = osmesa_path
+ os.environ["GALLIUM_DRIVER"] = "softpipe"
+ except BuildNotFound:
+ # This can occur when cross compiling (e.g. arm64), in which case
+ # we won't run the tests anyway so can safely ignore this step.
+ pass
+ if sys.platform.startswith('darwin'):
+ try:
+ args = [self.get_binary_path(True, False)]
+ osmesa_path = path.join(find_dep_path_newest('osmesa-src', args[0]),
+ "out", "src", "gallium", "targets", "osmesa", ".libs")
+ glapi_path = path.join(find_dep_path_newest('osmesa-src', args[0]),
+ "out", "src", "mapi", "shared-glapi", ".libs")
+ os.environ["DYLD_LIBRARY_PATH"] = osmesa_path + ":" + glapi_path
+ os.environ["GALLIUM_DRIVER"] = "softpipe"
+ except BuildNotFound:
+ # This can occur when cross compiling (e.g. arm64), in which case
+ # we won't run the tests anyway so can safely ignore this step.
+ pass
+
os.environ["RUST_BACKTRACE"] = "1"
kwargs["debug"] = not kwargs["release"]
if kwargs.pop("chaos"):