D lang compilers have an option -release (or similar) which turns off
asserts, contracts, and other runtime type checking. This patch wires
that up to the b_ndebug flag.
Fixes#7082
Update the test.json schema, adding the 'stdout' property.
Also amend the test.json schema so the presence of an unexpected
property on the root object causes a validation error.
v2:
Also add 'tools' property to json schema.
Amend the documentation not to use the word 'list' to describe a dict.
JUnit is pretty ubiquitous, lots of services and results viewers
understand it, in particular gitlab and jenkins know how to consume
JUnit xml. This means projects using CI services can have their test
results consumed automatically.
Fixes: #6972
This does a couple of nice things, one is that editors like vscode can
be configured to use this schema to provide auto completion and error
highlighting if invalid values are added or required values are missing.
It also allows us test that the format of the test matrix work in a unit
test, which I've added. It does require that the python jsonschema
package is installed.
Vim can automatically comment and format comments. Set the necessary
variable to enable that feature.
See `:help format-comments` for more information.
Previously, this called out to the %ninja_test macro to run the
tests, but that limits us to only the arguments that ninja can
understand. In particular, it is not possible to add a test
timeout multiplier (such as is sometimes needed when building for
slow architectures such as armv7hl). With this patch, it will be
possible to specify `%meson_test -t 5` in the RPM spec file
without needing to patch the sources to extend the timeouts,
making life easier for packagers.
Related: https://github.com/mesonbuild/meson/issues/2037
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
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
-------
The vim syntax indentation rules stored in indent/meson.vim set the
local shiftwidth and softtabstop variables. As the file is loaded last,
after ~/.vim/after/ftplugin/meson.vim (when present), this prevents
overriding the default values for shiftwidth and softtabstop in a local
configuration.
Fix this by setting shiftwidth and softtabstop in ftplugin/meson.vim
instead (as done by the python indentiation rules in upstream vim for
instance) to allow local overrides.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Needs a `mock` kwarg to Interpreter to not do any parsing of build
files, but only setup the builtins and functions.
Also consolidate the documentation and data tests into one class.
This can be useful to make sure that a project builds when
its fallbacks are used on systems where external dependencies
satisfy the version requirements, or to easily hack on the sources
of a dependency for which a fallback exists.
Add some missing statements to list of keywords
Derive from prog-mode, so any prog-mode hooks are run
Automatically use this mode for meson.build files
[ci skip]
Deprecated Meson syntax is not supported.
There are features not yet implemented, like completing
build targets and build options; more on this in the comments.
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>