test: skip infer test on Ubuntu 20 and below

This commit is contained in:
Amin Yahyaabadi 2024-09-19 14:06:59 -07:00
parent 69b2c1b021
commit 1e259843db
No known key found for this signature in database
GPG Key ID: F52AF77F636088F0
1 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,6 @@
import { info } from "ci-log"
import { isUbuntu } from "../../utils/env/isUbuntu.js"
import { ubuntuVersion } from "../../utils/env/ubuntu_version.js"
import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers.js"
import { getVersion } from "../../versions/versions.js"
import { setupInfer } from "../infer.js"
@ -6,6 +9,9 @@ jest.setTimeout(300000)
describe("setup-infer", () => {
if (process.platform === "win32") {
it("should skip infer tests on windows", () => {
expect(true).toBe(true)
})
return
}
@ -16,6 +22,12 @@ describe("setup-infer", () => {
})
it("should setup infer", async () => {
/* eslint-disable @typescript-eslint/no-non-null-asserted-optional-chain */
if (isUbuntu() && (await ubuntuVersion())?.[0]! <= 20) {
info("Skipping infer test on ubuntu 20 and below")
return
}
const { binDir } = await setupInfer(getVersion("infer", "true"), directory, process.arch)
await testBin("infer", ["--version"], binDir)
})