Commit Graph

90 Commits

Author SHA1 Message Date
Eli Schwartz 44e123dd90
test runner: add the ability to configure test.json for python paths
Adds new installed file types with @VAR@ substitution.
2021-08-18 17:58:30 -04:00
Tristan Partin 1dc13e9951 Add unset_variable()
This should be useful for helping to control variable scope within
Meson. CMake has something similar for controlling scope.
2021-08-16 14:05:13 -04:00
Eli Schwartz 59d4f771d2
editorconfig: add setting to trim trailing whitespace
and clean up all outstanding issues

Skip 'test cases/common/141 special characters/meson.build' since it
intentionally uses trailing newlines.
2021-08-15 09:36:18 -04:00
Jon Turney c78e6cac80 Allow `skip_*` test.json keys at top-level or in `matrix:` 2021-07-07 20:08:12 +02:00
Jon Turney a2e44296c9 Add `skip_on_os` to test.json 2021-07-07 20:08:12 +02:00
Jon Turney 7126fbaf81 Add `skip_on_jobname` to test.json
Plan to replace the hard-coded list of 'may be skipped' framework tests in
skippable() with annotations in test.json which record 'will be skipped
in these specific CI jobs'.

If the value of the MESON_CI_JOBNAME env var (an arbitrary string
expected to be unique for each CI configuration) contains any of the
strings in the `skip_on_jobname` key in test.json, the test is expected
to output MESON_SKIP_TEST.

Unexpected skips or runs are treated as an error.

Future work: Maybe we should add additional count categories 'unexpected
skip' and 'unexpected not skipped', rather than counting those as 'skipped'
and 'failed', respectively.
2021-07-07 20:08:12 +02:00
Jon Turney 5da3557331
Fix test.json schema for 'matrix'
I'm not sure what the current schema is describing, but it's not doing
anything useful to validate 'matrix' entries, as I discover when I come
to add something to that.

'matrix' is a dict with possible keys 'options' and 'exclude'.
'options' is a dict with arbitrary keys, whose's values are arrays

Once we describe those dicts correctly, also fix that 'val' keys may be
string, boolean or null, and the corresponding 'exclude' keys may be
string or boolean.

v2:
Also allow 'val' and 'exclude' to be an array of strings.
2021-06-24 17:07:45 +01:00
Jon Turney 81d2d559f1
Enforce all dicts with a fixed set of keys in test.json schema
Improve test.json schema to disallow arbitrary keys in all dicts which
have a defined set of keys (the 'installed', matrix 'options' and
'stdout' dicts).

Add 'count' and 'comment' keys to 'stdout' dict.
2021-06-23 13:09:17 +01:00
Daniel Mensinger 765aff5a42 coverage: Enable coverage reports 2021-06-22 21:05:11 +03:00
Liam Beguin d433abf89c syntax-highlighting: vim: add myself as a maintainer
Add myself as a maintainer of these files since I'll be keeping them
in sync with the Vim repository.

Signed-off-by: Liam Beguin <liambeguin@gmail.com>
2021-05-06 15:10:08 +03:00
Liam Beguin 0fbcebaca1 syntax-highlighting: vim: fix setting cpo
Since 'cpo' is global, use `set` instead of `setlocal`.

See: b66f0372cc11

