Navigation Menu

Skip to content

Commit

Permalink
Move sanity checks to stylo tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Sep 20, 2016
1 parent c615a0d commit 1d49782
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions ports/geckolib/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ports/geckolib/Cargo.toml
Expand Up @@ -25,4 +25,4 @@ style_traits = {path = "../../components/style_traits"}
url = "1.2"

[dev-dependencies]
stylo_tests = {path = "../../tests/unit/stylo"}
stylo_tests = {path = "../../tests/unit/stylo"}
1 change: 0 additions & 1 deletion ports/geckolib/lib.rs
Expand Up @@ -22,7 +22,6 @@ mod snapshot;
mod snapshot_helpers;
#[allow(non_snake_case)]
pub mod glue;
mod sanity_checks;
mod traversal;
mod wrapper;

Expand Down
7 changes: 3 additions & 4 deletions python/servo/testing_commands.py
Expand Up @@ -208,6 +208,8 @@ def test_unit(self, test_name=None, package=None):
if not packages:
packages = set(os.listdir(path.join(self.context.topdir, "tests", "unit")))

packages.remove('stylo')

args = ["cargo", "test"]
for crate in packages:
args += ["-p", "%s_tests" % crate]
Expand Down Expand Up @@ -235,10 +237,7 @@ def test_unit(self, test_name=None, package=None):
@Command('test-stylo',
description='Run stylo unit tests',
category='testing')
def test_unit(self, test_name=None, package=None):
if test_name is None:
test_name = []

def test_stylo(self):
self.set_use_stable_rust()
self.ensure_bootstrapped()

Expand Down
1 change: 1 addition & 0 deletions tests/unit/stylo/Cargo.toml
Expand Up @@ -12,5 +12,6 @@ doctest = false
[dependencies]
app_units = "0.3"
cssparser = {version = "0.7", features = ["heap_size"]}
gecko_bindings = {path = "../../../ports/geckolib/gecko_bindings"}
style = {path = "../../../components/style", features = ["gecko"]}
style_traits = {path = "../../../components/style_traits"}
11 changes: 6 additions & 5 deletions tests/unit/stylo/lib.rs
@@ -1,10 +1,11 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

extern crate app_units;
extern crate cssparser;
extern crate gecko_bindings;
extern crate style;
extern crate style_traits;

#[test]
fn test_test() {
// do nothing
// this is a temporary test testing that the test runs
}
mod sanity_checks;
Expand Up @@ -62,7 +62,7 @@ fn assert_basic_pseudo_elements() {
};
}

include!("../../components/style/generated/gecko_pseudo_element_helper.rs");
include!("../../../components/style/generated/gecko_pseudo_element_helper.rs");

assert!(saw_before);
assert!(saw_after);
Expand Down

0 comments on commit 1d49782

Please sign in to comment.