Skip to content

Commit

Permalink
Split up the unit tests crate
Browse files Browse the repository at this point in the history
  • Loading branch information
psdh authored and SimonSapin committed Apr 21, 2015
1 parent fe61cdc commit 7b9c9e1
Show file tree
Hide file tree
Showing 8 changed files with 135 additions and 51 deletions.
16 changes: 14 additions & 2 deletions components/servo/Cargo.toml
Expand Up @@ -16,8 +16,20 @@ test = false
doc = false
bench = false

[dev-dependencies.unit_tests]
path = "../../tests/unit"
[dev-dependencies.gfx_tests]
path = "../../tests/unit/gfx"

[dev-dependencies.net_tests]
path = "../../tests/unit/net"

[dev-dependencies.script_tests]
path = "../../tests/unit/script"

[dev-dependencies.style_tests]
path = "../../tests/unit/style"

[dev-dependencies.util_tests]
path = "../../tests/unit/util"

[[test]]
name = "reftest"
Expand Down
5 changes: 3 additions & 2 deletions python/servo/testing_commands.py
Expand Up @@ -110,8 +110,9 @@ def test_unit(self, test_name=None, component=None, package=None):
self.ensure_bootstrapped()

return 0 != subprocess.call(
["cargo", "test", "-p", "unit_tests"]
+ test_name, env=self.build_env(), cwd=self.servo_crate())
["cargo", "test", "-p", "gfx_tests", "net_tests", "script_tests",
"style_tests", "util_tests"] + test_name,
env=self.build_env(), cwd=self.servo_crate())

@Command('test-ref',
description='Run the reference tests',
Expand Down
29 changes: 29 additions & 0 deletions tests/unit/gfx/Cargo.toml
@@ -0,0 +1,29 @@
[package]
name = "gfx_tests"
version = "0.0.1"
authors = ["The Servo Project Developers"]

[lib]
name = "gfx_tests"
path = "lib.rs"
doctest = false

[dependencies.gfx]
path = "../../components/gfx"

[dependencies.profile]
path = "../../components/profile"

[dependencies.geom]
git = "https://github.com/servo/rust-geom"

[dependencies.string_cache]
git = "https://github.com/servo/string-cache"

[dependencies.string_cache_plugin]
git = "https://github.com/servo/string-cache"

[dependencies]
cookie = "*"
url = "*"
hyper = "0.3"
27 changes: 0 additions & 27 deletions tests/unit/lib.rs

This file was deleted.

32 changes: 32 additions & 0 deletions tests/unit/net/Cargo.toml
@@ -0,0 +1,32 @@
[package]
name = "net_tests"
version = "0.0.1"
authors = ["The Servo Project Developers"]

[lib]
name = "net_tests"
path = "lib.rs"
doctest = false

[dependencies.net]
path = "../../components/net"

[dependencies.net_traits]
path = "../../components/net_traits"

[dependencies.cssparser]
git = "https://github.com/servo/rust-cssparser"

[dependencies.selectors]
git = "https://github.com/servo/rust-selectors"

[dependencies.string_cache]
git = "https://github.com/servo/string-cache"

[dependencies.string_cache_plugin]
git = "https://github.com/servo/string-cache"

[dependencies]
cookie = "*"
url = "*"
hyper = "0.3"
22 changes: 2 additions & 20 deletions tests/unit/Cargo.toml → tests/unit/script/Cargo.toml
@@ -1,31 +1,13 @@
[package]
name = "unit_tests"
name = "script_tests"
version = "0.0.1"
authors = ["The Servo Project Developers"]

[lib]
name = "unit_tests"
name = "script_tests"
path = "lib.rs"
doctest = false

[dependencies.util]
path = "../../components/util"

[dependencies.gfx]
path = "../../components/gfx"

[dependencies.net]
path = "../../components/net"

[dependencies.net_traits]
path = "../../components/net_traits"

[dependencies.profile]
path = "../../components/profile"

[dependencies.style]
path = "../../components/style"

[dependencies.script]
path = "../../components/script"

Expand Down
26 changes: 26 additions & 0 deletions tests/unit/style/Cargo.toml
@@ -0,0 +1,26 @@
[package]
name = "style_tests"
version = "0.0.1"
authors = ["The Servo Project Developers"]

[lib]
name = "style_tests"
path = "lib.rs"
doctest = false

[dependencies.script]
path = "../../components/script"

[dependencies.selectors]
git = "https://github.com/servo/rust-selectors"

[dependencies.string_cache]
git = "https://github.com/servo/string-cache"

[dependencies.string_cache_plugin]
git = "https://github.com/servo/string-cache"

[dependencies]
cookie = "*"
url = "*"
hyper = "0.3"
29 changes: 29 additions & 0 deletions tests/unit/util/Cargo.toml
@@ -0,0 +1,29 @@
[package]
name = "util_tests"
version = "0.0.1"
authors = ["The Servo Project Developers"]

[lib]
name = "util_tests"
path = "lib.rs"
doctest = false

[dependencies.util]
path = "../../components/util"

[dependencies.cssparser]
git = "https://github.com/servo/rust-cssparser"

[dependencies.selectors]
git = "https://github.com/servo/rust-selectors"

[dependencies.string_cache]
git = "https://github.com/servo/string-cache"

[dependencies.string_cache_plugin]
git = "https://github.com/servo/string-cache"

[dependencies]
cookie = "*"
url = "*"
hyper = "0.3"

0 comments on commit 7b9c9e1

Please sign in to comment.