fix: increase test timeout

This commit is contained in:
Amin Yahyaabadi 2021-09-15 02:32:16 -05:00
parent db46f34a80
commit fb4b68daca
8 changed files with 13 additions and 16 deletions

View File

@ -1,8 +1,7 @@
import { setupChocolatey } from "../chocolatey"
import { spawnSync as spawn } from "child_process"
jest.setTimeout(100000)
jest.setTimeout(200000)
describe("setup-chocolatey", () => {
it("should setup chocolatey", async () => {
if (process.platform !== "win32") {

View File

@ -1,8 +1,7 @@
import { setupCmake } from "../cmake"
import { setupTmpDir, cleanupTmpDir, testBin } from "../../utils/tests/test-helpers"
jest.setTimeout(100000)
jest.setTimeout(200000)
async function testCmake(directory: string) {
const { binDir } = await setupCmake("3.20.2", directory)
testBin("cmake", binDir)

View File

@ -1,8 +1,7 @@
import { setupConan } from "../conan"
import { spawnSync as spawn } from "child_process"
jest.setTimeout(100000)
jest.setTimeout(200000)
describe("setup-conan", () => {
it("should setup conan", async () => {
await setupConan("1.40.1")

View File

@ -1,8 +1,7 @@
import { setupGcovr } from "../gcovr"
import { spawnSync as spawn } from "child_process"
jest.setTimeout(100000)
jest.setTimeout(200000)
describe("setup-gcovr", () => {
it("should setup gcovr", async () => {
await setupGcovr("5.0")

View File

@ -5,8 +5,7 @@ import { addBinExtension } from "../../utils/setup/setupBin"
import { join } from "path"
import { spawnSync as spawn } from "child_process"
jest.setTimeout(100000)
jest.setTimeout(200000)
async function testUrl(version: string) {
const [specificVersion, url] = await getSpecificVersionAndUrl(process.platform, version)

View File

@ -1,8 +1,7 @@
import { setupMeson } from "../meson"
import { spawnSync as spawn } from "child_process"
jest.setTimeout(100000)
jest.setTimeout(200000)
describe("setup-meson", () => {
it("should setup meson", async () => {
await setupMeson("0.59.1")

View File

@ -1,8 +1,7 @@
import { setupNinja } from "../ninja"
import { setupTmpDir, cleanupTmpDir, testBin } from "../../utils/tests/test-helpers"
jest.setTimeout(100000)
jest.setTimeout(200000)
async function testNinja(directory: string) {
const { binDir } = await setupNinja("1.10.2", directory)
testBin("ninja", binDir)

View File

@ -7,8 +7,12 @@ import { join } from "path"
export async function setupTmpDir(testName: string) {
const tempDirectory = path.join(tmpdir(), "setup-cpp", testName)
await io.rmRF(tempDirectory)
await io.mkdirP(tempDirectory)
try {
await io.rmRF(tempDirectory)
await io.mkdirP(tempDirectory)
} catch {
console.log("Failed to remove test directories")
}
process.env.SETUP_CPP_DIR = tempDirectory
const toolCache = path.join(tmpdir(), "setup-cpp", "ToolCache")