This effectively reverts 92219a2739.
Back in the day, meson test would not print the logs on failure. But it now
does that automatically, for the failed test. Printing all logs is annoying because
it results in exteremely long output in some packages.
Example output:
+ /usr/bin/ninja test -v -j4 -C x86_64-redhat-linux-gnu
ninja: Entering directory `x86_64-redhat-linux-gnu'
[0/1] /usr/bin/meson test --no-rebuild --print-errorlogs
1/16 test-script.sh OK 46.23 s
...
14/16 test-casync FAIL 1.17 s (exit status 1)
15/16 test-cautil OK 0.00 s
16/16 test-util OK 0.01 s
Ok: 15
Expected Fail: 0
Fail: 1
Unexpected Pass: 0
Skipped: 0
Timeout: 0
The output from the failed tests:
14/16 test-casync FAIL 1.17 s (exit status 1)
--- command ---
/home/zbyszek/fedora/casync/casync-2/x86_64-redhat-linux-gnu/test-casync
--- stdout ---
error
-------
This is more or less standardized way to have one variable which
will work for all buildsystems defined in redhat-rpm-config.
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Using RPM's %{optflags} is definitely nice, but not enough. LDFLAGS
are not there, and idea of optflags is too generic. It is supposed
to work under CC and CXX, but apparently someone forgot that there
is difference between these two.
%__global_*flags is not part of RPM itself, it's coming within
redhat-rpm-config which makes our macros file not that portable,
but anyway we already have %__global_ldflags and %ninja_build and
no one complained.
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
When user uses %meson -Denable_cool_feature=true current macro fails
because RPM adds flag after popd:
...
pushd x86_64-redhat-linux-gnu
/usr/bin/meson ... $OLDPWD/.
popd -Denable_cool_feature
Since meson can accept $srcdir and $builddir arugments we don't have
this problem with pushd/popd. It also simplifies things a bit.
Reported-by: Richard Hughes <richard@hughsie.com>
References: https://bugzilla.redhat.com/show_bug.cgi?id=1401062
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>