mozbuild.test.frontend package

Submodules

mozbuild.test.frontend.test_context module

class mozbuild.test.frontend.test_context.TestContext(methodName='runTest')

Bases: unittest.case.TestCase

test_context_dirs()
test_context_paths()
test_defaults()
test_type_check()
test_update()
class mozbuild.test.frontend.test_context.TestFiles(methodName='runTest')

Bases: unittest.case.TestCase

test_aggregate_empty()
test_multiple_bug_components()

If there is no clear count winner, we don’t recommend a bug component.

test_single_bug_component()
class mozbuild.test.frontend.test_context.TestPaths(methodName='runTest')

Bases: unittest.case.TestCase

classmethod setUpClass()
test_absolute_path()
test_objdir_path()
test_path()
test_path_typed_hierarchy_list()
test_path_typed_list()
test_path_with_mixed_contexts()
test_source_path()
class mozbuild.test.frontend.test_context.TestSymbols(methodName='runTest')

Bases: unittest.case.TestCase

test_documentation_formatting()
class mozbuild.test.frontend.test_context.TestTypedRecord(methodName='runTest')

Bases: unittest.case.TestCase

test_coercion()
test_fields()

mozbuild.test.frontend.test_emitter module

class mozbuild.test.frontend.test_emitter.TestEmitterBasic(methodName='runTest')

Bases: unittest.case.TestCase

read_topsrcdir(reader, filter_common=True)
reader(name, enable_tests=False, extra_substs=None)
setUp()
tearDown()
test_android_res_dirs()

Test that ANDROID_RES_DIRS works properly.

test_binary_components()

Test that IS_COMPONENT/NO_COMPONENTS_MANIFEST work properly.

test_branding_files()
test_config_file_substitution()
test_defines()
test_dirs_traversal_simple()
test_empty_test_manifest_rejected()

A test manifest without any entries is rejected.

test_exports()
test_exports_generated()
test_exports_missing()

Missing files in EXPORTS is an error.

test_exports_missing_generated()

An objdir file in EXPORTS that is not in GENERATED_FILES is an error.

test_final_target_pp_files()

Test that FINAL_TARGET_PP_FILES works properly.

test_final_target_pp_files_non_srcdir()

Test that non-srcdir paths in FINAL_TARGET_PP_FILES throws errors.

test_generated_files()
test_generated_files_absolute_script()
test_generated_files_method_names()
test_generated_files_no_inputs()
test_generated_files_no_python_script()
test_generated_files_no_script()
test_generated_includes()

Test that GENERATED_INCLUDES is emitted correctly.

test_generated_sources()

Test that GENERATED_SOURCES works properly.

test_host_defines()
test_host_sources()

Test that HOST_SOURCES works properly.

test_install_shared_lib()

Test that we can install a shared library with TEST_HARNESS_FILES

test_ipdl_sources()
test_jar_manifests()
test_jar_manifests_multiple_files()
test_library_defines()

Test that LIBRARY_DEFINES is propagated properly.

test_local_includes()

Test that LOCAL_INCLUDES is emitted correctly.

test_missing_final_target_pp_files()

Test that FINAL_TARGET_PP_FILES with missing files throws errors.

test_missing_local_includes()

LOCAL_INCLUDES containing non-existent directories should be rejected.

test_program()
test_python_unit_test_missing()

Missing files in PYTHON_UNIT_TESTS should raise.

test_sdk_files()
test_sources()

Test that SOURCES works properly.

test_test_harness_files()
test_test_harness_files_root()
test_test_manifest_absolute_support_files()

Support files starting with ‘/’ are placed relative to the install root

test_test_manifest_deffered_install_missing()

A non-existent shared support file reference produces an error.

test_test_manifest_dupe_support_files()

A test manifest with dupe support-files in a single test is not supported.

test_test_manifest_includes()

Ensure that manifest objects from the emitter list a correct manifest.

test_test_manifest_install_includes()

Ensure that any [include:foo.ini] are copied to the objdir.

test_test_manifest_install_to_subdir()
test_test_manifest_just_support_files()

A test manifest with no tests but support-files is not supported.

test_test_manifest_keys_extracted()

Ensure all metadata from test manifests is extracted.

test_test_manifest_missing_manifest()

A missing manifest file should result in an error.

test_test_manifest_missing_test_error()

Missing test files should result in error.

