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

Enable wrench tests to run on travis. #647

Closed
glennw opened this issue Dec 15, 2016 · 4 comments
Closed

Enable wrench tests to run on travis. #647

glennw opened this issue Dec 15, 2016 · 4 comments

Comments

@glennw
Copy link
Member

@glennw glennw commented Dec 15, 2016

We want to run some tests inside the WR repo on each commit, instead of when updating to Servo. To do this, we'll need OSMesa available on travis so that we have a GL3 compatible rasterizer.

This file contains the config that travis uses to test each commit https://github.com/servo/webrender/blob/master/.travis.yml#L13.

We have the OSMesa that we use to test Servo packaged up as a cargo dependency here - https://github.com/servo/osmesa-src.

To make this available to wrench, just add it as a dependency to the Cargo.toml for wrench. See https://github.com/servo/servo/blob/4eb653817f87e5fb47de34356f558eb76ecbca9f/ports/glutin/Cargo.toml#L27 for an example of how we do this in Servo.

This means that libOSMesa.so will be built as part of the process of building wrench.

Then, you need to find the location of the OSMesa library, and add it to the dynamic library path. We use python code via mach to do this for servo (see https://github.com/servo/servo/blob/75c869d508231a216413808d80d6e02dec3ced6c/python/servo/command_base.py#L216 and https://github.com/servo/servo/blob/75c869d508231a216413808d80d6e02dec3ced6c/python/servo/command_base.py#L51), but it should be possible to do with a bash script that travis can run.

With that done, it should be possible to edit the travis.yml file to set those environment variables and run wrench tests.

@glennw
Copy link
Member Author

@glennw glennw commented Dec 15, 2016

@glennw
Copy link
Member Author

@glennw glennw commented Dec 15, 2016

@jrmuizel I've pushed a WIP branch to #649.

On my local machine, I can use ./run_tests.sh and it will run wrench in an OSMesa headless context, wait one second, and then save the output to screenshot.png.

It's very hacky, but it should be a good start towards this task. I haven't tested it on mac - there might be a couple of issues with the run_tests.py file which sets the environment variables.

It probably needs some work to run correctly on travis (e.g. I haven't modified travis.yml to install LLVM or any other mesa dependencies yet).

@jrmuizel
Copy link
Contributor

@jrmuizel jrmuizel commented Dec 15, 2016

This branch should mostly work on travis. It does the llvm install and also builds glx so there's not a conflict with the system one.

https://github.com/jrmuizel/webrender/tree/wrench-osmesa

@jrmuizel
Copy link
Contributor

@jrmuizel jrmuizel commented Jan 16, 2017

This is happening now.

@jrmuizel jrmuizel closed this Jan 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.