From 3c2eaf1f4d0e1168c7577f2c19d68f7cc6b9ac11 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Thu, 16 Sep 2021 17:34:54 -0500 Subject: [PATCH] test: test proces.arch --- src/brew/__tests__/brew.test.ts | 2 +- src/ccache/__tests__/ccache.test.ts | 2 +- src/chocolatey/__tests__/chocolatey.test.ts | 2 +- src/conan/__tests__/conan.test.ts | 2 +- src/cppcheck/__tests__/cppcheck.test.ts | 2 +- src/doxygen/__tests__/doxygen.test.ts | 2 +- src/gcc/__tests__/gcc.test.ts | 2 +- src/gcovr/__tests__/gcovr.test.ts | 2 +- src/meson/__tests__/meson.test.ts | 2 +- src/msvc/__tests__/msvc.test.ts | 2 +- src/opencppcoverage/__tests__/opencppcoverage.test.ts | 2 +- src/utils/setup/setupBrewPack.ts | 2 +- src/utils/setup/setupChocoPack.ts | 2 +- src/utils/setup/setupPipPack.ts | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/brew/__tests__/brew.test.ts b/src/brew/__tests__/brew.test.ts index ea71437e..ad1b6c55 100644 --- a/src/brew/__tests__/brew.test.ts +++ b/src/brew/__tests__/brew.test.ts @@ -7,7 +7,7 @@ describe("setup-brew", () => { if (process.platform !== "darwin") { return } - const installInfo = setupBrew("", "", "") + const installInfo = setupBrew("", "", process.arch) await testBin("brew", ["--version"], installInfo?.binDir) }) }) diff --git a/src/ccache/__tests__/ccache.test.ts b/src/ccache/__tests__/ccache.test.ts index c2ac9855..441eea0c 100644 --- a/src/ccache/__tests__/ccache.test.ts +++ b/src/ccache/__tests__/ccache.test.ts @@ -5,7 +5,7 @@ import { InstallationInfo } from "../../utils/setup/setupBin" jest.setTimeout(200000) describe("setup-ccache", () => { it("should setup ccache", async () => { - const installInfo = await setupCcache("", "", "") + const installInfo = await setupCcache("", "", process.arch) await testBin("ccache", ["--version"], (installInfo as InstallationInfo | undefined)?.binDir) }) diff --git a/src/chocolatey/__tests__/chocolatey.test.ts b/src/chocolatey/__tests__/chocolatey.test.ts index 1bd5b310..b90c049c 100644 --- a/src/chocolatey/__tests__/chocolatey.test.ts +++ b/src/chocolatey/__tests__/chocolatey.test.ts @@ -8,7 +8,7 @@ describe("setup-chocolatey", () => { if (process.platform !== "win32") { return } - const { binDir } = (await setupChocolatey("", "", "")) as InstallationInfo + const { binDir } = (await setupChocolatey("", "", process.arch)) as InstallationInfo await testBin("choco", ["--version"], binDir) }) }) diff --git a/src/conan/__tests__/conan.test.ts b/src/conan/__tests__/conan.test.ts index 3823fee7..c836dd1d 100644 --- a/src/conan/__tests__/conan.test.ts +++ b/src/conan/__tests__/conan.test.ts @@ -4,7 +4,7 @@ import { testBin } from "../../utils/tests/test-helpers" jest.setTimeout(200000) describe("setup-conan", () => { it("should setup conan", async () => { - const installInfo = await setupConan("", "", "") + const installInfo = await setupConan("", "", process.arch) await testBin("conan", ["--version"], installInfo.binDir) }) diff --git a/src/cppcheck/__tests__/cppcheck.test.ts b/src/cppcheck/__tests__/cppcheck.test.ts index ece76f50..6e96734e 100644 --- a/src/cppcheck/__tests__/cppcheck.test.ts +++ b/src/cppcheck/__tests__/cppcheck.test.ts @@ -5,7 +5,7 @@ import { InstallationInfo } from "../../utils/setup/setupBin" jest.setTimeout(200000) describe("setup-cppcheck", () => { it("should setup cppcheck", async () => { - const installInfo = await setupCppcheck("", "", "") + const installInfo = await setupCppcheck("", "", process.arch) await testBin("cppcheck", ["--version"], (installInfo as InstallationInfo | undefined)?.binDir) }) diff --git a/src/doxygen/__tests__/doxygen.test.ts b/src/doxygen/__tests__/doxygen.test.ts index b534ee8b..fe5e5112 100644 --- a/src/doxygen/__tests__/doxygen.test.ts +++ b/src/doxygen/__tests__/doxygen.test.ts @@ -5,7 +5,7 @@ import { InstallationInfo } from "../../utils/setup/setupBin" jest.setTimeout(200000) describe("setup-doxygen", () => { it("should setup doxygen", async () => { - const installInfo = await setupDoxygen("", "", "") + const installInfo = await setupDoxygen("", "", process.arch) await testBin("doxygen", ["--version"], (installInfo as InstallationInfo | undefined)?.binDir) }) diff --git a/src/gcc/__tests__/gcc.test.ts b/src/gcc/__tests__/gcc.test.ts index b0ef0e46..366cf994 100644 --- a/src/gcc/__tests__/gcc.test.ts +++ b/src/gcc/__tests__/gcc.test.ts @@ -4,7 +4,7 @@ import { setupGcc } from "../gcc" jest.setTimeout(200000) describe("setup-gcc", () => { it("should setup gcc", async () => { - const installInfo = await setupGcc("11", "", "") + const installInfo = await setupGcc("11", "", process.arch) await testBin("g++", ["--version"], installInfo?.binDir) }) diff --git a/src/gcovr/__tests__/gcovr.test.ts b/src/gcovr/__tests__/gcovr.test.ts index 3ef4b7a9..644e2300 100644 --- a/src/gcovr/__tests__/gcovr.test.ts +++ b/src/gcovr/__tests__/gcovr.test.ts @@ -4,7 +4,7 @@ import { testBin } from "../../utils/tests/test-helpers" jest.setTimeout(200000) describe("setup-gcovr", () => { it("should setup gcovr", async () => { - const installInfo = await setupGcovr("", "", "") + const installInfo = await setupGcovr("", "", process.arch) await testBin("gcovr", ["--version"], installInfo.binDir) }) }) diff --git a/src/meson/__tests__/meson.test.ts b/src/meson/__tests__/meson.test.ts index 6001f553..3e219cb1 100644 --- a/src/meson/__tests__/meson.test.ts +++ b/src/meson/__tests__/meson.test.ts @@ -4,7 +4,7 @@ import { testBin } from "../../utils/tests/test-helpers" jest.setTimeout(200000) describe("setup-meson", () => { it("should setup meson", async () => { - const installInfo = await setupMeson("", "", "") + const installInfo = await setupMeson("", "", process.arch) await testBin("meson", ["--version"], installInfo.binDir) }) diff --git a/src/msvc/__tests__/msvc.test.ts b/src/msvc/__tests__/msvc.test.ts index 4239fc5e..09c76133 100644 --- a/src/msvc/__tests__/msvc.test.ts +++ b/src/msvc/__tests__/msvc.test.ts @@ -7,7 +7,7 @@ describe("setup-msvc", () => { if (process.platform !== "win32") { return } - await setupMSVC("2019", "", "") + await setupMSVC("2019", "", process.arch) try { await testBin("cl", []) diff --git a/src/opencppcoverage/__tests__/opencppcoverage.test.ts b/src/opencppcoverage/__tests__/opencppcoverage.test.ts index 3a561049..e78925d2 100644 --- a/src/opencppcoverage/__tests__/opencppcoverage.test.ts +++ b/src/opencppcoverage/__tests__/opencppcoverage.test.ts @@ -7,7 +7,7 @@ describe("setup-OpenCppCoverage", () => { if (process.platform !== "win32") { return } - await setupOpencppcoverage("", "", "") + await setupOpencppcoverage("", "", process.arch) await testBin("OpenCppCoverage") }) diff --git a/src/utils/setup/setupBrewPack.ts b/src/utils/setup/setupBrewPack.ts index 8eb294b2..31effbdc 100644 --- a/src/utils/setup/setupBrewPack.ts +++ b/src/utils/setup/setupBrewPack.ts @@ -9,7 +9,7 @@ let hasBrew = false /** A function that installs a package using brew */ export function setupBrewPack(name: string, version?: string): InstallationInfo { if (!hasBrew || which.sync("brew", { nothrow: true }) === null) { - setupBrew("", "", "") + setupBrew("", "", process.arch) hasBrew = true } diff --git a/src/utils/setup/setupChocoPack.ts b/src/utils/setup/setupChocoPack.ts index d9d3448b..0e3cacc4 100644 --- a/src/utils/setup/setupChocoPack.ts +++ b/src/utils/setup/setupChocoPack.ts @@ -9,7 +9,7 @@ let hasChoco = false /** A function that installs a package using choco */ export async function setupChocoPack(name: string, version?: string, args: string[] = []): Promise { if (!hasChoco || which.sync("choco", { nothrow: true }) === null) { - await setupChocolatey("", "", "") + await setupChocolatey("", "", process.arch) hasChoco = true } diff --git a/src/utils/setup/setupPipPack.ts b/src/utils/setup/setupPipPack.ts index 508ebbd7..398a9423 100644 --- a/src/utils/setup/setupPipPack.ts +++ b/src/utils/setup/setupPipPack.ts @@ -19,7 +19,7 @@ export async function setupPipPack(name: string, version?: string) { } else if (which.sync("pip", { nothrow: true }) !== null && (await isBinUptoDate("python", "3.0.0"))) { pip = "pip" } else { - await setupPython("3.x", "", "") + await setupPython("3.x", "", process.arch) pip = "pip3" } }