Commit Graph

1432 Commits

Author SHA1 Message Date
Aleksey Filippov 143dc3ca44 Add install_data() succeeding rename tests 2018-03-17 20:40:50 +00:00
Aleksey Filippov 7f042b5fe2 Use target.get_id() instead of basename and type_suffix concatenation at call site
Fixes the bug with flat layout and identical target names in subprojects.
Without this change directories are not created with subproject prefix
and they can collide.

Remove dead makedirs code in Backend.__init__(), during initialization
of backend build.targets is empty. Create output directories in
Vs2010Backend.generate_projects() instead.

Also use double blank line in run_unittests.py according to
https://www.python.org/dev/peps/pep-0008/#blank-lines.
2018-03-15 21:14:58 +02:00
Jussi Pakkanen 9ecb75670f
Merge pull request #3127 from bluetech/method-permitted-kwargs 2018-03-13 21:16:30 +02:00
Jussi Pakkanen 8d8caef636
Merge pull request #3205 from sarum9in/use-itertools 2018-03-12 23:09:46 +02:00
Jussi Pakkanen 6585427a7d
Merge pull request #3131 from sarum9in/pkgconfig
Pkgconfig accepts libraries and pkgconfig-dependencies in requires/requires_private parameters
2018-03-12 23:02:36 +02:00
Aleksey Filippov 3493a372e2 Use specific exception types instead of Exception 2018-03-12 02:39:27 +00:00
Aleksey Filippov 093bdcafc9 Use subprocess.check_output() instead of Popen().communicate() 2018-03-11 23:36:04 +00:00
Aleksey Filippov e4faf396e6 Do not use bare except [flake8]
Use more specific exception types where appropriate.
This patch does not change bare except calls if exception is re-raised.
2018-03-11 23:36:04 +00:00
Jussi Pakkanen 407b6dfc29
Merge pull request #3203 from jukkalaurila/bug3185
Fix bug 3185, "Setting -Dc_args=... option and some others during initial run fails silently'
2018-03-10 18:25:03 +02:00
Alex Hirsch f6fd03485e Fix C++ code used for doxygen test 2018-03-10 18:04:12 +02:00
Jukka Laurila 2fcd9d35c5 Add test for bug https://github.com/mesonbuild/meson/issues/3185 2018-03-09 01:32:22 +01:00
Jussi Pakkanen 8bd33ab981
Merge pull request #3195 from sarum9in/link_whole-generators
Get generated headers from link_whole_targets as meson does for link_targets
2018-03-07 21:05:24 +02:00
Aleksey Filippov c03a2fd283 Add indentation to 'common/64 custom header generator' test case 2018-03-07 19:56:49 +02:00
Aleksey Filippov 9b6d2f8a25 Skip whole_archive test for VS older than 2015 2018-03-07 15:25:28 +00:00
Aleksey Filippov bcd076276e Add 'common/180 generator link whole' test case
This test covers usage of generated files in static_library
that is later linked into shared_library.
2018-03-07 00:44:44 +00:00
Jussi Pakkanen e98ae58d0e
Merge pull request #3086 from sarum9in/declare-link-whole
Add declare_dependency() link_whole parameter
2018-03-06 21:08:54 +02:00
Evgenii Shatokhin 19718a8d9c Allow passing a compiler object to run_command()
Sometimes it is needed to run the current compiler with specific options
not to compile a file but rather to obtain additional info. For example,
GCC has several -print-* options to query it about the paths to
different libraries and development files. One use case is to get the
location of development files for GCC plugins, which is not easily
obtainable by other means:

  gcc -print-file-name=plugin

For this purpose, it would be convenient if the compiler object returned
by meson.get_compiler(lang) could be used in run_command() directly.
This commit implements it.

Signed-off-by: Evgenii Shatokhin <eshatokhin@virtuozzo.com>
2018-03-06 21:07:16 +02:00
Aleksey Filippov 9f1d4c0dbe Add declare_dependency() test for transitive link_whole 2018-03-06 01:44:26 +00:00
Aleksey Filippov cd245eccbd Add declare_dependency() test for link_whole 2018-03-06 01:44:26 +00:00
Jussi Pakkanen 0744601fda
Merge pull request #3171 from jon-turney/flake8
Fix flake8 issues
2018-03-05 00:03:34 +02:00
Jussi Pakkanen 06dadfc45f Make gtkdoc test pass on Debian unstable. 2018-03-04 20:04:20 +02:00
Jon Turney cd5dba5358 Fix flake8 'imported but unused' reports
$ flake8 | grep F401
./meson.py:17:1: F401 'mesonbuild.mesonlib' imported but unused
./meson.py:18:1: F401 'locale' imported but unused
./run_unittests.py:24:1: F401 'sys' imported but unused
./mesonbuild/minit.py:2:1: F401 'pyclbr.Function' imported but unused
./mesonbuild/minit.py:18:1: F401 'os' imported but unused
./mesonbuild/backend/vs2010backend.py:15:1: F401 'sys' imported but unused
./mesonbuild/backend/xcodebackend.py:19:1: F401 'sys' imported but unused
./mesonbuild/dependencies/ui.py:20:1: F401 'shutil' imported but unused
./mesonbuild/modules/python3.py:15:1: F401 'sys' imported but unused
./mesonbuild/modules/unstable_icestorm.py:15:1: F401 '..compilers' imported but unused
./mesonbuild/modules/unstable_icestorm.py:15:1: F401 '..mlog' imported but unused
./test cases/common/98 gen extra/srcgen3.py:3:1: F401 'os' imported but unused
2018-03-03 21:06:45 +00:00
Jussi Pakkanen 59e7ea169f
Merge pull request #2311 from trhd/setups
Improve test setup selection.
2018-02-27 21:40:32 +02:00
Jon Turney 16f80b4c50 Enable 'test cases/frameworks/10 gtk-doc' for gtkdoc >= 1.26
Enable 'test cases/frameworks/10 gtk-doc' if gtkdoc version is 1.26 or
later.

