mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 10:30:15 +02:00
Tests: Move all setup to named file
This commit is contained in:
parent
2ce166ab0a
commit
24b42ef192
@ -5,7 +5,7 @@ if ! type valgrind >/dev/null; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
curl -o ./test/leak/libvips.supp https://raw.githubusercontent.com/libvips/libvips/master/libvips.supp
|
||||
curl -s -o ./test/leak/libvips.supp https://raw.githubusercontent.com/libvips/libvips/master/libvips.supp
|
||||
|
||||
for test in ./test/unit/*.js; do
|
||||
G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind \
|
||||
@ -16,5 +16,5 @@ for test in ./test/unit/*.js; do
|
||||
--show-leak-kinds=definite,indirect,possible \
|
||||
--num-callers=20 \
|
||||
--trace-children=yes \
|
||||
mocha --slow=60000 --timeout=120000 "$test";
|
||||
node node_modules/.bin/mocha --slow=60000 --timeout=120000 --file test/unit/beforeEach.js "$test";
|
||||
done
|
||||
|
@ -233,7 +233,13 @@
|
||||
...
|
||||
fun:uv__work_done
|
||||
}
|
||||
|
||||
{
|
||||
leak_libuv_FlushForegroundTasks
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: possible
|
||||
...
|
||||
fun:_ZN4node12NodePlatform28FlushForegroundTasksInternalEv
|
||||
}
|
||||
# nodejs warnings
|
||||
{
|
||||
param_nodejs_write_buffer
|
||||
|
@ -4,7 +4,9 @@ const detectLibc = require('detect-libc');
|
||||
const sharp = require('../../');
|
||||
|
||||
const usingCache = detectLibc.family !== detectLibc.MUSL;
|
||||
const usingSimd = !process.env.G_DEBUG;
|
||||
|
||||
beforeEach(function () {
|
||||
sharp.cache(usingCache);
|
||||
sharp.simd(usingSimd);
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user