Commit Graph

2834 Commits

Author SHA1 Message Date
Daniel Stone 1cb9d2bc0d Support skipped tests
Knowing whether a test failed to run as its prerequisites were not
available, or whether those prerequisites were available and produced
unexpected/incorrect results, is a useful differentiation.

Add support for skipped tests by testing for exit code 77, used through
autotools/piglit/etc to denote a test which detected this and decided to
skip.
2016-11-29 13:13:29 -05:00
Jussi Pakkanen ac78ae47a9 Merge pull request #1087 from thiblahute/mesontest
Some fixes in mesontest
2016-11-26 15:26:42 -05:00
Nirbheek Chauhan ce09c5bb8c Add basic syntax and indentation files for ViM
The syntax file does syntax highlighting for numbers, string literals,
comments, etc. Also maintains a list of valid function names.

The plugin does auto-indentation for Meson with two spaces by default.

TODO: explicit errors for decimal numbers (right now, it's just
unhighlighted), check kwargs, default options, etc.
2016-11-26 13:00:56 -05:00
Jussi Pakkanen a32716f9fe Merge pull request #1098 from centricular/unity-extract-objects-regression
Only check for unity compat when doing unity builds
2016-11-26 12:59:42 -05:00
Minijackson 8652b94c4f Install mesontest script along with the others 2016-11-26 12:57:36 -05:00
Jussi Pakkanen 88d7898bb4 Merge pull request #1092 from centricular/always-use-utf-8-py3
Always use utf-8 to write configured file and warn if the encoding is not UTF-8 compatible
2016-11-26 12:57:17 -05:00
Nirbheek Chauhan 09fd24ea78 Always catch PermissionError while looking for Ninja
Also convert a few other generic `except Exception`s to be more specific

Closes #1088
2016-11-26 12:56:08 -05:00
Sam Thursfield ac56f8d8fb Don't show tracebacks for MesonException in helper scripts
I hit an issue when building gtk-doc documentation. The issue is
my fault, but the error output from Meson makes it look like an
internal error:

    [0/1] 'Running external command libtracker-sparql-doc.'
    Building documentation for libtracker-sparql
    Traceback (most recent call last):
      File "/home/sam/meson/meson.py", line 26, in <module>
        sys.exit(main())
      File "/home/sam/meson/meson.py", line 23, in main
        return mesonmain.run(launcher, sys.argv[1:])
      File "/home/sam/meson/mesonbuild/mesonmain.py", line 249, in run
        sys.exit(run_script_command(args[1:]))
      File "/home/sam/meson/mesonbuild/mesonmain.py", line 239, in run_script_command
        return cmdfunc(cmdargs)
      File "/home/sam/meson/mesonbuild/scripts/gtkdochelper.py", line 183, in run
        options.ignore_headers.split('@@') if options.ignore_headers else [])
      File "/home/sam/meson/mesonbuild/scripts/gtkdochelper.py", line 133, in build_gtkdoc
        gtkdoc_run_check(mkhtml_cmd, os.path.join(abs_out, 'html'))
      File "/home/sam/meson/mesonbuild/scripts/gtkdochelper.py", line 55, in gtkdoc_run_check
        raise MesonException('\n'.join(err_msg))
    mesonbuild.mesonlib.MesonException: 'gtkdoc-mkhtml' failed with status 6
    warning: failed to load external entity "../overview.sgml"
    ../libtracker-sparql-docs.sgml:20: element include: XInclude error :
    could not load ../overview.sgml, and no fallback was found
    warning: failed to load external entity "../examples.sgml"
    ../libtracker-sparql-docs.sgml:41: element include: XInclude error :
    could not load ../examples.sgml, and no fallback was found

    FAILED: libtracker-sparql-doc

After this patch, the output is much clearer:

    [0/1] 'Running external command libtracker-sparql-doc.'
    Building documentation for libtracker-sparql

    Error in gtkdoc helper script:
    'gtkdoc-mkhtml' failed with status 6
    warning: failed to load external entity "../overview.sgml"
    ../libtracker-sparql-docs.sgml:20: element include: XInclude error :
    could not load ../overview.sgml, and no fallback was found
    warning: failed to load external entity "../examples.sgml"
    ../libtracker-sparql-docs.sgml:41: element include: XInclude error :
    could not load ../examples.sgml, and no fallback was found

Note the actual errors from xsltproc are swallowed by gtkdoc-mkhtml
1.25.1, they're only displayed in the example above because I made a
patch: <https://bugzilla.gnome.org/show_bug.cgi?id=774812>
2016-11-26 12:11:59 -05:00
Jussi Pakkanen da45e1925f Merge pull request #1093 from centricular/pypi-status-readme
Add pypi status to README
2016-11-26 12:08:51 -05:00
Jussi Pakkanen d6f848bd3d Merge pull request #1059 from thiblahute/master
Allow specifying push URL in .wrap and fix broken subproject directories handling
2016-11-26 11:24:45 -05:00
Jussi Pakkanen 7e1b674704 Add both native and cross compiler options to option list. 2016-11-26 11:24:20 -05:00
Nirbheek Chauhan 864b9b1957 Only check for unity compat when doing unity builds
Also don't bother setting self.unity_compatible since it will never be
checked.

Closes #1097
2016-11-24 03:51:11 +05:30
Nirbheek Chauhan ae935b12e0 Fix single object extraction test
The library from which we extract should have multiple sources
from which we choose a strict subset otherwise we're testing almost the
same case extracting all the objects.

