mirror of https://github.com/aminya/setup-cpp
test: fix the mingw setupDir
This commit is contained in:
parent
c667a3fe8e
commit
97b65fabfc
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,4 @@
|
|||
import { testBin } from "../../utils/tests/test-helpers"
|
||||
import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers"
|
||||
import { setupGcc } from "../gcc"
|
||||
import { getVersion } from "../../default_versions"
|
||||
import path from "path"
|
||||
|
@ -8,9 +8,14 @@ import { chmodSync } from "fs"
|
|||
|
||||
jest.setTimeout(3000000)
|
||||
describe("setup-gcc", () => {
|
||||
let directory: string
|
||||
beforeAll(async () => {
|
||||
directory = await setupTmpDir("doxygen")
|
||||
})
|
||||
|
||||
it("should setup gcc", async () => {
|
||||
const version = getVersion("gcc", undefined) || "11"
|
||||
const installInfo = await setupGcc(version, "", process.arch)
|
||||
const version = getVersion("gcc", undefined)
|
||||
const installInfo = await setupGcc(version, directory, process.arch)
|
||||
|
||||
let gpp = "g++"
|
||||
if (process.platform !== "win32") {
|
||||
|
@ -30,4 +35,8 @@ describe("setup-gcc", () => {
|
|||
}
|
||||
execa.sync(main_exe, { cwd: __dirname, stdio: "inherit" })
|
||||
})
|
||||
|
||||
afterAll(async () => {
|
||||
await cleanupTmpDir("doxygen")
|
||||
}, 100000)
|
||||
})
|
||||
|
|
Binary file not shown.
|
@ -44,7 +44,7 @@ function getGccPackageInfo(version: string, platform: NodeJS.Platform, arch: str
|
|||
const mingwArch = arch === "ia32" ? "i686" : "x86_64"
|
||||
const exceptionModel: "seh" | "dwarf" = "seh" // SEH is native windows exception model https://github.com/brechtsanders/winlibs_mingw/issues/4#issuecomment-599296483
|
||||
return {
|
||||
binRelativeDir: "./bin",
|
||||
binRelativeDir: "bin/",
|
||||
binFileName: addBinExtension("g++"),
|
||||
extractedFolderName: "mingw64",
|
||||
extractFunction: extract7Zip,
|
||||
|
|
Loading…
Reference in New Issue