test_test_manifest_missing_test_error_unfiltered()

Missing test files should result in error, even when the test list is not filtered.

test_test_manifest_parent_support_files_dir()

support-files referencing a file in a parent directory works.

test_test_manifest_shared_support_files()

Support files starting with ‘!’ are given separate treatment, so their installation can be resolved when running tests.

test_test_manifest_unmatched_generated()
test_traversal_all_vars()
test_traversal_all_vars_enable_tests()
test_unified_sources()

Test that UNIFIED_SOURCES works properly.

test_unified_sources_non_unified()

Test that UNIFIED_SOURCES with FILES_PER_UNIFIED_FILE=1 works properly.

test_use_yasm()
test_variable_passthru()
test_xpidl_module_no_sources()

XPIDL_MODULE without XPIDL_SOURCES should be rejected.

mozbuild.test.frontend.test_namespaces module

class mozbuild.test.frontend.test_namespaces.Fuga(value)

Bases: object

class mozbuild.test.frontend.test_namespaces.Piyo(context, value)

Bases: mozbuild.frontend.context.ContextDerivedValue

lower()
class mozbuild.test.frontend.test_namespaces.TestContext(methodName='runTest')

Bases: unittest.case.TestCase

test_allowed_set()
test_coercion()
test_context_derived_coercion()
test_context_derived_typed_list()
test_context_derived_typed_list_with_items()
test_key_checking()
test_key_rejection()
test_value_checking()

mozbuild.test.frontend.test_reader module

class mozbuild.test.frontend.test_reader.TestBuildReader(methodName='runTest')

Bases: unittest.case.TestCase

config(name, **kwargs)
file_path(name, *args)
reader(name, enable_tests=False, error_is_fatal=True, **kwargs)
setUp()
tearDown()
test_dirs_traversal_all_variables()
test_dirs_traversal_no_descend()
test_dirs_traversal_simple()
test_error_bad_dir()
test_error_basic()
test_error_empty_list()
test_error_error_func()
test_error_error_func_ok()
test_error_illegal_path()
test_error_included_from()
test_error_missing_include_path()
test_error_read_unknown_global()
test_error_repeated_dir()
test_error_script_error()
test_error_syntax_error()
test_error_write_bad_value()
test_error_write_unknown_global()
test_file_test_deps()
test_file_test_deps_default()
test_file_test_deps_tags()
test_files_bad_bug_component()
test_files_bug_component_different_matchers()
test_files_bug_component_final()
test_files_bug_component_simple()
test_files_bug_component_static()
test_find_relevant_mozbuilds()
test_inheriting_variables()
test_invalid_flavor()
test_outside_topsrcdir()
test_read_relevant_mozbuilds()
test_relative_dirs()
test_repeated_dirs_ignored()

mozbuild.test.frontend.test_sandbox module

class mozbuild.test.frontend.test_sandbox.TestMozbuildSandbox(methodName='runTest')

Bases: unittest.case.TestCase

sandbox(data_path=None, metadata={})
test_config_access()
test_default_state()
test_error()
test_exec_source_reassign_exported()
test_function_args()
test_include_basic()
test_include_error_stack()
test_include_missing()
test_include_outside_topsrcdir()
test_include_relative_from_child_dir()
test_include_topsrcdir_relative()
test_invalid_exports_set_base()
test_invalid_utf8_substs()

Ensure invalid UTF-8 in substs is converted with an error.

test_path_calculation()
test_special_variables()
test_substitute_config_files()
test_symbol_presence()
test_templates()
class mozbuild.test.frontend.test_sandbox.TestSandbox(methodName='runTest')

Bases: unittest.case.TestCase

sandbox()
test_exec_compile_error()
test_exec_import_denied()
test_exec_source_illegal_key_set()
test_exec_source_multiple()
test_exec_source_reassign()
test_exec_source_reassign_builtin()
test_exec_source_success()
class mozbuild.test.frontend.test_sandbox.TestedSandbox(context, metadata={}, finder=<mozpack.files.FileFinder object>)

Bases: mozbuild.frontend.reader.MozbuildSandbox

Version of MozbuildSandbox with a little more convenience for testing.

It automatically normalizes paths given to exec_file and exec_source. This helps simplify the test code.

exec_file(path)
exec_source(source, path=u'')
normalize_path(path)
source_path(path)

Module contents