test: test proces.arch

This commit is contained in:
Amin Yahyaabadi 2021-09-16 17:34:54 -05:00
parent 7492e96c57
commit 3c2eaf1f4d
14 changed files with 14 additions and 14 deletions

View File

@ -7,7 +7,7 @@ describe("setup-brew", () => {
if (process.platform !== "darwin") { if (process.platform !== "darwin") {
return return
} }
const installInfo = setupBrew("", "", "") const installInfo = setupBrew("", "", process.arch)
await testBin("brew", ["--version"], installInfo?.binDir) await testBin("brew", ["--version"], installInfo?.binDir)
}) })
}) })

View File

@ -5,7 +5,7 @@ import { InstallationInfo } from "../../utils/setup/setupBin"
jest.setTimeout(200000) jest.setTimeout(200000)
describe("setup-ccache", () => { describe("setup-ccache", () => {
it("should setup ccache", async () => { it("should setup ccache", async () => {
const installInfo = await setupCcache("", "", "") const installInfo = await setupCcache("", "", process.arch)
await testBin("ccache", ["--version"], (installInfo as InstallationInfo | undefined)?.binDir) await testBin("ccache", ["--version"], (installInfo as InstallationInfo | undefined)?.binDir)
}) })

View File

@ -8,7 +8,7 @@ describe("setup-chocolatey", () => {
if (process.platform !== "win32") { if (process.platform !== "win32") {
return return
} }
const { binDir } = (await setupChocolatey("", "", "")) as InstallationInfo const { binDir } = (await setupChocolatey("", "", process.arch)) as InstallationInfo
await testBin("choco", ["--version"], binDir) await testBin("choco", ["--version"], binDir)
}) })
}) })

View File

@ -4,7 +4,7 @@ import { testBin } from "../../utils/tests/test-helpers"
jest.setTimeout(200000) jest.setTimeout(200000)
describe("setup-conan", () => { describe("setup-conan", () => {
it("should setup conan", async () => { it("should setup conan", async () => {
const installInfo = await setupConan("", "", "") const installInfo = await setupConan("", "", process.arch)
await testBin("conan", ["--version"], installInfo.binDir) await testBin("conan", ["--version"], installInfo.binDir)
}) })

View File

@ -5,7 +5,7 @@ import { InstallationInfo } from "../../utils/setup/setupBin"
jest.setTimeout(200000) jest.setTimeout(200000)
describe("setup-cppcheck", () => { describe("setup-cppcheck", () => {
it("should setup cppcheck", async () => { it("should setup cppcheck", async () => {
const installInfo = await setupCppcheck("", "", "") const installInfo = await setupCppcheck("", "", process.arch)
await testBin("cppcheck", ["--version"], (installInfo as InstallationInfo | undefined)?.binDir) await testBin("cppcheck", ["--version"], (installInfo as InstallationInfo | undefined)?.binDir)
}) })

View File

@ -5,7 +5,7 @@ import { InstallationInfo } from "../../utils/setup/setupBin"
jest.setTimeout(200000) jest.setTimeout(200000)
describe("setup-doxygen", () => { describe("setup-doxygen", () => {
it("should setup doxygen", async () => { it("should setup doxygen", async () => {
const installInfo = await setupDoxygen("", "", "") const installInfo = await setupDoxygen("", "", process.arch)
await testBin("doxygen", ["--version"], (installInfo as InstallationInfo | undefined)?.binDir) await testBin("doxygen", ["--version"], (installInfo as InstallationInfo | undefined)?.binDir)
}) })

View File

@ -4,7 +4,7 @@ import { setupGcc } from "../gcc"
jest.setTimeout(200000) jest.setTimeout(200000)
describe("setup-gcc", () => { describe("setup-gcc", () => {
it("should setup gcc", async () => { it("should setup gcc", async () => {
const installInfo = await setupGcc("11", "", "") const installInfo = await setupGcc("11", "", process.arch)
await testBin("g++", ["--version"], installInfo?.binDir) await testBin("g++", ["--version"], installInfo?.binDir)
}) })

View File

@ -4,7 +4,7 @@ import { testBin } from "../../utils/tests/test-helpers"
jest.setTimeout(200000) jest.setTimeout(200000)
describe("setup-gcovr", () => { describe("setup-gcovr", () => {
it("should setup gcovr", async () => { it("should setup gcovr", async () => {
const installInfo = await setupGcovr("", "", "") const installInfo = await setupGcovr("", "", process.arch)
await testBin("gcovr", ["--version"], installInfo.binDir) await testBin("gcovr", ["--version"], installInfo.binDir)
}) })
}) })

View File

@ -4,7 +4,7 @@ import { testBin } from "../../utils/tests/test-helpers"
jest.setTimeout(200000) jest.setTimeout(200000)
describe("setup-meson", () => { describe("setup-meson", () => {
it("should setup meson", async () => { it("should setup meson", async () => {
const installInfo = await setupMeson("", "", "") const installInfo = await setupMeson("", "", process.arch)
await testBin("meson", ["--version"], installInfo.binDir) await testBin("meson", ["--version"], installInfo.binDir)
}) })

View File

@ -7,7 +7,7 @@ describe("setup-msvc", () => {
if (process.platform !== "win32") { if (process.platform !== "win32") {
return return
} }
await setupMSVC("2019", "", "") await setupMSVC("2019", "", process.arch)
try { try {
await testBin("cl", []) await testBin("cl", [])

View File

@ -7,7 +7,7 @@ describe("setup-OpenCppCoverage", () => {
if (process.platform !== "win32") { if (process.platform !== "win32") {
return return
} }
await setupOpencppcoverage("", "", "") await setupOpencppcoverage("", "", process.arch)
await testBin("OpenCppCoverage") await testBin("OpenCppCoverage")
}) })

View File

@ -9,7 +9,7 @@ let hasBrew = false
/** A function that installs a package using brew */ /** A function that installs a package using brew */
export function setupBrewPack(name: string, version?: string): InstallationInfo { export function setupBrewPack(name: string, version?: string): InstallationInfo {
if (!hasBrew || which.sync("brew", { nothrow: true }) === null) { if (!hasBrew || which.sync("brew", { nothrow: true }) === null) {
setupBrew("", "", "") setupBrew("", "", process.arch)
hasBrew = true hasBrew = true
} }

View File

@ -9,7 +9,7 @@ let hasChoco = false
/** A function that installs a package using choco */ /** A function that installs a package using choco */
export async function setupChocoPack(name: string, version?: string, args: string[] = []): Promise<InstallationInfo> { export async function setupChocoPack(name: string, version?: string, args: string[] = []): Promise<InstallationInfo> {
if (!hasChoco || which.sync("choco", { nothrow: true }) === null) { if (!hasChoco || which.sync("choco", { nothrow: true }) === null) {
await setupChocolatey("", "", "") await setupChocolatey("", "", process.arch)
hasChoco = true hasChoco = true
} }

View File

@ -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"))) { } else if (which.sync("pip", { nothrow: true }) !== null && (await isBinUptoDate("python", "3.0.0"))) {
pip = "pip" pip = "pip"
} else { } else {
await setupPython("3.x", "", "") await setupPython("3.x", "", process.arch)
pip = "pip3" pip = "pip3"
} }
} }