Tests: simplify beforeEach configuration

Remove legacy settings for previous CI providers/hardware
This commit is contained in:
Lovell Fuller 2022-11-15 09:27:09 +00:00
parent ac0dc10bd5
commit 4490a93430
2 changed files with 4 additions and 7 deletions

View File

@ -1,13 +1,10 @@
'use strict'; 'use strict';
const detectLibc = require('detect-libc');
const sharp = require('../'); const sharp = require('../');
const libcFamily = detectLibc.familySync(); const usingCache = !process.env.G_DEBUG;
const usingCache = !(process.env.G_DEBUG || libcFamily === detectLibc.MUSL); const usingSimd = !process.env.VIPS_NOVECTOR;
const usingSimd = !(process.env.G_DEBUG || process.env.VIPS_NOVECTOR); const concurrency = Number(process.env.VIPS_CONCURRENCY) || 0;
const concurrency = process.env.VIPS_CONCURRENCY ||
(libcFamily === detectLibc.MUSL || process.arch === 'arm' ? 1 : undefined);
exports.mochaHooks = { exports.mochaHooks = {
beforeEach () { beforeEach () {

View File

@ -8,7 +8,7 @@ fi
curl -s -o ./test/leak/libvips.supp https://raw.githubusercontent.com/libvips/libvips/master/suppressions/valgrind.supp curl -s -o ./test/leak/libvips.supp https://raw.githubusercontent.com/libvips/libvips/master/suppressions/valgrind.supp
for test in ./test/unit/*.js; do for test in ./test/unit/*.js; do
G_SLICE=always-malloc G_DEBUG=gc-friendly VIPS_LEAK=1 valgrind \ G_SLICE=always-malloc G_DEBUG=gc-friendly VIPS_LEAK=1 VIPS_NOVECTOR=1 valgrind \
--suppressions=test/leak/libvips.supp \ --suppressions=test/leak/libvips.supp \
--suppressions=test/leak/sharp.supp \ --suppressions=test/leak/sharp.supp \
--gen-suppressions=yes \ --gen-suppressions=yes \