diff --git a/tests/harness.js b/tests/harness.js index a7efbf23..7299b719 100644 --- a/tests/harness.js +++ b/tests/harness.js @@ -96,9 +96,7 @@ LibAVTestHarness = { if (!opts && this.libav) return this.libav; - opts = opts || this.libAVOpts; - - const ret = await LibAV.LibAV(opts); + const ret = await LibAV.LibAV(opts || this.libAVOpts); if (!opts) this.libav = ret; @@ -159,9 +157,9 @@ LibAVTestHarness = { await test.func(this); } catch (ex) { this.printErr("\n" + - JSON.stringify(this.libAVOpts) + "\n" + - test.name + "\n" + - ex + "\n" + ex.stack); + `Error in test ${test.name}\n` + + "Options: " + JSON.stringify(this.libAVOpts) + "\n" + + `Error: ${ex}\n${ex.stack}`); fails++; } } diff --git a/tests/tests/003-utils.js b/tests/tests/003-utils.js index 95998f97..514a09cd 100644 --- a/tests/tests/003-utils.js +++ b/tests/tests/003-utils.js @@ -37,7 +37,7 @@ h.utils.audioF32 = async function(file) { }; await libav.ffmpeg( - "-nostdin", "-loglevel", "0", + "-nostdin", "-loglevel", "quiet", "-i", file, "-f", "f32le", "-ar", "48000", @@ -48,7 +48,7 @@ h.utils.audioF32 = async function(file) { } if (file instanceof Array) { - if (file[0].data) { + if (file[0] && file[0].data) { if (file[0].data.buffer) { // Frames of flat data file = new Blob(file.map(x => x.data)); diff --git a/tests/tests/621-alt-variant.js b/tests/tests/621-alt-variant.js index a12dbcf9..3b3f3da6 100644 --- a/tests/tests/621-alt-variant.js +++ b/tests/tests/621-alt-variant.js @@ -19,7 +19,12 @@ let data; { const libav = await h.LibAV(); - await libav.ffmpeg("-i", "bbb.webm", "-map", "0:a", "-c:a", "libvorbis", "tmp.ogg"); + await libav.ffmpeg( + "-nostdin", "-loglevel", "quiet", + "-i", "bbb.webm", + "-map", "0:a", "-c:a", "libvorbis", + "tmp.ogg" + ); data = await libav.readFile("tmp.ogg"); await libav.unlink("tmp.ogg"); }