mozbuild.test.backend package¶
Submodules¶
mozbuild.test.backend.common module¶
mozbuild.test.backend.test_build module¶
- class mozbuild.test.backend.test_build.TestBuild(methodName='runTest')¶
Bases:
TestCase
- do_test_backend(*backends, **kwargs)¶
- line_handler()¶
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- tearDown()¶
Hook method for deconstructing the test fixture after testing it.
- test_faster_make()¶
- test_faster_recursive_make()¶
- test_recursive_make()¶
- validate(config)¶
- mozbuild.test.backend.test_build.make_path()¶
mozbuild.test.backend.test_configenvironment module¶
- class mozbuild.test.backend.test_configenvironment.ConfigEnvironment(*args, **kwargs)¶
Bases:
ConfigEnvironment
mozbuild.test.backend.test_database module¶
- class mozbuild.test.backend.test_database.TestCompileDBBackends(methodName='runTest')¶
Bases:
BackendTester
- perform_check(compile_commands_path, topsrcdir, topobjdir)¶
- test_clangd()¶
Ensure we can generate a compile_commands.json and that is correct. in order to be used by ClandBackend
- test_database()¶
Ensure we can generate a compile_commands.json and that is correct.
- test_static_analysis()¶
Ensure we can generate a compile_commands.json and that is correct. in order to be used by StaticAnalysisBackend
mozbuild.test.backend.test_fastermake module¶
- class mozbuild.test.backend.test_fastermake.TestFasterMakeBackend(methodName='runTest')¶
Bases:
BackendTester
- test_basic()¶
Ensure the FasterMakeBackend works without error.
- test_final_target_files_wildcard()¶
Ensure that wildcards in FINAL_TARGET_FILES work properly.
mozbuild.test.backend.test_partialconfigenvironment module¶
- class mozbuild.test.backend.test_partialconfigenvironment.TestPartial(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_auto_substs()¶
Test the automatically set values of ACDEFINES, and ALLDEFINES
- test_dependencies()¶
Test getting dependencies on defines and substs.
- test_env_override()¶
Test overriding a subst with an environment variable
- test_remove_subst()¶
Test removing a subst from the config. The file should be overwritten with ‘None’
- test_set_subst()¶
Test setting a subst
- test_update()¶
Test calling update on the substs or defines pseudo dicts
mozbuild.test.backend.test_recursivemake module¶
- class mozbuild.test.backend.test_recursivemake.TestRecursiveMakeBackend(methodName='runTest')¶
Bases:
BackendTester
- test_backend_mk()¶
Ensure backend.mk file is written out properly.
- test_basic()¶
Ensure the RecursiveMakeBackend works without error.
- test_config()¶
Test that CONFIGURE_SUBST_FILES are properly handled.
- test_defines()¶
Test that DEFINES are written to backend.mk correctly.
- test_exports()¶
Ensure EXPORTS is handled properly.
- test_exports_generated()¶
Ensure EXPORTS that are listed in GENERATED_FILES are handled properly.
- test_final_target()¶
Test that FINAL_TARGET is written to backend.mk correctly.
- test_final_target_pp_files()¶
Test that FINAL_TARGET_PP_FILES is written to backend.mk correctly.
- test_generated_files()¶
Ensure GENERATED_FILES is handled properly.
- test_generated_files_force()¶
Ensure GENERATED_FILES with .force is handled properly.
- test_generated_includes()¶
Test that GENERATED_INCLUDES are written to backend.mk correctly.
- test_host_rust_library()¶
Test that a Rust library is written to backend.mk correctly.
- test_host_rust_library_with_features()¶
Test that a host Rust library with features is written to backend.mk correctly.
- test_install_manifests_package_tests()¶
Ensure test suites honor package_tests=False.
- test_install_manifests_written()¶
- test_install_substitute_config_files()¶
Ensure we recurse into the dirs that install substituted config files.
- test_ipdl_sources()¶
Test that PREPROCESSED_IPDL_SOURCES and IPDL_SOURCES are written to ipdlsrcs.mk correctly.
- test_jar_manifests()¶
- test_linkage()¶
- test_list_files()¶
- test_local_includes()¶
Test that LOCAL_INCLUDES are written to backend.mk correctly.
- test_localized_files()¶
Test that LOCALIZED_FILES is written to backend.mk correctly.
- test_localized_generated_files()¶
Ensure LOCALIZED_GENERATED_FILES is handled properly.
- test_localized_generated_files_AB_CD()¶
Ensure LOCALIZED_GENERATED_FILES is handled properly when {AB_CD} and {AB_rCD} are used.
- test_localized_generated_files_force()¶
Ensure LOCALIZED_GENERATED_FILES with .force is handled properly.
- test_localized_pp_files()¶
Test that LOCALIZED_PP_FILES is written to backend.mk correctly.
- test_makefile_conversion()¶
Ensure Makefile.in is converted properly.
- test_missing_makefile_in()¶
Ensure missing Makefile.in results in Makefile creation.
- test_mtime_no_change()¶
Ensure mtime is not updated if file content does not change.
- test_old_install_manifest_deleted()¶
- test_output_files()¶
Ensure proper files are generated.
- test_prog_lib_c_only()¶
Test that C-only binary artifacts are marked as such.
- test_program_paths()¶
PROGRAMs with various moz.build settings that change the destination should produce the expected paths in backend.mk.
- test_resources()¶
Ensure RESOURCE_FILES is handled properly.
- test_rust_library()¶
Test that a Rust library is written to backend.mk correctly.
- test_rust_library_with_features()¶
Test that a Rust library with features is written to backend.mk correctly.
- test_rust_programs()¶
Test that {HOST_,}RUST_PROGRAMS are written to backend.mk correctly.
SHARED_LIBRARYs with various moz.build settings that change the destination should produce the expected paths in backend.mk.
- test_sources()¶
Ensure SOURCES, HOST_SOURCES and WASM_SOURCES are handled properly.
- test_substitute_config_files()¶
Ensure substituted config files are produced.
- test_test_manifest_deffered_installs_written()¶
Shared support files are written to their own data file by the backend.
- test_test_manifest_pattern_matches_recorded()¶
Pattern matches in test manifests’ support-files should be recorded.
- test_test_manifests_duplicate_support_files()¶
Ensure duplicate support-files in test manifests work.
- test_test_manifests_files_written()¶
Ensure test manifests get turned into files.
- test_test_support_files_tracked()¶
- test_variable_passthru()¶
Ensure variable passthru is written out correctly.
- test_xpidl_generation()¶
Ensure xpidl files and directories are written out.
mozbuild.test.backend.test_test_manifest module¶
- class mozbuild.test.backend.test_test_manifest.TestTestManifestBackend(methodName='runTest')¶
Bases:
BackendTester
- test_all_tests_metadata_file_written()¶
Ensure all-tests.pkl is generated.
- test_test_defaults_metadata_file_written()¶
Ensure test-defaults.pkl is generated.
- test_test_installs_metadata_file_written()¶
Ensure test-installs.pkl is generated.
- test_test_manifest_sources()¶
Ensure that backend sources are generated correctly.
mozbuild.test.backend.test_visualstudio module¶
- class mozbuild.test.backend.test_visualstudio.TestVisualStudioBackend(methodName='runTest')¶
Bases:
BackendTester
- test_basic()¶
Ensure we can consume our stub project.