mozbuild.test package¶
Subpackages¶
- mozbuild.test.backend package
- Submodules
- mozbuild.test.backend.common module
- mozbuild.test.backend.test_build module
- mozbuild.test.backend.test_configenvironment module
- mozbuild.test.backend.test_database module
- mozbuild.test.backend.test_fastermake module
- mozbuild.test.backend.test_partialconfigenvironment module
- mozbuild.test.backend.test_recursivemake module
TestRecursiveMakeBackend
TestRecursiveMakeBackend.test_backend_mk()
TestRecursiveMakeBackend.test_basic()
TestRecursiveMakeBackend.test_config()
TestRecursiveMakeBackend.test_defines()
TestRecursiveMakeBackend.test_exports()
TestRecursiveMakeBackend.test_exports_generated()
TestRecursiveMakeBackend.test_final_target()
TestRecursiveMakeBackend.test_final_target_pp_files()
TestRecursiveMakeBackend.test_generated_files()
TestRecursiveMakeBackend.test_generated_files_force()
TestRecursiveMakeBackend.test_generated_includes()
TestRecursiveMakeBackend.test_host_rust_library()
TestRecursiveMakeBackend.test_host_rust_library_with_features()
TestRecursiveMakeBackend.test_install_manifests_package_tests()
TestRecursiveMakeBackend.test_install_manifests_written()
TestRecursiveMakeBackend.test_install_substitute_config_files()
TestRecursiveMakeBackend.test_ipdl_sources()
TestRecursiveMakeBackend.test_jar_manifests()
TestRecursiveMakeBackend.test_linkage()
TestRecursiveMakeBackend.test_list_files()
TestRecursiveMakeBackend.test_local_includes()
TestRecursiveMakeBackend.test_localized_files()
TestRecursiveMakeBackend.test_localized_generated_files()
TestRecursiveMakeBackend.test_localized_generated_files_AB_CD()
TestRecursiveMakeBackend.test_localized_generated_files_force()
TestRecursiveMakeBackend.test_localized_pp_files()
TestRecursiveMakeBackend.test_makefile_conversion()
TestRecursiveMakeBackend.test_missing_makefile_in()
TestRecursiveMakeBackend.test_mtime_no_change()
TestRecursiveMakeBackend.test_old_install_manifest_deleted()
TestRecursiveMakeBackend.test_output_files()
TestRecursiveMakeBackend.test_prog_lib_c_only()
TestRecursiveMakeBackend.test_program_paths()
TestRecursiveMakeBackend.test_resources()
TestRecursiveMakeBackend.test_rust_library()
TestRecursiveMakeBackend.test_rust_library_with_features()
TestRecursiveMakeBackend.test_rust_programs()
TestRecursiveMakeBackend.test_shared_lib_paths()
TestRecursiveMakeBackend.test_sources()
TestRecursiveMakeBackend.test_substitute_config_files()
TestRecursiveMakeBackend.test_test_manifest_deffered_installs_written()
TestRecursiveMakeBackend.test_test_manifest_pattern_matches_recorded()
TestRecursiveMakeBackend.test_test_manifests_duplicate_support_files()
TestRecursiveMakeBackend.test_test_manifests_files_written()
TestRecursiveMakeBackend.test_test_support_files_tracked()
TestRecursiveMakeBackend.test_variable_passthru()
TestRecursiveMakeBackend.test_xpidl_generation()
TestRecursiveMakeTraversal
- mozbuild.test.backend.test_test_manifest module
- mozbuild.test.backend.test_visualstudio module
- Module contents
- mozbuild.test.compilation package
- mozbuild.test.controller package
- Submodules
- mozbuild.test.controller.test_ccachestats module
TestCcacheStats
TestCcacheStats.STAT0
TestCcacheStats.STAT1
TestCcacheStats.STAT10
TestCcacheStats.STAT11
TestCcacheStats.STAT12
TestCcacheStats.STAT13
TestCcacheStats.STAT2
TestCcacheStats.STAT3
TestCcacheStats.STAT4
TestCcacheStats.STAT5
TestCcacheStats.STAT6
TestCcacheStats.STAT7
TestCcacheStats.STAT8
TestCcacheStats.STAT9
TestCcacheStats.STAT_GARBAGE
TestCcacheStats.VERSION_3_5_GIT
TestCcacheStats.VERSION_4_2
TestCcacheStats.VERSION_4_4
TestCcacheStats.VERSION_4_4_2
TestCcacheStats.VERSION_4_5
TestCcacheStats.maxDiff
TestCcacheStats.test_cache_size_shrinking()
TestCcacheStats.test_hit_rate_of_diff_stats()
TestCcacheStats.test_parse_garbage_stats_message()
TestCcacheStats.test_parse_zero_stats_message()
TestCcacheStats.test_stats_contains_data()
TestCcacheStats.test_stats_version32()
TestCcacheStats.test_stats_version33()
TestCcacheStats.test_stats_version34()
TestCcacheStats.test_stats_version35()
TestCcacheStats.test_stats_version37()
- mozbuild.test.controller.test_clobber module
TestClobberer
TestClobberer.get_tempdir()
TestClobberer.get_topsrcdir()
TestClobberer.setUp()
TestClobberer.tearDown()
TestClobberer.test_cwd_is_topobjdir()
TestClobberer.test_cwd_under_topobjdir()
TestClobberer.test_mozconfig_opt_in()
TestClobberer.test_no_objdir()
TestClobberer.test_objdir_clobber_newer()
TestClobberer.test_objdir_clobber_older()
TestClobberer.test_objdir_is_srcdir()
TestClobberer.test_objdir_no_clobber_file()
- Module contents
- mozbuild.test.frontend package
- Submodules
- mozbuild.test.frontend.test_context module
- mozbuild.test.frontend.test_emitter module
TestEmitterBasic
TestEmitterBasic.read_topsrcdir()
TestEmitterBasic.reader()
TestEmitterBasic.setUp()
TestEmitterBasic.tearDown()
TestEmitterBasic.test_allow_compiler_warnings()
TestEmitterBasic.test_asflags()
TestEmitterBasic.test_compile_flags()
TestEmitterBasic.test_compile_flags_templates()
TestEmitterBasic.test_compile_flags_validation()
TestEmitterBasic.test_config_file_substitution()
TestEmitterBasic.test_crate_dependency_path_resolution()
TestEmitterBasic.test_cross_optimize_flags()
TestEmitterBasic.test_debug_flags()
TestEmitterBasic.test_debug_ldflags()
TestEmitterBasic.test_defines()
TestEmitterBasic.test_defines_in_flags()
TestEmitterBasic.test_dirs_traversal_simple()
TestEmitterBasic.test_disable_compiler_warnings()
TestEmitterBasic.test_disable_debug_flags()
TestEmitterBasic.test_disable_stl_wrapping()
TestEmitterBasic.test_empty_test_manifest_rejected()
TestEmitterBasic.test_exports()
TestEmitterBasic.test_exports_generated()
TestEmitterBasic.test_exports_missing()
TestEmitterBasic.test_exports_missing_generated()
TestEmitterBasic.test_final_target_pp_files()
TestEmitterBasic.test_final_target_pp_files_non_srcdir()
TestEmitterBasic.test_generated_files()
TestEmitterBasic.test_generated_files_absolute_script()
TestEmitterBasic.test_generated_files_force()
TestEmitterBasic.test_generated_files_method_names()
TestEmitterBasic.test_generated_files_no_inputs()
TestEmitterBasic.test_generated_files_no_python_script()
TestEmitterBasic.test_generated_files_no_script()
TestEmitterBasic.test_generated_includes()
TestEmitterBasic.test_generated_sources()
TestEmitterBasic.test_host_compile_flags()
TestEmitterBasic.test_host_no_optimize_flags()
TestEmitterBasic.test_host_optimize_flags()
TestEmitterBasic.test_host_program_paths()
TestEmitterBasic.test_host_rtl_flag()
TestEmitterBasic.test_host_rust_libraries()
TestEmitterBasic.test_host_rust_program_no_cargo_toml()
TestEmitterBasic.test_host_rust_program_nonexistent_name()
TestEmitterBasic.test_host_rust_programs()
TestEmitterBasic.test_host_sources()
TestEmitterBasic.test_includes_in_flags()
TestEmitterBasic.test_install_shared_lib()
TestEmitterBasic.test_ipdl_sources()
TestEmitterBasic.test_jar_manifests()
TestEmitterBasic.test_jar_manifests_multiple_files()
TestEmitterBasic.test_library_defines()
TestEmitterBasic.test_link_flags()
TestEmitterBasic.test_linkables_cxx_link()
TestEmitterBasic.test_local_includes()
TestEmitterBasic.test_local_includes_file()
TestEmitterBasic.test_local_includes_invalid()
TestEmitterBasic.test_localized_files()
TestEmitterBasic.test_localized_files_from_generated()
TestEmitterBasic.test_localized_files_no_en_us()
TestEmitterBasic.test_localized_files_not_localized_generated()
TestEmitterBasic.test_localized_generated_files()
TestEmitterBasic.test_localized_generated_files_final_target_files()
TestEmitterBasic.test_localized_generated_files_force()
TestEmitterBasic.test_localized_pp_files()
TestEmitterBasic.test_missing_final_target_pp_files()
TestEmitterBasic.test_missing_local_includes()
TestEmitterBasic.test_missing_workspace_hack()
TestEmitterBasic.test_multiple_rust_libraries()
TestEmitterBasic.test_object_conflicts()
TestEmitterBasic.test_old_workspace_hack()
TestEmitterBasic.test_program()
TestEmitterBasic.test_program_paths()
TestEmitterBasic.test_resolved_flags_error()
TestEmitterBasic.test_rust_library_dash_folding()
TestEmitterBasic.test_rust_library_duplicate_features()
TestEmitterBasic.test_rust_library_features()
TestEmitterBasic.test_rust_library_invalid_crate_type()
TestEmitterBasic.test_rust_library_name_mismatch()
TestEmitterBasic.test_rust_library_no_cargo_toml()
TestEmitterBasic.test_rust_library_no_lib_section()
TestEmitterBasic.test_rust_program_no_cargo_toml()
TestEmitterBasic.test_rust_program_nonexistent_name()
TestEmitterBasic.test_rust_programs()
TestEmitterBasic.test_shared_lib_paths()
TestEmitterBasic.test_sources()
TestEmitterBasic.test_sources_just_c()
TestEmitterBasic.test_symbols_file()
TestEmitterBasic.test_symbols_file_objdir()
TestEmitterBasic.test_symbols_file_objdir_missing_generated()
TestEmitterBasic.test_test_harness_files()
TestEmitterBasic.test_test_harness_files_root()
TestEmitterBasic.test_test_manifest_absolute_support_files()
TestEmitterBasic.test_test_manifest_deffered_install_missing()
TestEmitterBasic.test_test_manifest_dupe_support_files()
TestEmitterBasic.test_test_manifest_includes()
TestEmitterBasic.test_test_manifest_install_includes()
TestEmitterBasic.test_test_manifest_just_support_files()
TestEmitterBasic.test_test_manifest_keys_extracted()
TestEmitterBasic.test_test_manifest_missing_manifest()
TestEmitterBasic.test_test_manifest_missing_test_error()
TestEmitterBasic.test_test_manifest_missing_test_error_unfiltered()
TestEmitterBasic.test_test_manifest_parent_support_files_dir()
TestEmitterBasic.test_test_manifest_shared_support_files()
TestEmitterBasic.test_test_manifest_unmatched_generated()
TestEmitterBasic.test_traversal_all_vars()
TestEmitterBasic.test_traversal_all_vars_enable_tests()
TestEmitterBasic.test_unified_sources()
TestEmitterBasic.test_unified_sources_non_unified()
TestEmitterBasic.test_use_nasm()
TestEmitterBasic.test_variable_passthru()
TestEmitterBasic.test_visibility_flags()
TestEmitterBasic.test_wasm_compile_flags()
TestEmitterBasic.test_wasm_sources()
TestEmitterBasic.test_windows_dmd_link_flags()
TestEmitterBasic.test_windows_opt_link_flags()
TestEmitterBasic.test_xpidl_module_missing_sources()
TestEmitterBasic.test_xpidl_module_no_sources()
- mozbuild.test.frontend.test_namespaces module
Fuga
Piyo
TestContext
TestContext.test_allowed_set()
TestContext.test_coercion()
TestContext.test_context_derived_coercion()
TestContext.test_context_derived_typed_list()
TestContext.test_context_derived_typed_list_with_items()
TestContext.test_key_checking()
TestContext.test_key_rejection()
TestContext.test_value_checking()
- mozbuild.test.frontend.test_reader module
TestBuildReader
TestBuildReader.config()
TestBuildReader.file_path()
TestBuildReader.reader()
TestBuildReader.setUp()
TestBuildReader.tearDown()
TestBuildReader.test_all_mozbuild_paths()
TestBuildReader.test_dirs_traversal_all_variables()
TestBuildReader.test_dirs_traversal_no_descend()
TestBuildReader.test_dirs_traversal_simple()
TestBuildReader.test_error_bad_dir()
TestBuildReader.test_error_basic()
TestBuildReader.test_error_empty_list()
TestBuildReader.test_error_error_func()
TestBuildReader.test_error_error_func_ok()
TestBuildReader.test_error_illegal_path()
TestBuildReader.test_error_included_from()
TestBuildReader.test_error_missing_include_path()
TestBuildReader.test_error_read_unknown_global()
TestBuildReader.test_error_repeated_dir()
TestBuildReader.test_error_script_error()
TestBuildReader.test_error_syntax_error()
TestBuildReader.test_error_write_bad_value()
TestBuildReader.test_error_write_unknown_global()
TestBuildReader.test_files_bad_bug_component()
TestBuildReader.test_files_bug_component_different_matchers()
TestBuildReader.test_files_bug_component_final()
TestBuildReader.test_files_bug_component_simple()
TestBuildReader.test_files_bug_component_static()
TestBuildReader.test_find_relevant_mozbuilds()
TestBuildReader.test_inheriting_variables()
TestBuildReader.test_invalid_flavor()
TestBuildReader.test_outside_topsrcdir()
TestBuildReader.test_read_relevant_mozbuilds()
TestBuildReader.test_relative_dirs()
TestBuildReader.test_repeated_dirs_error()
TestBuildReader.test_schedules()
- mozbuild.test.frontend.test_sandbox module
TestMozbuildSandbox
TestMozbuildSandbox.sandbox()
TestMozbuildSandbox.test_config_access()
TestMozbuildSandbox.test_default_state()
TestMozbuildSandbox.test_error()
TestMozbuildSandbox.test_exec_source_reassign_exported()
TestMozbuildSandbox.test_function_args()
TestMozbuildSandbox.test_include_basic()
TestMozbuildSandbox.test_include_error_stack()
TestMozbuildSandbox.test_include_missing()
TestMozbuildSandbox.test_include_outside_topsrcdir()
TestMozbuildSandbox.test_include_relative_from_child_dir()
TestMozbuildSandbox.test_include_topsrcdir_relative()
TestMozbuildSandbox.test_invalid_exports_set_base()
TestMozbuildSandbox.test_path_calculation()
TestMozbuildSandbox.test_special_variables()
TestMozbuildSandbox.test_substitute_config_files()
TestMozbuildSandbox.test_symbol_presence()
TestMozbuildSandbox.test_templates()
TestSandbox
TestSandbox.sandbox()
TestSandbox.test_exec_compile_error()
TestSandbox.test_exec_import_denied()
TestSandbox.test_exec_source_illegal_key_set()
TestSandbox.test_exec_source_multiple()
TestSandbox.test_exec_source_reassign()
TestSandbox.test_exec_source_reassign_builtin()
TestSandbox.test_exec_source_success()
TestedSandbox
- Module contents
- mozbuild.test.vendor package
Submodules¶
mozbuild.test.common module¶
- class mozbuild.test.common.MockConfig(topsrcdir='/path/to/topsrcdir', extra_substs={}, error_is_fatal=True)¶
Bases:
object
- mozbuild.test.common.prepare_tmp_topsrcdir(path)¶
mozbuild.test.test_android_version_code module¶
- class mozbuild.test.test_android_version_code.TestAndroidVersionCode(methodName='runTest')¶
Bases:
TestCase
- test_android_version_code_v0()¶
- test_android_version_code_v0_relative_v1()¶
Verify that the first v1 code is greater than the equivalent v0 code.
- test_android_version_code_v1()¶
- test_android_version_code_v1_overflow()¶
Verify that it is an error to ask for v1 codes that actually does overflow.
- test_android_version_code_v1_running_low()¶
Verify there is an informative message if one asks for v1 codes that are close to overflow.
- test_android_version_code_v1_underflow()¶
Verify that it is an error to ask for v1 codes predating the cutoff.
mozbuild.test.test_artifact_cache module¶
- class mozbuild.test.test_artifact_cache.FakeResponse(content)¶
Bases:
object
- close()¶
- property headers¶
- iter_content(chunk_size)¶
- raise_for_status()¶
- class mozbuild.test.test_artifact_cache.TestArtifactCache(methodName='runTest')¶
Bases:
TestCase
- listtmpdir()¶
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- tearDown()¶
Hook method for deconstructing the test fixture after testing it.
- test_artifact_cache_persistence()¶
- utime(path, times)¶
mozbuild.test.test_artifacts module¶
- class mozbuild.test.test_artifacts.FakeArtifactJob(log=None, download_tests=True, download_symbols=False, download_maven_zip=False, substs=None, mozbuild=None)¶
Bases:
ArtifactJob
- package_re = ''¶
- class mozbuild.test.test_artifacts.FakeThunderbirdJob(log=None, download_tests=True, download_symbols=False, download_maven_zip=False, substs=None, mozbuild=None)¶
Bases:
ThunderbirdMixin
,FakeArtifactJob
- class mozbuild.test.test_artifacts.TestArtifactJob(methodName='runTest')¶
Bases:
TestCase
- test_candidate_trees_with_beta_version()¶
- test_candidate_trees_with_empty_file()¶
- test_candidate_trees_with_esr_version()¶
- test_candidate_trees_with_newline_before_version()¶
- test_candidate_trees_with_nightly_version()¶
- test_candidate_trees_with_release_version()¶
- test_property_is_cached()¶
mozbuild.test.test_base module¶
- class mozbuild.test.test_base.TestMozbuildObject(methodName='runTest')¶
Bases:
TestCase
- get_base(topobjdir=None)¶
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- tearDown()¶
Hook method for deconstructing the test fixture after testing it.
- test_config_environment()¶
- test_get_binary_path()¶
- test_mach_command_base_inside_objdir()¶
Ensure a MachCommandBase constructed from inside the objdir works.
- test_objdir_config_guess()¶
- test_objdir_config_status()¶
Ensure @CONFIG_GUESS@ is handled when loading mozconfig.
- test_objdir_is_srcdir_rejected()¶
Ensure the srcdir configurations are rejected.
- test_objdir_mismatch()¶
Ensure MachCommandBase throwing on objdir mismatch.
- test_objdir_trailing_slash()¶
Trailing slashes in topobjdir should be removed.
- test_relative_objdir()¶
Relative defined objdirs are loaded properly.
- test_symlink_objdir()¶
Objdir that is a symlink is loaded properly.
mozbuild.test.test_containers module¶
- class mozbuild.test.test_containers.TestKeyedDefaultDict(methodName='runTest')¶
Bases:
TestCase
- test_defaults()¶
- test_simple()¶
- class mozbuild.test.test_containers.TestList(methodName='runTest')¶
Bases:
TestCase
- test_add_list()¶
- test_add_string()¶
- test_none()¶
As a special exception, we allow None to be treated as an empty list.
- class mozbuild.test.test_containers.TestOrderedDefaultDict(methodName='runTest')¶
Bases:
TestCase
- test_defaults()¶
- test_simple()¶
- class mozbuild.test.test_containers.TestReadOnlyDefaultDict(methodName='runTest')¶
Bases:
TestCase
- test_assignment()¶
- test_defaults()¶
- test_simple()¶
- class mozbuild.test.test_containers.TestReadOnlyDict(methodName='runTest')¶
Bases:
TestCase
- test_basic()¶
- test_del()¶
- test_update()¶
mozbuild.test.test_dotproperties module¶
mozbuild.test.test_expression module¶
- class mozbuild.test.test_expression.TestContext(methodName='runTest')¶
Bases:
TestCase
Unit tests for the Context class
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- test_in()¶
test ‘var in context’ to not fall for fallback
- test_string_literal()¶
test string literal, fall-through for undefined var in a Context
- test_variable()¶
test value for defined var in the Context class
- class mozbuild.test.test_expression.TestExpression(methodName='runTest')¶
Bases:
TestCase
Unit tests for the Expression class evaluate() is called with a context {FAIL: ‘PASS’}
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- test_defined()¶
Test for the defined() value
- test_equals()¶
Test for the == operator
- test_logical_and()¶
Test for the && operator
- test_logical_ops()¶
Test for the && and || operators precedence
- test_logical_or()¶
Test for the || operator
- test_not()¶
Test for the ! operator
- test_notequals()¶
Test for the != operator
- test_string_literal()¶
Test for a string literal in an Expression
- test_variable()¶
Test for variable value in an Expression
mozbuild.test.test_jarmaker module¶
- class mozbuild.test.test_jarmaker.TestJarMaker(methodName='runTest')¶
Bases:
TestCase
Unit tests for JarMaker.py
- debug = False¶
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- tearDown()¶
Hook method for deconstructing the test fixture after testing it.
- test_a_simple_jar()¶
Test a simple jar.mn
- test_a_simple_symlink()¶
Test a simple jar.mn with a symlink
- test_a_wildcard_jar()¶
Test a wildcard in jar.mn
- test_a_wildcard_symlink()¶
Test a wildcard in jar.mn with symlinks
- class mozbuild.test.test_jarmaker.Test_fluent(methodName='runTest')¶
Bases:
TestCase
Unit tests for JarMaker interaction with Fluent
- debug = False¶
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- tearDown()¶
Hook method for deconstructing the test fixture after testing it.
- test_l10n_not_merge_ftl()¶
Test that JarMaker doesn’t merge source .ftl files
- class mozbuild.test.test_jarmaker.Test_relativesrcdir(methodName='runTest')¶
Bases:
TestCase
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- tearDown()¶
Hook method for deconstructing the test fixture after testing it.
- test_en_US()¶
- test_l10n_merge()¶
- test_l10n_no_merge()¶
- test_override()¶
- test_override_l10n()¶
- mozbuild.test.test_jarmaker.is_symlink_to(dest, src)¶
- mozbuild.test.test_jarmaker.symlinks_supported(path)¶
mozbuild.test.test_licenses module¶
mozbuild.test.test_line_endings module¶
- class mozbuild.test.test_line_endings.TestLineEndings(methodName='runTest')¶
Bases:
TestCase
Unit tests for the Context class
- createFile(lineendings)¶
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- tearDown()¶
Hook method for deconstructing the test fixture after testing it.
- testMac()¶
- testUnix()¶
- testWindows()¶
mozbuild.test.test_makeutil module¶
mozbuild.test.test_manifest module¶
mozbuild.test.test_mozconfig module¶
- class mozbuild.test.test_mozconfig.TestMozconfigLoader(methodName='runTest')¶
Bases:
TestCase
- get_loader()¶
- get_temp_dir()¶
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- tearDown()¶
Hook method for deconstructing the test fixture after testing it.
- test_read_ac_options_substitution()¶
Ensure ac_add_options values are substituted.
- test_read_capture_ac_options()¶
Ensures ac_add_options calls are captured.
- test_read_capture_mk_options()¶
Ensures mk_add_options calls are captured.
- test_read_capture_mk_options_objdir_environ()¶
Ensures mk_add_options calls are captured and override the environ.
- test_read_empty_mozconfig()¶
- test_read_empty_mozconfig_objdir_environ()¶
- test_read_empty_variable_value()¶
Ensure empty variable values are parsed properly.
- test_read_exported_variables()¶
Exported variables are caught as new variables.
- test_read_load_exception()¶
Ensure non-0 exit codes in mozconfigs are handled properly.
- test_read_modify_variables()¶
Variables modified by mozconfig are detected.
- test_read_moz_objdir_substitution()¶
Ensure @TOPSRCDIR@ substitution is recognized in MOZ_OBJDIR.
- test_read_multiline_variables()¶
Ensure multi-line variables are captured properly.
- test_read_new_variables()¶
New variables declared in mozconfig file are detected.
- test_read_no_mozconfig()¶
- test_read_no_mozconfig_objdir_environ()¶
- test_read_removed_variables()¶
Variables unset by the mozconfig are detected.
- test_read_topsrcdir_defined()¶
Ensure $topsrcdir references work as expected.
- test_read_unmodified_variables()¶
Variables modified by mozconfig are detected.
mozbuild.test.test_mozinfo module¶
- class mozbuild.test.test_mozinfo.Base¶
Bases:
object
- class mozbuild.test.test_mozinfo.TestBuildDict(methodName='runTest')¶
Bases:
TestCase
,Base
- test_android()¶
- test_arm()¶
Test that all arm CPU architectures => arm.
- test_crashreporter()¶
Test that crashreporter values are properly detected.
- test_debug()¶
Test that debug values are properly detected.
- test_linux()¶
- test_mac()¶
- test_missing()¶
Test that missing required values raises.
- test_unknown()¶
Test that unknown values pass through okay.
- test_win()¶
- test_x86()¶
Test that various i?86 values => x86.
- class mozbuild.test.test_mozinfo.TestWriteMozinfo(methodName='runTest')¶
Bases:
TestCase
,Base
Test the write_mozinfo function.
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- tearDown()¶
Hook method for deconstructing the test fixture after testing it.
- test_basic()¶
Test that writing to a file produces correct output.
- test_fileobj()¶
Test that writing to a file-like object produces correct output.
mozbuild.test.test_preprocessor module¶
- class mozbuild.test.test_preprocessor.TestPreprocessor(methodName='runTest')¶
Bases:
TestCase
Unit tests for the Context class
- do_include_compare(content_lines, expected_lines)¶
- do_include_pass(content_lines)¶
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- test_ambigous_command()¶
- test_command_line_literal_at()¶
- test_conditional_if_0()¶
- test_conditional_if_0_elif_1()¶
- test_conditional_if_0_or_1()¶
- test_conditional_if_1()¶
- test_conditional_if_1_elif_1_else()¶
- test_conditional_if_1_if_1()¶
- test_conditional_not_0()¶
- test_conditional_not_0_and_1()¶
- test_conditional_not_1()¶
- test_conditional_not_emptyval()¶
- test_conditional_not_nullval()¶
- test_default_defines()¶
- test_error()¶
- test_expand()¶
- test_filterDefine()¶
- test_filter_attemptSubstitution()¶
- test_filter_dumbComments()¶
- test_filter_dumbComments_and_emptyLines()¶
- test_filter_emptyLines()¶
- test_filter_substitution()¶
- test_include()¶
- test_include_line()¶
- test_include_literal_at()¶
- test_include_missing_file()¶
- test_include_undefined_variable()¶
- test_indentation()¶
- test_invalid_ifdef()¶
- test_javascript_line()¶
- test_literal()¶
- test_no_marker()¶
- test_number_value()¶
- test_number_value_equals()¶
- test_number_value_equals_defines()¶
- test_number_value_not_equals_quoted_defines()¶
- test_octal_value_equals()¶
- test_octal_value_equals_defines()¶
- test_octal_value_not_equals_quoted_defines()¶
- test_octal_value_quoted_expansion()¶
- test_string_value()¶
- test_undef_defined()¶
- test_undef_undefined()¶
- test_undefined_variable()¶
- test_value_quoted_expansion()¶
Quoted values on the commandline don’t currently have quotes stripped. Pike says this is for compat reasons.
- test_var_directory()¶
- test_var_file()¶
- test_var_if_0()¶
- test_var_if_0_elifdef()¶
- test_var_if_0_elifndef()¶
- test_var_ifdef_0()¶
- test_var_ifdef_1_or_undef()¶
- test_var_ifdef_undef()¶
- test_var_ifndef_0()¶
- test_var_ifndef_0_and_undef()¶
- test_var_ifndef_undef()¶
- test_var_line()¶
mozbuild.test.test_pythonutil module¶
- mozbuild.test.test_pythonutil.test_iter_modules_in_path()¶
mozbuild.test.test_rewrite_mozbuild module¶
- class mozbuild.test.test_rewrite_mozbuild.TestUtils(methodName='runTest')¶
Bases:
TestCase
- test_filenames_directory_is_in_filename_list()¶
- test_find_all_posible_assignments_from_filename()¶
- test_guess_best_assignment()¶
- test_mozbuild_adding()¶
- test_mozbuild_adding_internal()¶
- test_mozbuild_removing()¶
- test_mozbuild_removing_internal()¶
- test_normalize_filename()¶
- test_unnormalize_filename()¶
mozbuild.test.test_telemetry module¶
- mozbuild.test.test_telemetry.test_path_filtering()¶
- mozbuild.test.test_telemetry.test_path_filtering_in_objdir()¶
- mozbuild.test.test_telemetry.test_path_filtering_other_cwd(tmpdir)¶
mozbuild.test.test_telemetry_settings module¶
- class mozbuild.test.test_telemetry_settings.OtherSettings¶
Bases:
object
- config_settings = [('foo.bar', 'int', '', 1), ('build.abc', 'string', '', '')]¶
- mozbuild.test.test_telemetry_settings.load_settings_file(mozbuild_path, settings)¶
- mozbuild.test.test_telemetry_settings.record_enabled_telemetry(mozbuild_path, settings)¶
- mozbuild.test.test_telemetry_settings.settings()¶
- mozbuild.test.test_telemetry_settings.test_existing_build_section(tmpdir, settings)¶
- mozbuild.test.test_telemetry_settings.test_file_exists_no_build_section(tmpdir, settings)¶
- mozbuild.test.test_telemetry_settings.test_initialize_new_contributor_allow_telemetry(settings)¶
- mozbuild.test.test_telemetry_settings.test_initialize_new_contributor_deny_telemetry(settings)¶
- mozbuild.test.test_telemetry_settings.test_initialize_new_employee(settings)¶
- mozbuild.test.test_telemetry_settings.test_initialize_noop_when_request_error(settings)¶
- mozbuild.test.test_telemetry_settings.test_initialize_noop_when_telemetry_disabled_env(monkeypatch)¶
- mozbuild.test.test_telemetry_settings.test_malformed_file(tmpdir, settings)¶
Ensure that a malformed config file doesn’t cause breakage.
- mozbuild.test.test_telemetry_settings.test_nonexistent(tmpdir, settings)¶
- mozbuild.test.test_telemetry_settings.test_resolve_is_employee()¶
- mozbuild.test.test_telemetry_settings.write_config(mozbuild_path, contents)¶
mozbuild.test.test_util module¶
- class mozbuild.test.test_util.TestGroupUnifiedFiles(methodName='runTest')¶
Bases:
TestCase
- FILES = ['a.cpp', 'b.cpp', 'c.cpp', 'd.cpp', 'e.cpp', 'f.cpp', 'g.cpp', 'h.cpp', 'i.cpp', 'j.cpp', 'k.cpp', 'l.cpp', 'm.cpp', 'n.cpp', 'o.cpp', 'p.cpp', 'q.cpp', 'r.cpp', 's.cpp', 't.cpp', 'u.cpp', 'v.cpp', 'w.cpp', 'x.cpp', 'y.cpp', 'z.cpp']¶
- test_multiple_files()¶
- class mozbuild.test.test_util.TestHashing(methodName='runTest')¶
Bases:
TestCase
- test_hash_file_known_hash()¶
Ensure a known hash value is recreated.
- test_hash_file_large()¶
Ensure that hash_file seems to work with a large file.
- class mozbuild.test.test_util.TestHierarchicalStringList(methodName='runTest')¶
Bases:
TestCase
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- test_del_exports()¶
- test_exports_append()¶
- test_exports_multiple_subdir()¶
- test_exports_subdir()¶
- test_invalid_exports_append()¶
- test_invalid_exports_append_base()¶
- test_invalid_exports_bool()¶
- test_invalid_exports_set()¶
- test_merge()¶
- test_reassign()¶
- test_unsorted()¶
- test_walk()¶
- class mozbuild.test.test_util.TestMemoize(methodName='runTest')¶
Bases:
TestCase
- test_memoize()¶
- test_memoize_method()¶
- test_memoized_property()¶
- class mozbuild.test.test_util.TestMisc(methodName='runTest')¶
Bases:
TestCase
- test_expand_variables()¶
- test_pair()¶
- class mozbuild.test.test_util.TestResolveTargetToMake(methodName='runTest')¶
Bases:
TestCase
- assertResolve(path, expected)¶
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- test_Makefile()¶
- test_dir()¶
- test_regular_file()¶
- test_root_path()¶
- test_top_level()¶
- class mozbuild.test.test_util.TestStrictOrderingOnAppendList(methodName='runTest')¶
Bases:
TestCase
- test_add()¶
- test_add_StrictOrderingOnAppendList()¶
- test_add_after_iadd()¶
- test_extend()¶
- test_iadd()¶
- test_init()¶
- test_slicing()¶
- class mozbuild.test.test_util.TestStrictOrderingOnAppendListWithAction(methodName='runTest')¶
Bases:
TestCase
- assertSameList(expected, actual)¶
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- test_add()¶
- test_extend()¶
- test_iadd()¶
- test_init()¶
- test_slicing()¶
- class mozbuild.test.test_util.TestStrictOrderingOnAppendListWithFlagsFactory(methodName='runTest')¶
Bases:
TestCase
- test_strict_ordering_on_append_list_with_flags_factory()¶
- test_strict_ordering_on_append_list_with_flags_factory_extend()¶
- class mozbuild.test.test_util.TestTypedList(methodName='runTest')¶
Bases:
TestCase
- test_add()¶
- test_add_coercion()¶
- test_extend()¶
- test_iadd()¶
- test_init()¶
- test_memoized()¶
- test_slicing()¶
- class mozbuild.test.test_util.TestTypedNamedTuple(methodName='runTest')¶
Bases:
TestCase
- test_simple()¶
- class mozbuild.test.test_util.TypedTestStrictOrderingOnAppendList(methodName='runTest')¶
Bases:
TestCase
- test_init()¶
- mozbuild.test.test_util.test_read_only_dict()¶
mozbuild.test.test_util_fileavoidwrite module¶
Tests for the FileAvoidWrite object.
- mozbuild.test.test_util_fileavoidwrite.test_change_binary_file_contents(tmp_path)¶
- mozbuild.test.test_util_fileavoidwrite.test_diff_not_created_by_default(tmp_path)¶
- mozbuild.test.test_util_fileavoidwrite.test_diff_update(tmp_path)¶
- mozbuild.test.test_util_fileavoidwrite.test_no_write_happens_if_file_contents_same(tmp_path)¶
- mozbuild.test.test_util_fileavoidwrite.test_obj_as_context_manager(tmp_path)¶
- mozbuild.test.test_util_fileavoidwrite.test_overwrite_contents(tmp_path)¶
- mozbuild.test.test_util_fileavoidwrite.test_store_new_contents(tmp_path)¶
- mozbuild.test.test_util_fileavoidwrite.test_write_unicode(tmp_path)¶
- mozbuild.test.test_util_fileavoidwrite.tmp_path(tmpdir)¶
Backport of the tmp_path fixture from pytest 3.9.1.
mozbuild.test.test_vendor module¶
- mozbuild.test.test_vendor.test_up_to_date_vendor()¶
mozbuild.test.test_vendor_tools module¶
- mozbuild.test.test_vendor_tools.test_list_of_paths_to_readable_string()¶