diff options
Diffstat (limited to 'python/mozbuild/mozbuild/test/frontend/test_emitter.py')
-rw-r--r-- | python/mozbuild/mozbuild/test/frontend/test_emitter.py | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/python/mozbuild/mozbuild/test/frontend/test_emitter.py b/python/mozbuild/mozbuild/test/frontend/test_emitter.py index 6ac4e0aac..191727381 100644 --- a/python/mozbuild/mozbuild/test/frontend/test_emitter.py +++ b/python/mozbuild/mozbuild/test/frontend/test_emitter.py @@ -31,7 +31,6 @@ from mozbuild.frontend.data import ( LinkageMultipleRustLibrariesError, LocalInclude, Program, - RustLibrary, SdkFiles, SharedLibrary, SimpleProgram, @@ -1021,78 +1020,6 @@ class TestEmitterBasic(unittest.TestCase): 'Only source directory paths allowed in FINAL_TARGET_PP_FILES:'): 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') - with self.assertRaisesRegexp(SandboxValidationError, - 'No Cargo.toml file found'): - self.read_topsrcdir(reader) - - def test_rust_library_name_mismatch(self): - '''Test that defining a RustLibrary that doesn't match Cargo.toml fails.''' - reader = self.reader('rust-library-name-mismatch') - with self.assertRaisesRegexp(SandboxValidationError, - 'library.*does not match Cargo.toml-defined package'): - self.read_topsrcdir(reader) - - def test_rust_library_no_lib_section(self): - '''Test that a RustLibrary Cargo.toml with no [lib] section fails.''' - reader = self.reader('rust-library-no-lib-section') - with self.assertRaisesRegexp(SandboxValidationError, - 'Cargo.toml for.* has no \\[lib\\] section'): - self.read_topsrcdir(reader) - - def test_rust_library_no_profile_section(self): - '''Test that a RustLibrary Cargo.toml with no [profile] section fails.''' - reader = self.reader('rust-library-no-profile-section') - with self.assertRaisesRegexp(SandboxValidationError, - 'Cargo.toml for.* has no \\[profile\\.dev\\] section'): - self.read_topsrcdir(reader) - - def test_rust_library_invalid_crate_type(self): - '''Test that a RustLibrary Cargo.toml has a permitted crate-type.''' - reader = self.reader('rust-library-invalid-crate-type') - with self.assertRaisesRegexp(SandboxValidationError, - 'crate-type.* is not permitted'): - self.read_topsrcdir(reader) - - def test_rust_library_non_abort_panic(self): - '''Test that a RustLibrary Cargo.toml has `panic = "abort" set''' - reader = self.reader('rust-library-non-abort-panic') - with self.assertRaisesRegexp(SandboxValidationError, - 'does not specify `panic = "abort"`'): - self.read_topsrcdir(reader) - - def test_rust_library_dash_folding(self): - '''Test that on-disk names of RustLibrary objects convert dashes to underscores.''' - reader = self.reader('rust-library-dash-folding', - extra_substs=dict(RUST_TARGET='i686-pc-windows-msvc')) - objs = self.read_topsrcdir(reader) - - self.assertEqual(len(objs), 1) - lib = objs[0] - self.assertIsInstance(lib, RustLibrary) - self.assertRegexpMatches(lib.lib_name, "random_crate") - self.assertRegexpMatches(lib.import_name, "random_crate") - self.assertRegexpMatches(lib.basename, "random-crate") - - def test_multiple_rust_libraries(self): - '''Test that linking multiple Rust libraries throws an error''' - reader = self.reader('multiple-rust-libraries', - extra_substs=dict(RUST_TARGET='i686-pc-windows-msvc')) - with self.assertRaisesRegexp(LinkageMultipleRustLibrariesError, - 'Cannot link multiple Rust libraries'): - self.read_topsrcdir(reader) - - def test_crate_dependency_path_resolution(self): - '''Test recursive dependencies resolve with the correct paths.''' - reader = self.reader('crate-dependency-path-resolution', - extra_substs=dict(RUST_TARGET='i686-pc-windows-msvc')) - objs = self.read_topsrcdir(reader) - - self.assertEqual(len(objs), 1) - self.assertIsInstance(objs[0], RustLibrary) - def test_android_res_dirs(self): """Test that ANDROID_RES_DIRS works properly.""" reader = self.reader('android-res-dirs') |