2021-09-16 23:15:43 +08:00
|
|
|
import { testBin } from "../../utils/tests/test-helpers"
|
2021-09-16 22:03:54 +08:00
|
|
|
import { setupGcc } from "../gcc"
|
2021-09-17 07:21:11 +08:00
|
|
|
import { getVersion } from "../../default_versions"
|
2021-09-16 22:03:54 +08:00
|
|
|
|
2021-12-07 21:45:29 +08:00
|
|
|
jest.setTimeout(3000000)
|
2021-09-16 22:03:54 +08:00
|
|
|
describe("setup-gcc", () => {
|
|
|
|
it("should setup gcc", async () => {
|
2021-09-17 07:21:11 +08:00
|
|
|
const version = getVersion("gcc", undefined) ?? "11"
|
|
|
|
const installInfo = await setupGcc(version, "", process.arch)
|
2021-09-16 22:03:54 +08:00
|
|
|
|
2021-09-17 07:15:25 +08:00
|
|
|
let gpp = "g++"
|
|
|
|
if (process.platform !== "win32") {
|
2021-09-17 07:21:11 +08:00
|
|
|
gpp = `g++-${version}`
|
2021-09-17 07:15:25 +08:00
|
|
|
}
|
|
|
|
await testBin(gpp, ["--version"], installInfo?.binDir)
|
2021-09-16 22:03:54 +08:00
|
|
|
})
|
|
|
|
})
|