This exposes a bug in how we were doing extract checking for unity
builds.
2016-11-24 03:49:32 +05:30
Nirbheek Chauhan 65a44f52aa README.md: Add a warning about zipapp adding tests 2016-11-23 21:28:56 +05:30
Thibault Saunier 5d866bb4f3 mesontest: Add a 'verbose' mode which does not capture stdout/err
And reuse that mode when running inside gdb instead of reimplementing
running test for that particular use case.
2016-11-23 09:14:09 -03:00
Nirbheek Chauhan fcbee35104 Add pypi status to README 2016-11-23 16:47:01 +05:30
Nirbheek Chauhan 34394afce6 meson.py: Warn if the encoding is not UTF-8 compatible 2016-11-23 16:00:33 +05:30
Jussi Pakkanen bfd190279c Detect Qt5 properly on more platforms. 2016-11-23 05:11:02 -05:00
Nirbheek Chauhan 03cc991f4f configure_file: Use utf-8 to write configured file
Closes #1085
2016-11-23 15:33:40 +05:30
Thibault Saunier 2584a9f27d mesontest: Fix usage of test.env as it can be a build.EnvironmentVariables 2016-11-22 15:52:17 -03:00
Thibault Saunier 0ebf033f31 wrap: Allow specifying push URL in wrap files using git 2016-11-22 14:24:36 -03:00
Thibault Saunier 28cd23ab6e wrap: Make sure that the cloned git repo is properly cloned 2016-11-22 14:24:36 -03:00
Thibault Saunier 3f6e06c930 mesontest: Fix the --wd option and rename it to -C to be coherent with ninja 2016-11-22 14:18:21 -03:00
Thibault Saunier 9644e8b8de mesontest: Fix --list option
The listing code path could not be hit when running mesontest --list
2016-11-22 14:13:20 -03:00
Patrick Griffis 587a0bb3d1 gnome: Update required version for glib-compile-resources depfile fixes
Note that this version is not yet released
2016-11-20 23:01:26 +01:00
Jussi Pakkanen c9a46fcc93 Can set compiler arguments in Java. 2016-11-20 16:57:58 -05:00
Jussi Pakkanen 0250b2cce6 Can give many alternative names to find_program to simplify searching. 2016-11-20 16:54:19 -05:00
Jussi Pakkanen 82bb24b264 Made has_function survive optimization flags. Closes #1053. 2016-11-20 16:53:58 -05:00
Jussi Pakkanen 8f41154827 Can specify headers to install with Files. 2016-11-20 16:52:45 -05:00
Jussi Pakkanen aa9668a2fc Merge pull request #730 from mesonbuild/newtest
New testing tool
2016-11-20 16:07:32 -05:00
Jussi Pakkanen df4af2d122 Renamed test to plug hole in numbering. 2016-11-20 00:50:25 +02:00
Jussi Pakkanen 5b00c9b9c0 Dead code removal. 2016-11-19 19:34:49 +01:00
Jussi Pakkanen a01919976e Always specify installed data with a File object. Closes #858. 2016-11-18 17:37:35 -05:00
Elliott Sales de Andrade 996f4d89f3 Disallow some keyword arguments to gnome.mkenums.
The install argument is allowed for CustomTargets, but we use
install_header as the setting now. Also, setting a generic template when
specifying the more specific source or header template shouldn't be
allowed.
2016-11-18 15:30:56 -05:00
Jussi Pakkanen 1ebc5c1ea0 Can run special tests with the new tool. 2016-11-18 22:10:22 +02:00
Jussi Pakkanen c7ddce163f All testing is now in mesontest.py, which simplifies a lot of stuff. 2016-11-18 22:10:22 +02:00
Jussi Pakkanen 39df22bf53 Made Meson test into a class rather than abusing global variables and as preparation for moving it elsewhere. 2016-11-18 22:08:07 +02:00
Jussi Pakkanen e24229eae7 Can run benchmarks. 2016-11-18 22:04:29 +02:00
Jussi Pakkanen 077741097a Run all tests if none are specified. 2016-11-18 22:04:29 +02:00
Jussi Pakkanen def68cbc50 Use the same code for tests and benchmarks. 2016-11-18 22:04:29 +02:00
Jussi Pakkanen 0d619df2f3 Removed subsuite targets. 2016-11-18 22:04:29 +02:00
Jussi Pakkanen 951262d759 Removed Valgrind from core. 2016-11-18 22:04:29 +02:00
Jussi Pakkanen a5a4c85eca Can run tests under gdb. 2016-11-18 22:04:29 +02:00
Jussi Pakkanen 3f3c9c5329 Add option to run under gdb. 2016-11-18 22:04:29 +02:00
Jussi Pakkanen ee90ce74e8 New test runner. 2016-11-18 22:04:29 +02:00
Jussi Pakkanen 621219ccb0 Removed duplicate log message for command running. Closes #1056. 2016-11-17 00:20:36 +02:00
Elliott Sales de Andrade d45db903ac Rename test cases to remove duplicate numbers. 2016-11-14 13:50:31 -05:00
Jussi Pakkanen 070c6a72b2 Bump version for new development. 2016-11-14 20:49:06 +02:00
Jussi Pakkanen 4e3073f90a Updated version number for release. 2016-11-14 20:19:43 +02:00
Elliott Sales de Andrade 330aebc186 Fix message to be checked in Qt5 unit test. 2016-11-14 11:45:23 -05:00