Old versions of gtkdoc-scan also output the version to stdout rather than
stderr, so be sure to handle that...
2018-02-27 20:43:51 +02:00
Aleksey Filippov d040ce4165 Refactor 'common/145 whole archive' test case
Former test is extremely hard to follow,
target names are inconsistent with directory names,
test case mixes up 2 separate testing scenarios,
names are meaningless. In order to fix this
provides comments what each command is doing and why,
renamed targets into descriptive and longer names,
made names consistent with contents so that it is easier
to follow test logic without looking up source code.
2018-02-27 20:43:02 +02:00
Jussi Pakkanen cb176e9303 Look up compilers based on sources from deps, too. Closes #2768. 2018-02-27 20:40:41 +02:00
Hemmo Nieminen 473dc80701 Add some test setup selection tests. 2018-02-25 21:44:59 +02:00
Jussi Pakkanen ea3b54d402 Use include_directories for D impdirs.
Change the code to store D properties as plain data. Only convert them
to compiler flags in the backend. This also means we can fully parse D
arguments without needing to know the compiler being used.
2018-02-25 19:42:15 +02:00
Aleksey Filippov d6b5d7fe9f Add library with generated_pc and PkgConfigDependency support to pkgconfig.generate() 2018-02-24 23:41:08 +00:00
Jussi Pakkanen f223aa56a7 Made test program consist of two source files. 2018-02-25 01:21:35 +02:00
Jussi Pakkanen 26010807db Removed test dir 4 which was doing the same thing as the other test dir number 4. 2018-02-25 01:14:01 +02:00
Jussi Pakkanen 0c3af38c3e Renamed test dir with duplicate number. 2018-02-25 01:12:42 +02:00
Jussi Pakkanen 2488ccfa1c Skip tests if deps are not found. 2018-02-25 01:10:56 +02:00
Ran Benita 4d8e4654cb Warn if non-permitted keyword arguments are given to compiler methods
This can help future generations avoid mistakes like this:
edb1c66239

To avoid breaking builds, this is currently just an error. After
sufficient time has passed this can hopefully become a hard error,
similarly to the already-existing `permittedKwargs` warnings.
2018-02-23 04:35:15 +02:00
Ran Benita 6ec401af4b Remove invalid kwarg from test cases/linuxlike/9 compiler checks with dependencies
cc.has_function() does not accept a `name` keyword argument.
2018-02-23 04:29:49 +02:00
Aleksey Filippov c88f569599 Fix comment misprint in 'test cases/common/51 pkgconfig-gen/dependencies' 2018-02-23 01:43:30 +00:00
Adam C. Foltzer 3332f33649 Fix Rust compiler-private library ambiguity
When building a Rust target with Rust library dependencies, an
`--extern` argument is now specified to avoid ambiguity between the
dependency library, and any crates of the same name in `rustc`'s
private sysroot.

Includes an illustrative test case.
2018-02-22 22:16:58 +02:00
Jussi Pakkanen 2f21e1ffc0
Merge pull request #3060 from jon-turney/always-run-framework-tests
Always run all framework tests on all platforms
2018-02-22 20:29:28 +02:00
Aleksey Filippov 56c6489a6c Fix wxwidgets dependency: pass modules to wx-config
Fixes #3123
2018-02-22 20:27:19 +02:00
Peter Hutterer 6b550ae91f Allow for missing install_dir in install_data()
The documentation doesn't require it and the interpreter code works around the
possibility of it being None. The ninja backend code however fails with

File "/home/whot/code/meson/mesonbuild/backend/ninjabackend.py", line 796, in generate_data_install
    dstabs = os.path.join(subdir or None, plain_f)
File "/usr/lib64/python3.6/posixpath.py", line 78, in join
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType

If install_dir is missing, default to datadir/projectname
2018-02-22 20:26:16 +02:00
Niclas Moeslund Overby c572d222da Use dependency link arguments in C# targets 2018-02-22 20:24:42 +02:00
Jon Turney 7a618d2817 Fix test cases/frameworks/19 pcap for OSX 2018-02-21 17:10:06 +00:00
Jon Turney 8d5c660944 Make test cases/frameworks/15 llvm tolerate no libtinfo
libtinfo only exists if ncurses is configured --with-termlib
2018-02-21 17:10:05 +00:00
Jon Turney 8a48e43fd9 In test cases/frameworks/8 flex, ensure yyparse() is prototyped
Old versions of bison (including the one shipped with macOS) do not
prototype yyparse(), just in case you are using a K&R compiler...
2018-02-21 17:10:05 +00:00
Jon Turney 6243262b67 Fix test cases/frameworks/6 gettext for windows
Allow installed file 'intlprog' to have .exe extension
2018-02-21 17:10:05 +00:00
Jon Turney 67ef738d61 Skip test cases/frameworks/20 cups if cups not found 2018-02-21 17:10:05 +00:00
Jon Turney c650bd78ca Skip test cases/frameworks/19 pcap if pcap not found 2018-02-21 17:10:05 +00:00
Jon Turney a0e98326ca Skip test cases/frameworks/16 sdl2 if sdl2 not found 2018-02-21 17:10:05 +00:00
Jon Turney 2aa7f14223 Skip test cases/frameworks/15 llvm if llvm not found 2018-02-21 17:10:04 +00:00
Jon Turney d78f88160a Skip test cases/frameworks/13 yelp if itstool isn't found 2018-02-21 17:10:04 +00:00