diff --git a/build/fbcode_builder/getdeps/builder.py b/build/fbcode_builder/getdeps/builder.py index e774eac9e12..237234a7fb3 100644 --- a/build/fbcode_builder/getdeps/builder.py +++ b/build/fbcode_builder/getdeps/builder.py @@ -145,12 +145,17 @@ def __init__( inst_dir, build_args, install_args, + test_args, ): super(MakeBuilder, self).__init__( build_opts, ctx, manifest, src_dir, build_dir, inst_dir ) self.build_args = build_args or [] self.install_args = install_args or [] + self.test_args = test_args + + def _get_prefix(self): + return ["PREFIX=" + self.inst_dir, "prefix=" + self.inst_dir] def _build(self, install_dirs, reconfigure): env = self._compute_env(install_dirs) @@ -161,17 +166,24 @@ def _build(self, install_dirs, reconfigure): cmd = ( ["make", "-j%s" % self.build_opts.num_jobs] + self.build_args - + ["PREFIX=" + self.inst_dir, "prefix=" + self.inst_dir] + + self._get_prefix() ) self._run_cmd(cmd, env=env) - install_cmd = ( - ["make"] - + self.install_args - + ["PREFIX=" + self.inst_dir, "prefix=" + self.inst_dir] - ) + install_cmd = ["make"] + self.install_args + self._get_prefix() self._run_cmd(install_cmd, env=env) + def run_tests( + self, install_dirs, schedule_type, owner, test_filter, retry, no_testpilot + ): + if not self.test_args: + return + + env = self._compute_env(install_dirs) + + cmd = ["make"] + self.test_args + self._get_prefix() + self._run_cmd(cmd, env=env) + class AutoconfBuilder(BuilderBase): def __init__(self, build_opts, ctx, manifest, src_dir, build_dir, inst_dir, args): diff --git a/build/fbcode_builder/getdeps/manifest.py b/build/fbcode_builder/getdeps/manifest.py index 1094deb97da..1e1526dcfaa 100644 --- a/build/fbcode_builder/getdeps/manifest.py +++ b/build/fbcode_builder/getdeps/manifest.py @@ -88,6 +88,7 @@ "b2.args": {"optional_section": True}, "make.build_args": {"optional_section": True}, "make.install_args": {"optional_section": True}, + "make.test_args": {"optional_section": True}, "header-only": {"optional_section": True, "fields": {"includedir": REQUIRED}}, "shipit.pathmap": {"optional_section": True}, "shipit.strip": {"optional_section": True}, @@ -437,6 +438,7 @@ def create_builder( # noqa:C901 if builder == "make": build_args = self.get_section_as_args("make.build_args", ctx) install_args = self.get_section_as_args("make.install_args", ctx) + test_args = self.get_section_as_args("make.test_args", ctx) return MakeBuilder( build_options, ctx, @@ -446,6 +448,7 @@ def create_builder( # noqa:C901 inst_dir, build_args, install_args, + test_args, ) if builder == "autoconf": diff --git a/build/fbcode_builder/manifests/mononoke b/build/fbcode_builder/manifests/mononoke index 9103a342898..7df92c77b3b 100644 --- a/build/fbcode_builder/manifests/mononoke +++ b/build/fbcode_builder/manifests/mononoke @@ -34,6 +34,7 @@ tools/rust/ossconfigs = . ^fbcode/eden/mononoke/Cargo\.toml$ ^fbcode/eden/mononoke/(?!public_autocargo).+/Cargo\.toml$ ^fbcode/configerator/structs/scm/mononoke/(?!public_autocargo).+/Cargo\.toml$ +^.*/facebook/.*$ [dependencies] fbthrift-source diff --git a/build/fbcode_builder/manifests/mononoke_integration b/build/fbcode_builder/manifests/mononoke_integration index 07a6d4a581f..a796e967e6a 100644 --- a/build/fbcode_builder/manifests/mononoke_integration +++ b/build/fbcode_builder/manifests/mononoke_integration @@ -18,6 +18,9 @@ build-getdeps [make.install_args] install-getdeps +[make.test_args] +test-getdeps + [shipit.pathmap] fbcode/eden/mononoke/tests/integration = eden/mononoke/tests/integration @@ -25,7 +28,10 @@ fbcode/eden/mononoke/tests/integration = eden/mononoke/tests/integration ^.*/facebook/.*$ [dependencies] +eden_scm +eden_scm_lib_edenapi_tools jq +mononoke nmap python-click python-dulwich