Commit Graph

3082 Commits

Author SHA1 Message Date
Jussi Pakkanen dc70916ca4 Catch permissionerrors too, since Windows seems to produce them occasionally. 2017-01-02 17:17:40 -05:00
Jussi Pakkanen e245bdbdc0 Merge pull request #1254 from mesonbuild/testsetups
Add test setups
2017-01-02 17:12:18 -05:00
Igor Gnatenko f4058b692d backends/ninja: remove unused variable
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-02 17:07:23 -05:00
Jussi Pakkanen b3d51abff2 Can put external programs to test suite exe wrappers directly. 2017-01-02 23:52:50 +02:00
Jussi Pakkanen 74f15263b6 Can set envvars in test setups. 2017-01-02 23:52:50 +02:00
Jussi Pakkanen ee8a6e6fc5 Can specify test setups and run them with mesontest. 2017-01-02 23:52:50 +02:00
Jussi Pakkanen 776b0d9a5f Merge pull request #1263 from centricular/meson_exe_deterministic
serialise_executable: Name the data file deterministically
2017-01-02 11:42:56 -05:00
Mike Sinkovsky 2d2e3b943c fix for cross-builds targeting macosx 2017-01-02 11:08:30 -05:00
Igor Gnatenko f0bc5568a7 style: fix E703 violations
E703: statement ends with a semicolon

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01 12:02:05 -05:00
Igor Gnatenko 969dc7e995 style: fix E124 violations
E124: closing bracket does not match visual indentation

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01 12:02:05 -05:00
Igor Gnatenko 116da33cdd style: fix E128 violations
E128: continuation line under-indented for visual indent

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01 12:02:05 -05:00
Igor Gnatenko ea570bcb67 style: fix E265 violations
E265: block comment should start with '# '

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01 12:02:05 -05:00
Igor Gnatenko f19bec34a9 style: fix E271 violations
E271: multiple spaces after keyword

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01 12:02:05 -05:00
Igor Gnatenko 5693758e46 style: fix E231 violations
E231: missing whitespace after ','

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01 12:02:05 -05:00
Igor Gnatenko 2a835c2c10 style: fix E221 violations
E221: multiple spaces before operator

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01 12:02:05 -05:00
Igor Gnatenko ef608f217d style: fix E222 violations
E222: multiple spaces after operator

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01 12:02:05 -05:00
Igor Gnatenko 2017d8578a style: fix E226 violations
E226: missing whitespace around arithmetic operator

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01 12:02:05 -05:00
Igor Gnatenko f0b30baa39 style: fix E225 violations
E225: missing whitespace around operator

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01 12:02:05 -05:00
Igor Gnatenko 15629d2fae backends/ninja: remove unused variables
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01 12:02:05 -05:00
Nirbheek Chauhan 5060e2045b serialise_executable: Name the data file deterministically
Closes #1062
2016-12-31 21:59:02 +05:30
Nirbheek Chauhan 3445beb00b Add a test for deterministic exe-wrapper data file
https://github.com/mesonbuild/meson/issues/1062
2016-12-31 21:59:02 +05:30
Jussi Pakkanen b55235dfbd Fix space before :. 2016-12-31 16:28:15 +02:00
Hemmo Nieminen 504f974204 Pass project's user options to scan-build temporary project.
This allows (among other things) scan-build to process a project's
optional components that will not get built unless a (user) option has
been set.
2016-12-31 14:08:15 +02:00
Jussi Pakkanen 92f8e0ab31 Do not run arm cross compilation tests on arm. 2016-12-31 14:04:58 +02:00
Jussi Pakkanen 0a14ad63de Add simple uninstall target. Closes #753. 2016-12-31 13:55:55 +02:00
Jussi Pakkanen aff62a4611 Merge pull request #1258 from QuLogic/compile_resource-includes
Add include_directories to windows.compile_resources.
2016-12-31 13:54:43 +02:00
Hemmo Nieminen 4ae629d2aa Use the correct directory for scan-build command. 2016-12-31 13:39:28 +02:00
Igor Gnatenko 8f5b67434d setup.cfg: fix syntax 2016-12-29 16:14:55 +02:00
Elliott Sales de Andrade 157549fe72 Add include_directories to windows.compile_resources. 2016-12-28 17:19:46 -05:00
Elliott Sales de Andrade 24b3585318 Move _get_include_args from gnome to modules. 2016-12-28 17:18:14 -05:00
Jussi Pakkanen c1e2f58443 Just say no. 2016-12-28 23:18:57 +02:00
Igor Gnatenko f56458810d setup.cfg: ignore couple of PEP8 errors
We don't care about E261 and temporarily ignore E501.

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-23 23:52:25 +02:00
Jussi Pakkanen 775729eb59 Can specify include directories to compiler tests. 2016-12-23 20:47:39 +02:00
Nirbheek Chauhan a97291dc6d Add get_version() method to all dependencies
We unconditionally check the version of all dependencies, so without
this regen will fail if you use that dependency.
2016-12-23 19:07:45 +02:00
Nirbheek Chauhan a3c02262f9 Force a Ninja regeneration before each project test
We have no test coverage for regeneration at all, which is why issues
like #1246 slide by without us noticing. With this, we will run a regen
on every test during `ninja test` after it has been compiled. This will
not affect test times too much since the regen will not rebuild anything
at all since there have been no source changes.
2016-12-23 19:07:45 +02:00
Matthias Klumpp 7eb96375ca gdc: Make dependency check work
The -fmake-deps command does not segfault anymore, and if it is used
with "=" there will also be no "file not found" error.
2016-12-23 19:01:15 +02:00
Jussi Pakkanen 4b7c39d9d1 Merge pull request #1247 from centricular/fix-installed-soname-aliases
Fix soname symlinking after installation
2016-12-23 00:28:00 +02:00
Matthias Klumpp 8ee1c9a07a Do not automatically set warning flags if buildtype is 'plain' 2016-12-23 00:27:33 +02:00
Elliott Sales de Andrade 18c38df875 Add Generator.process_files to reduce code duplication. 2016-12-22 17:08:32 +02:00
Jussi Pakkanen 6f5a5622b9 Vim syntax highlighting fixes. Closes #1241. 2016-12-22 02:17:49 +02:00
Kseniia Vasilchuk 7dc6ba3518 Add myself to authors.txt 2016-12-22 02:04:36 +02:00
Kseniia Vasilchuk 69e2ef099c configure_file: Use utf-8 to write configured file
as a second part of
https://github.com/mesonbuild/meson/issues/1085
2016-12-22 02:04:36 +02:00
Nirbheek Chauhan d5952531c7 Share code between installed and non-installed soname tests 2016-12-22 02:27:16 +05:30
Nirbheek Chauhan 0ac965cc10 Fix shared library symlink aliasing on install
Set the rules for the symlinking on the target itself, and then reuse
that information while generating aliases during the build, and then
pass it to the install script too.
2016-12-22 02:27:01 +05:30
Matthieu Gautier 9d1e426bcc Fix installation of statically linked executable for ELF binary.
At installation, if the executable is a ELF file, we try to fix the
dependencies in the binary section.
If a executable has been compiled with the --static flag, there is
no .dynamic section in the ELF binary and so we need to handle this case.
2016-12-21 22:03:18 +02:00
Nirbheek Chauhan 18f581f2c4 Add an installed soname unit test
We also need to test that the sonames are correct after installation.
2016-12-22 01:32:02 +05:30
Nirbheek Chauhan de0b02ee2d Store pkg-config path on the instance too
We were storing the pkg-config path on the class as a static variable --
PkgConfigDependency.pkgbin. When we regenerate via Ninja, the found-deps
are all cached in a pickled coredata, so if you have a statement that
does dep.get_pkgconfig_variable(), it will raise the following exception
because the static class variables are per-meson-invocation.

