Commit Graph

64 Commits

Author SHA1 Message Date
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
Zbigniew Jędrzejewski-Szmek 26437f0297 rpm: remove manual printing of error logs on failure
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
-------
2019-01-04 11:47:59 +01:00
Laurent Pinchart 80bdc71c0e syntax-highlighting: vim: Allow overriding shiftwidth and softtabstop
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>
2018-11-30 01:19:10 +02:00
Nirbheek Chauhan 8402a22233 Test that vim syntax highlighting is up-to-date
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.
2018-08-07 12:54:56 -07:00
Igor Gnatenko 1515fca2d9 rpm: pass --auto-features=enabled [skip ci]
We really want to be explicit.

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2018-07-25 12:52:59 +02:00
Igor Gnatenko 88d1b8f9e7 rpm: use %{shrink…} [skip ci]
Make logs look better!

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2018-07-25 12:52:59 +02:00
Igor Gnatenko 99070beec4 rpm: use %set_build_flags [skip ci]
It has better name and should do the trick.

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2018-07-25 12:52:59 +02:00
Nirbheek Chauhan 5714ba2534 meson.vim: Add missing disabler() entry [skip ci] 2018-07-02 18:49:34 +05:30
Juergen Hoetzel e1eb84eb9e Add feature footer 2018-06-30 00:29:15 +03:00
Juergen Hoetzel 337301a766 Setup mode-specific `comment-start' and `'comment-end'
Get rid of meson.comment-dwim workaround.
2018-06-30 00:29:15 +03:00
Jussi Pakkanen 6cf79f86ee Made install a top level Meson command. 2018-06-18 22:02:56 +03:00
Ryan Gonzalez 559286a0da Support installation via polkit 2018-05-17 00:23:18 +03:00
Nirbheek Chauhan 487526bfff Trivial update to meson vim syntax + typo in snippet [skip ci] 2018-04-11 22:07:11 +05:30
Mathieu Duponchelle 31f0242a6f new wrap-mode: forcefallback
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.
2018-04-06 23:48:48 +02:00
Sami Kerola 70a7cf30a1 Re-link remaining github wiki urls to mesonbuild.com site 2018-02-11 13:39:46 +02:00
Jon Turney 7eb6a29180 A few small improvements to meson.el
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]
2018-01-16 22:18:04 +02:00
Igor Gnatenko 18675c3dea rpm: print testlog from subshell
false || { rc=$?; echo $rc; exit $rc } || :

Exits current shell without possibility to prevent that.

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2018-01-04 22:09:51 +02:00
Dylan Baker 54d0faa3dd vim: Add warning function to list of builtins 2017-12-14 23:49:45 +02:00
Arseny Maslennikov 8e04ab7cf2 _meson: Explicitly specify license to match the Z Shell
The zsh completion script is explicitly licensed to eliminate
any legal obstacles for its co-distribution with Z Shell itself.
2017-11-11 20:11:38 +03:00
Arseny Maslennikov abbf2f4fab Move shell completions and text editor helpers to data/ 2017-11-11 19:03:22 +03:00
Arseny Maslennikov 604f2b9a68 Add zsh completion function for Meson
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.
2017-11-11 19:01:30 +03:00
Zbigniew Jędrzejewski-Szmek 92219a2739 rpm: print test logs on failure
References: https://bugzilla.redhat.com/show_bug.cgi?id=1500248
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-10-12 20:53:42 +03:00
Igor Gnatenko 9635d0bd69 rpm: pass --wrap-mode=nodownload to %meson
With ability to change it if needed.
2017-04-28 22:36:39 +03:00
Igor Gnatenko 5bf22c5678 add support for $sharedstatedir
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-18 00:08:45 +01:00
Igor Gnatenko 2962d3a66b add support for $infodir
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-18 00:01:27 +01:00
Igor Gnatenko 380b362fa4 add support for $sbindir
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-18 00:01:23 +01:00
Igor Gnatenko b80f8b2dc2 rpm: use VPATH macro
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>
2016-12-15 20:45:01 +02:00