Signed-off-by: Liam Beguin <liambeguin@gmail.com>
2021-05-06 15:10:08 +03:00
Xavier Claessens a45f939092 Add range() function
Fixes: #5026.
2021-03-16 20:50:16 -04:00
Antonin Décimo 39ede12aa5 Fix misspells
Signed-off-by: Antonin Décimo <antonin.decimo@gmail.com>
2021-01-13 12:53:10 -05:00
Aman Verma 388fa6e776 vim: Drop backwards compatibility with Vim 5. 2020-11-03 21:06:22 +02:00
Dylan Baker 1b63dcc531 zsh: Add completions for meson compile 2020-09-23 12:34:24 -07:00
Dylan Baker 9f893384db zsh: add completions for subprojects 2020-09-23 12:24:19 -07:00
Dylan Baker 3afaa879ec zsh: add wrap completions
This is still missing completions for promote, but I can't figure out
how to find the wraps in subprojects that are not in the parent project
when those projects haven't been fetched yet.
2020-09-23 10:19:56 -07:00
Dylan Baker f0db3d3750 zsh: add missing arguments to meson test completions
This also reorders the options internally to match the output of meson
test --help, which makes it easier to diff
2020-09-23 09:19:35 -07:00
Dylan Baker c6f7588afa zsh: Add completions for meson init 2020-09-23 09:16:27 -07:00
Dylan Baker a137cd0bfb zsh: Add completions for meson install 2020-09-23 09:02:32 -07:00
Dylan Baker 80af160036 zsh: add meson dist completions 2020-09-22 16:58:08 -07:00
Dylan Baker ecefe45f8e zsh: Add ability to complete depedency paths
using , separated syntax
2020-09-22 16:58:08 -07:00
Dylan Baker 670bc63fda zsh: add missing options for meson introspect 2020-09-22 16:08:45 -07:00
Dylan Baker f2572ea077 zsh: share common options between meson configure and meson setup 2020-09-22 16:07:09 -07:00
Dylan Baker 84d5233b5f zsh: Add missing options for meson setup 2020-09-22 16:01:50 -07:00
Dylan Baker 250c4463b4 zsh: remove binaries that are not longer installed 2020-09-22 16:01:34 -07:00
Daniel Mensinger 17439fa3e8 test: Add 'dir' support for installed files in test.json
This is useful for automatically generated docs (doxygen, hotdoc)
with a lot of generated files that may differ with different
versions of the generator.
2020-08-27 00:08:57 +00:00
Dylan Baker a65ef70b7d completions/zsh: Add --native-file
Which is missing
2020-08-08 01:24:28 +03:00
Nirbheek Chauhan 84928888e1 vim: Syntax-highlight continue and break statements 2020-07-22 05:06:27 +00:00
Igor Raits d6c6b933c4 mcompile: Add --verbose mode
Closes: https://github.com/mesonbuild/meson/issues/7352
Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com>
2020-06-21 23:49:39 +03:00
Igor Raits 0a61f511aa macros.meson: Switch to meson compile / install
Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com>
2020-06-15 23:53:41 +03:00
Igor Raits c4761afa63 macros.meson: Switch to %{_smp_build_ncpus}
It is available since RPM 4.15 which has been around 1 year by now.

Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com>
2020-06-15 23:53:41 +03:00
Jon Turney 1dee6c618d
Update test.json schema to add stdout
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.
2020-04-30 20:49:43 +01:00
Dylan Baker 7b7f93a09f mtest: Generate a JUnit xml result file
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
2020-04-23 13:26:01 -07:00
Dylan Baker e0c9259e79 Add a json schema for the test.json used in tests
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.
2020-04-17 10:49:09 -07:00
Nirbheek Chauhan a076e9852b syntax-highlighting/vim: Add `in` as an operator
This was missed. Ages ago.
2020-03-12 13:35:32 -04:00
Luke Drummond 4e41acb022 Add .wrap file syntax detection for vim
wrap files are ini syntax, and vim has support for this via the `dosini`
syntax type

[skip ci]
2020-01-14 23:17:41 +05:30
Xavier Claessens 6e865a2330 Add a summary() function for configuration summarization
Based on patch from Dylan Baker.

Fixes #757
2019-12-12 18:30:17 -05:00
Liam Beguin 30acd94e68 syntax-highlighting: vim: fix setting cpo [skip ci]
since 'cpo' is global, use `set` instead of `setlocal`.

Reported-By: Bram Moolenaar <Bram@vim.org>
Signed-off-by: Liam Beguin <liambeguin@gmail.com>
2019-11-07 22:14:29 +02:00
Liam Beguin af11f92071 syntax-highlighting: vim: add license header [skip ci]
Add a license header before getting them in the Vim runtime.
2019-10-18 01:24:12 +03:00
Liam Beguin 18e0029843 syntax-highlighting: vim: set comment string
Vim can automatically comment and format comments. Set the necessary
variable to enable that feature.

See `:help format-comments` for more information.
2019-10-14 08:28:23 -07:00
James Hilliard b21fd95f73 Add is_disabler function
This is useful if one needs to check if a variable is a disabler.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
2019-08-12 01:05:45 +03:00
Xavier Claessens 12d4031f52 Add alias_target() function 2019-07-10 15:01:18 -04:00
Stephen Gallagher 65091b7677 RPM Macros: Use `meson test` for %meson_test
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>
2019-04-28 20:30:30 +03:00
Igor Gnatenko 2946eb4404
Revert "rpm: Always set b_ndebug to true"
It turned out that it is not really good idea.

This reverts commit da1bb49787.

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2019-04-08 13:00:40 +02:00
Igor Gnatenko da1bb49787 rpm: Always set b_ndebug to true
'if-release' does not catch buildtype=plain, so we need to do this.

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2019-03-26 20:15:44 +02:00
Eric Engestrom b5cc01ccd9 bash/zsh: drop completion for deprecated command 2019-03-08 01:59:36 +02:00
Eric Engestrom 75f436542c zsh: complete targets 2019-02-20 18:52:26 +00:00
Eric Engestrom 1b873d62f8 add Bash completion script 2019-02-20 18:52:26 +00:00
Jussi Pakkanen bbcf80d734 Remove argv2, which is not supported by polkit. Closes #4758. 2019-01-15 20:28:44 +02:00