To fix this, we store the pkg-config binary as both a class variable and
an instance variable.

Traceback (most recent call last):
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/mesonmain.py", line 289, in run
    app.generate()
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/mesonmain.py", line 177, in generate
    intr.run()
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreter.py", line 2215, in run
    super().run()
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 124, in run
    self.evaluate_codeblock(self.ast, start=1)
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 145, in evaluate_codeblock
    raise e
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 139, in evaluate_codeblock
    self.evaluate_statement(cur)
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 150, in evaluate_statement
    return self.function_call(cur)
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 371, in function_call
    return self.funcs[func_name](node, self.flatten(posargs), kwargs)
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 47, in wrapped
    return f(self, node, args, kwargs)
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreter.py", line 2035, in func_subdir
    self.evaluate_codeblock(codeblock)
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 145, in evaluate_codeblock
    raise e
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 139, in evaluate_codeblock
    self.evaluate_statement(cur)
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 160, in evaluate_statement
    return self.evaluate_if(cur)
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 213, in evaluate_if
    self.evaluate_codeblock(i.block)
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 145, in evaluate_codeblock
    raise e
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 139, in evaluate_codeblock
    self.evaluate_statement(cur)
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 160, in evaluate_statement
    return self.evaluate_if(cur)
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 213, in evaluate_if
    self.evaluate_codeblock(i.block)
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 145, in evaluate_codeblock
    raise e
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 139, in evaluate_codeblock
    self.evaluate_statement(cur)
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 182, in evaluate_statement
    return self.evaluate_plusassign(cur)
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 333, in evaluate_plusassign
    addition = self.evaluate_statement(node.value)
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 166, in evaluate_statement
    return self.evaluate_arraystatement(cur)
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 193, in evaluate_arraystatement
    (arguments, kwargs) = self.reduce_arguments(cur.args)
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 515, in reduce_arguments
    reduced_pos = [self.evaluate_statement(arg) for arg in args.arguments]
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 515, in <listcomp>
    reduced_pos = [self.evaluate_statement(arg) for arg in args.arguments]
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 154, in evaluate_statement
    return self.method_call(cur)
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 399, in method_call
    return obj.method_call(method_name, self.flatten(args), kwargs)
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreter.py", line 982, in method_call
    value = fn(state, args, kwargs)
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/modules/gnome.py", line 499, in generate_gir
    girdir = dep.get_pkgconfig_variable("girdir")
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/dependencies.py", line 219, in get_pkgconfig_variable
    ret, out = self._call_pkgbin(['--variable=' + variable_name, self.name])
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/dependencies.py", line 184, in _call_pkgbin
    p, out = Popen_safe([PkgConfigDependency.pkgbin] + args, env=os.environ)[0:2]
  File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/mesonlib.py", line 392, in Popen_safe
    stderr=stderr, **kwargs)
  File "/usr/lib64/python3.5/subprocess.py", line 947, in __init__
    restore_signals, start_new_session)
  File "/usr/lib64/python3.5/subprocess.py", line 1474, in _execute_child
    executable = os.fsencode(executable)
  File "/usr/lib64/python3.5/os.py", line 862, in fsencode
    raise TypeError("expect bytes or str, not %s" % type(filename).__name__)
TypeError: expect bytes or str, not NoneType
FAILED: build.ninja
'/usr/bin/python3' '/home/nirbheek/projects/repositories/github/meson.git/meson.py' --internal regenerate '/home/nirbheek/projects/repositories/gst/gstreamer' '/home/nirbheek/projects/repositories/gst/gstreamer/build' --backend ninja
ninja: error: rebuilding 'build.ninja': subcommand failed
2016-12-21 21:14:45 +02:00
Elliott Sales de Andrade d517bbfb5c Raise clearer error if -Doption is invalid. 2016-12-21 16:58:11 +02:00
Jussi Pakkanen dbe685ec4e Merge pull request #1218 from ximion/master
Do not automatically set warning flags if buildtype is 'plain'
2016-12-21 16:56:58 +02:00
Jussi Pakkanen 4f836de5bd Shut down the noise. 2016-12-21 16:55:26 +02:00