Skip to content

Commit

Permalink
Tests: simplify beforeEach configuration
Browse files Browse the repository at this point in the history
Remove legacy settings for previous CI providers/hardware
  • Loading branch information
lovell committed Nov 15, 2022
1 parent ac0dc10 commit 4490a93
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions test/beforeEach.js
@@ -1,13 +1,10 @@
'use strict';

const detectLibc = require('detect-libc');
const sharp = require('../');

const libcFamily = detectLibc.familySync();
const usingCache = !(process.env.G_DEBUG || libcFamily === detectLibc.MUSL);
const usingSimd = !(process.env.G_DEBUG || process.env.VIPS_NOVECTOR);
const concurrency = process.env.VIPS_CONCURRENCY ||
(libcFamily === detectLibc.MUSL || process.arch === 'arm' ? 1 : undefined);
const usingCache = !process.env.G_DEBUG;
const usingSimd = !process.env.VIPS_NOVECTOR;
const concurrency = Number(process.env.VIPS_CONCURRENCY) || 0;

exports.mochaHooks = {
beforeEach () {
Expand Down
2 changes: 1 addition & 1 deletion test/leak/leak.sh
Expand Up @@ -8,7 +8,7 @@ fi
curl -s -o ./test/leak/libvips.supp https://raw.githubusercontent.com/libvips/libvips/master/suppressions/valgrind.supp

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/sharp.supp \
--gen-suppressions=yes \
Expand Down

0 comments on commit 4490a93

Please sign in to comment.