fix: return the installInfo object from setupPipPack

This commit is contained in:
Amin Yahyaabadi 2021-09-16 11:54:36 -05:00
parent ecb7cdd120
commit e6a4d529fc
5 changed files with 6 additions and 9 deletions

View File

@ -1,12 +1,11 @@
import { setupConan } from "../conan" import { setupConan } from "../conan"
import { testBin } from "../../utils/tests/test-helpers" import { testBin } from "../../utils/tests/test-helpers"
import { InstallationInfo } from "../../utils/setup/setupBin"
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("", "", "")
await testBin("conan", ["--version"], (installInfo as InstallationInfo | undefined)?.binDir) await testBin("conan", ["--version"], installInfo.binDir)
}) })
}) })

View File

@ -1,11 +1,10 @@
import { setupGcovr } from "../gcovr" import { setupGcovr } from "../gcovr"
import { testBin } from "../../utils/tests/test-helpers" import { testBin } from "../../utils/tests/test-helpers"
import { InstallationInfo } from "../../utils/setup/setupBin"
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("", "", "")
await testBin("gcovr", ["--version"], (installInfo as InstallationInfo | undefined)?.binDir) await testBin("gcovr", ["--version"], installInfo.binDir)
}) })
}) })

View File

@ -1,6 +1,6 @@
import { setupPipPack } from "../utils/setup/setupPipPack" import { setupPipPack } from "../utils/setup/setupPipPack"
// eslint-disable-next-line @typescript-eslint/no-unused-vars // eslint-disable-next-line @typescript-eslint/no-unused-vars
export async function setupGcovr(version: string | undefined, _setupCppDir: string, _arch: string) { export function setupGcovr(version: string | undefined, _setupCppDir: string, _arch: string) {
await setupPipPack("gcovr", version) return setupPipPack("gcovr", version)
} }

View File

@ -1,12 +1,11 @@
import { setupMeson } from "../meson" import { setupMeson } from "../meson"
import { testBin } from "../../utils/tests/test-helpers" import { testBin } from "../../utils/tests/test-helpers"
import { InstallationInfo } from "../../utils/setup/setupBin"
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("", "", "")
await testBin("meson", ["--version"], (installInfo as InstallationInfo | undefined)?.binDir) await testBin("meson", ["--version"], installInfo.binDir)
}) })
}) })

View File

@ -44,5 +44,5 @@ export async function setupPipPack(name: string, version?: string) {
} }
} }
return binDir return { binDir }
} }