]> git.ipfire.org Git - thirdparty/zstd.git/commit
meson: valgrind wrapper should return correct errors
authorEli Schwartz <eschwartz@archlinux.org>
Mon, 31 Jan 2022 02:45:19 +0000 (21:45 -0500)
committerEli Schwartz <eschwartz@archlinux.org>
Mon, 31 Jan 2022 02:50:42 +0000 (21:50 -0500)
commitef78b9af30422f8affe1ab35cd59b7170cde707a
treec702d3da2b859b3234b0dedb7bbe2bef6b17dbe4
parent84c05453db61a5c518bda486ea36b0c00fc645a1
meson: valgrind wrapper should return correct errors

While trying to raise an exception on failures, it instead raised an
exception for misusing the exception. CalledProcessError is only
supposed to be used when given a return code and a command, and it
prints:

Command '{cmd}' returned non-zero exit status {ret}

Passing an error message string instead, just errored out with:

TypeError: __init__() missing 1 required positional argument

Instead use the subprocess module's base error which does accept string
messages. Everything that used to error out, still errors out, but now
they do so with a slightly prettier console message.
build/meson/tests/valgrindTest.py