Move sanity checks to stylo tests

This commit is contained in:
Manish Goregaokar 2016-09-20 20:38:16 +05:30
parent c615a0dabc
commit 1d497828a7
No known key found for this signature in database
GPG key ID: 3BBF4D3E2EF79F98
7 changed files with 13 additions and 12 deletions

View file

@ -401,6 +401,7 @@ version = "0.0.1"
dependencies = [
"app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gecko_bindings 0.0.1",
"style 0.0.1",
"style_traits 0.0.1",
]

View file

@ -22,7 +22,6 @@ mod snapshot;
mod snapshot_helpers;
#[allow(non_snake_case)]
pub mod glue;
mod sanity_checks;
mod traversal;
mod wrapper;

View file

@ -208,6 +208,8 @@ class MachCommands(CommandBase):
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]
@ -235,10 +237,7 @@ class MachCommands(CommandBase):
@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()

View file

@ -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"}

View file

@ -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;

View file

@ -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);