Skip to content
Snippets Groups Projects
Commit e254cc07 authored by Ted Mielczarek's avatar Ted Mielczarek
Browse files

bug 1298422 - vendor byteorder into third-party/rust. r=froydnj

MozReview-Commit-ID: ChKCKiIVEfq

--HG--
extra : rebase_source : c0da7411a2f0b7fc171c9ebb99fce91361944aa5
parent 919372cf
No related merge requests found
Showing
with 25 additions and 235 deletions
[package]
name = "random-crate"
version = "0.1.0"
authors = [
"Nobody <nobody@mozilla.org>",
]
[lib]
crate-type = ["staticlib"]
[dependencies]
ok = { version = "0.1.0", path = "ok" }
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
@template
def Library(name):
'''Template for libraries.'''
LIBRARY_NAME = name
@template
def RustLibrary(name):
'''Template for Rust libraries.'''
Library(name)
IS_RUST_LIBRARY = True
RustLibrary('random-crate')
[package]
name = "ok"
version = "0.1.0"
authors = [
"Nobody <nobody@mozilla.org>",
]
[dependencies]
bogus = { version = "0.1.0" }
[package]
name = "random-crate"
version = "0.1.0"
authors = [
"Nobody <nobody@mozilla.org>",
]
[lib]
crate-type = ["staticlib"]
[dependencies]
bogus = "0.1.0"
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
@template
def Library(name):
'''Template for libraries.'''
LIBRARY_NAME = name
@template
def RustLibrary(name):
'''Template for Rust libraries.'''
Library(name)
IS_RUST_LIBRARY = True
RustLibrary('random-crate')
[package]
name = "random-crate"
version = "0.1.0"
authors = [
"Nobody <nobody@mozilla.org>",
]
[lib]
crate-type = ["staticlib"]
[dependencies]
bogus = { version = "0.1.0" }
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
@template
def Library(name):
'''Template for libraries.'''
LIBRARY_NAME = name
@template
def RustLibrary(name):
'''Template for Rust libraries.'''
Library(name)
IS_RUST_LIBRARY = True
RustLibrary('random-crate')
[package]
name = "random-crate"
version = "0.1.0"
authors = [
"Nobody <nobody@mozilla.org>",
]
[lib]
crate-type = ["staticlib"]
[dependencies]
crate-one = { path = "crate-one" }
crate-two = { path = "crate-two" }
[package]
name = "crate-one"
version = "0.1.0"
authors = [
"Nobody <nobody@mozilla.org>",
]
[dependencies]
duplicate = { path = "duplicate" }
[package]
name = "duplicate"
version = "0.1.0"
authors = [
"Nobody <nobody@mozilla.org>",
]
[package]
name = "crate-two"
version = "0.1.0"
authors = [
"Nobody <nobody@mozilla.org>",
]
[dependencies]
duplicate = { path = "duplicate" }
[package]
name = "duplicate"
version = "0.1.0"
authors = [
"Nobody <nobody@mozilla.org>",
]
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
@template
def Library(name):
'''Template for libraries.'''
LIBRARY_NAME = name
@template
def RustLibrary(name):
'''Template for Rust libraries.'''
Library(name)
IS_RUST_LIBRARY = True
RustLibrary('random-crate')
......@@ -993,74 +993,6 @@ class TestEmitterBasic(unittest.TestCase):
'Only source directory paths allowed in FINAL_TARGET_PP_FILES:'):
self.read_topsrcdir(reader)
def test_crate_dependency_version_only(self):
'''Test that including a crate with a version-only dependency fails.'''
reader = self.reader('crate-dependency-version-only')
with self.assertRaisesRegexp(SandboxValidationError,
'Dependency.*of crate.*does not list a path'):
self.read_topsrcdir(reader)
def test_crate_dependency_with_dict(self):
'''Test that including a crate with a dict-using version-only dependency fails.'''
reader = self.reader('crate-dependency-with-dict')
with self.assertRaisesRegexp(SandboxValidationError,
'Dependency.*of crate.*does not list a path'):
self.read_topsrcdir(reader)
def test_crate_dependency_absolute_path(self):
'''Test that including a crate with an absolute-path dependency fails.'''
reader = self.reader('crate-dependency-absolute-path')
with self.assertRaisesRegexp(SandboxValidationError,
'Dependency.*of crate.*has a non-relative path'):
self.read_topsrcdir(reader)
def test_crate_dependency_nonexistent_path(self):
'''Test that including a crate with a non-existent dependency fails.'''
reader = self.reader('crate-dependency-nonexistent-path')
with self.assertRaisesRegexp(SandboxValidationError,
'Dependency.*of crate.*refers to a non-existent path'):
self.read_topsrcdir(reader)
def test_crate_build_dependency_version_only(self):
'''Test that including a crate with a version-only dependency fails.'''
reader = self.reader('crate-build-dependency-version-only')
with self.assertRaisesRegexp(SandboxValidationError,
'Build dependency.*of crate.*does not list a path'):
self.read_topsrcdir(reader)
def test_crate_build_dependency_with_dict(self):
'''Test that including a crate with a dict-using version-only dependency fails.'''
reader = self.reader('crate-build-dependency-with-dict')
with self.assertRaisesRegexp(SandboxValidationError,
'Build dependency.*of crate.*does not list a path'):
self.read_topsrcdir(reader)
def test_crate_build_dependency_absolute_path(self):
'''Test that including a crate with an absolute-path dependency fails.'''
reader = self.reader('crate-build-dependency-absolute-path')
with self.assertRaisesRegexp(SandboxValidationError,
'Build dependency.*of crate.*has a non-relative path'):
self.read_topsrcdir(reader)
def test_crate_build_dependency_nonexistent_path(self):
'''Test that including a crate with a non-existent dependency fails.'''
reader = self.reader('crate-build-dependency-nonexistent-path')
with self.assertRaisesRegexp(SandboxValidationError,
'Build dependency.*of crate.*refers to a non-existent path'):
self.read_topsrcdir(reader)
def test_crate_dependency_recursive(self):
reader = self.reader('crate-dependency-recursive')
with self.assertRaisesRegexp(SandboxValidationError,
'Dependency.*of crate.*does not list a path'):
self.read_topsrcdir(reader)
def test_crate_build_dependency_recursive(self):
reader = self.reader('crate-build-dependency-recursive')
with self.assertRaisesRegexp(SandboxValidationError,
'Build dependency.*of crate.*does not list a path'):
self.read_topsrcdir(reader)
def test_rust_library_no_cargo_toml(self):
'''Test that defining a RustLibrary without a Cargo.toml fails.'''
reader = self.reader('rust-library-no-cargo-toml')
......@@ -1111,13 +1043,6 @@ class TestEmitterBasic(unittest.TestCase):
self.assertEqual(len(objs), 1)
self.assertIsInstance(objs[0], RustLibrary)
def test_duplicate_crate_names(self):
'''Test that crates are not duplicated in the tree.'''
reader = self.reader('duplicated-crate-names')
with self.assertRaisesRegexp(SandboxValidationError,
'Crate.*found at multiple paths'):
self.read_topsrcdir(reader)
def test_android_res_dirs(self):
"""Test that ANDROID_RES_DIRS works properly."""
reader = self.reader('android-res-dirs')
......
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".gitignore":"2879af3c0512f976015d532e2d768f04ff22fdcf8745b69b955b78fda321c3fb",".travis.yml":"81545ce3c6c72111a68434464c3f9fa8df9cbe39759a081fac527628ab21ae0c","COPYING":"01c266bced4a434da0051174d6bee16a4c82cf634e2679b6155d40d75012390f","Cargo.toml":"a7282931b50dff2e463f82baaed95a9d76636bc0fef3e921acd8ca69eab32b83","LICENSE-MIT":"0f96a83840e146e43c0ec96a22ec1f392e0680e6c1226e6f3ba87e0740af850f","Makefile":"a45a128685a2ae7d4fa39d310786674417ee113055ef290a11f88002285865fc","README.md":"fbcc46b6d0a585096737f50922818b59016b69d959b05f1b29863b2af8e4da43","UNLICENSE":"7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c","benches/bench.rs":"f583692d829c8dfe19b1d5b9e968ccf5c74d6733367ca183edff74041a6afedd","session.vim":"95cb1d7caf0ff7fbe76ec911988d908ddd883381c925ba64b537695bc9f021c4","src/lib.rs":"ef9e7a218fa3a4912c47f6840d32b975940d98277b6c9be85e8d7d045552eb87","src/new.rs":"161c21b7ebb5668c7cc70b46b0eb37709e06bb9c854f2fdfc6ce3d3babcbf3de"},"package":"0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855"}
\ No newline at end of file
.*.swp
doc
tags
build
target
Cargo.lock
language: rust
matrix:
include:
- rust: "nightly"
env: TEST_SUITE=suite_nightly
- rust: "beta"
env: TEST_SUITE=suite_beta
- rust: "stable"
env: TEST_SUITE=suite_stable
script:
- cargo build --verbose
- cargo test --verbose
- if [ "$TEST_SUITE" = "suite_nightly" ]; then
cargo bench --verbose;
fi
This project is dual-licensed under the Unlicense and MIT licenses.
You may use this code under the terms of either license.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment