From cfb3c857b05f058a6bb9152e9bc7270855ecc3f5 Mon Sep 17 00:00:00 2001 From: Simone Basso Date: Thu, 12 Oct 2023 14:50:53 +0200 Subject: [PATCH] [backport] cleanup(buildtool): disable unit tests when building tor This diff backports #1368 to the release/3.19 branch. We're building unit tests for no reason. Also, unit tests do not build for iOS. So, let's stop building them. Part of https://github.com/ooni/probe/issues/2564 --- internal/cmd/buildtool/android_test.go | 4 ++++ internal/cmd/buildtool/cdepstor.go | 1 + internal/cmd/buildtool/linuxcdeps_test.go | 1 + 3 files changed, 6 insertions(+) diff --git a/internal/cmd/buildtool/android_test.go b/internal/cmd/buildtool/android_test.go index 416a857d2d..7daa564dfb 100644 --- a/internal/cmd/buildtool/android_test.go +++ b/internal/cmd/buildtool/android_test.go @@ -1701,6 +1701,7 @@ func TestAndroidBuildCdepsTor(t *testing.T) { "--disable-tool-name-check", "--disable-systemd", "--prefix=/", + "--disable-unittests", }, }, { Env: []string{}, @@ -1777,6 +1778,7 @@ func TestAndroidBuildCdepsTor(t *testing.T) { "--disable-tool-name-check", "--disable-systemd", "--prefix=/", + "--disable-unittests", }, }, { Env: []string{}, @@ -1853,6 +1855,7 @@ func TestAndroidBuildCdepsTor(t *testing.T) { "--disable-tool-name-check", "--disable-systemd", "--prefix=/", + "--disable-unittests", }, }, { Env: []string{}, @@ -1929,6 +1932,7 @@ func TestAndroidBuildCdepsTor(t *testing.T) { "--disable-tool-name-check", "--disable-systemd", "--prefix=/", + "--disable-unittests", }, }, { Env: []string{}, diff --git a/internal/cmd/buildtool/cdepstor.go b/internal/cmd/buildtool/cdepstor.go index 0098b0ff03..2c47aa7a22 100644 --- a/internal/cmd/buildtool/cdepstor.go +++ b/internal/cmd/buildtool/cdepstor.go @@ -56,6 +56,7 @@ func cdepsTorBuildMain(globalEnv *cBuildEnv, deps buildtoolmodel.Dependencies) { "--disable-tool-name-check", "--disable-systemd", "--prefix=/", + "--disable-unittests", ) runtimex.Try0(shellx.RunEx(defaultShellxConfig(), argv, envp)) diff --git a/internal/cmd/buildtool/linuxcdeps_test.go b/internal/cmd/buildtool/linuxcdeps_test.go index 87a5f6cbeb..85ca172934 100644 --- a/internal/cmd/buildtool/linuxcdeps_test.go +++ b/internal/cmd/buildtool/linuxcdeps_test.go @@ -346,6 +346,7 @@ func TestLinuxCdepsBuildMain(t *testing.T) { "--disable-tool-name-check", "--disable-systemd", "--prefix=/", + "--disable-unittests", }, }, { Env: []string{},