Elliott Sales de Andrade
78b030cf19
Add support for Files passed to generators.
...
I need this for windows.compile_resources to be able to use
configure_file results, but it may have other benefits.
8 years ago
Jussi Pakkanen
6ac9a8e738
Add .find_python() method. Supersedes #777 .
8 years ago
Jussi Pakkanen
24221d71cc
Created a Python 3 module for simpler building of Python extension modules.
8 years ago
Jussi Pakkanen
340781c515
Fix Gnome module.
8 years ago
Jussi Pakkanen
00f62d0755
Can get values in ConfigurationData objects.
8 years ago
Jussi Pakkanen
8f3616e72e
Compile asm only on supported cpus. Closes #1287 .
8 years ago
Nirbheek Chauhan
2589009d23
ifort: Derive from IntelCompiler base class
...
And fix the list of supported file suffixes, and use .f90 for all
fortran tests since ifort, the Intel Fortran compiler ignores files
ending with .f95, .f03, and .f08
8 years ago
Nirbheek Chauhan
6b774982fe
tests/common/94: Set the default C++ std to C++11
...
The Intel compiler does not support C++03, but does support C++11, so
use that as the lowest-common-denominator for our tests.
8 years ago
Nirbheek Chauhan
731aca216e
icc: Fix C/C++ std options and add a unit test for them
...
Compiler versions 15.0 and later actually ignore invalid values for the
-std= option unless `-diag-error 10159` is passed, so we need to put
that in the unit test.
I have tested this with versions 14.0.3, 15.0.6, 16.0.4, and 17.0.1.
Would be great if someone could test with 13.x.y
8 years ago
Nirbheek Chauhan
e36183aab4
tests: Use the new test skipping facility everywhere
8 years ago
Nirbheek Chauhan
28e491c706
Skip a few tests properly
8 years ago
Nirbheek Chauhan
2f5943d34d
Add a new test for depfile generation with spaces
...
This checks that dependency generation is correct even when the sources
and outputs have spaces in them.
8 years ago
Nirbheek Chauhan
f024114c29
tests/common/25: Remove spaces in exe name
...
ICC doesn't escape spaces in file paths while writing out the dependency
file, so don't use spaces to avoid a spurious failure.
8 years ago
Nirbheek Chauhan
84931e1f78
test/7 gnome: Fix on ICC and suppress a warning
...
Ignore warning 2282 about GCC pragmas since they are emitted in system
headers and are extremely spammy. They are emitted because ICC pretends
to be GCC via C macros but doesn't implement some pragmas.
https://bugzilla.gnome.org/show_bug.cgi?id=776562
Also, append to LD_LIBRARY_PATH because ICC uses that for some internal
libraries such as libintlc.so.
8 years ago
Nirbheek Chauhan
78325f884d
tests/failing build/1: Fix test with ICC
...
Explicitly warn with the `#warning` macro to ensure that ICC emits
a warning since ICC does not emit a warning for unused variables.
Also makes the test more reliable with other compilers.
8 years ago
Jussi Pakkanen
b3d51abff2
Can put external programs to test suite exe wrappers directly.
8 years ago
Jussi Pakkanen
74f15263b6
Can set envvars in test setups.
8 years ago
Jussi Pakkanen
ee8a6e6fc5
Can specify test setups and run them with mesontest.
8 years ago
Igor Gnatenko
2017d8578a
style: fix E226 violations
...
E226: missing whitespace around arithmetic operator
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years ago
Jussi Pakkanen
d716d53b32
Can override project option default values in subproject().
8 years ago
Jussi Pakkanen
73042c7912
Can set project options (but not global options) in subproject default options.
8 years ago
Jussi Pakkanen
f85c348b94
Move option file parsing to after the project() inputs have been decoded to access default options.
8 years ago
Elliott Sales de Andrade
157549fe72
Add include_directories to windows.compile_resources.
8 years ago
Jussi Pakkanen
775729eb59
Can specify include directories to compiler tests.
8 years ago
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.
8 years ago
Nirbheek Chauhan
18f581f2c4
Add an installed soname unit test
...
We also need to test that the sonames are correct after installation.
8 years ago
Jussi Pakkanen
98c4fd2d5d
Add per target argument for Fortran.
8 years ago
Jussi Pakkanen
701e393261
Make cross tests use same framework as regular tests.
8 years ago
Jussi Pakkanen
3fc67f4951
Minimal fixes to make tests pass when cross compiling.
8 years ago
Nirbheek Chauhan
589a56e78f
Cache the scripts used for postconf and install phases
...
Cache the absolute dir that the script is searched in and the name of
the script. These are the only two things that change.
Update the test to test for both #1235 and the case when a script of the
same name is in a different directory (which also covers the subproject
case).
Closes #1235
8 years ago
Igor Gnatenko
9ffc0d2f89
tree-wide: remove blank lines at EOF
...
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years ago
Igor Gnatenko
8268eb4959
tree-wide: remove unused imports
...
./setup.py:17:1: F401 'os' imported but unused
import os
^
./setup.py:37:1: F401 'stat.ST_MODE' imported but unused
from stat import ST_MODE
^
./run_tests.py:17:1: F401 'os' imported but unused
import subprocess, sys, os
^
./run_tests.py:18:1: F401 'shutil' imported but unused
import shutil
^
./run_unittests.py:23:1: F401 'mesonbuild.dependencies.Qt5Dependency' imported but unused
from mesonbuild.dependencies import PkgConfigDependency, Qt5Dependency
^
./mesonbuild/build.py:15:1: F401 '.coredata' imported but unused
from . import coredata
^
./mesonbuild/interpreter.py:32:1: F401 'subprocess' imported but unused
import os, sys, subprocess, shutil, uuid, re
^
./mesonbuild/interpreter.py:32:1: F401 're' imported but unused
import os, sys, subprocess, shutil, uuid, re
^
./mesonbuild/dependencies.py:23:1: F401 'subprocess' imported but unused
import os, stat, glob, subprocess, shutil
^
./mesonbuild/mesonlib.py:17:1: F401 'sys' imported but unused
import platform, subprocess, operator, os, shutil, re, sys
^
./mesonbuild/modules/qt5.py:15:1: F401 'subprocess' imported but unused
import os, subprocess
^
./mesonbuild/modules/pkgconfig.py:15:1: F401 '..coredata' imported but unused
from .. import coredata, build
^
./mesonbuild/scripts/scanbuild.py:15:1: F401 'sys' imported but unused
import sys, os
^
./mesonbuild/scripts/meson_exe.py:20:1: F401 'subprocess' imported but unused
import subprocess
^
./mesonbuild/scripts/meson_exe.py:22:1: F401 '..mesonlib.MesonException' imported but unused
from ..mesonlib import MesonException, Popen_safe
^
./mesonbuild/scripts/symbolextractor.py:23:1: F401 'subprocess' imported but unused
import os, sys, subprocess
^
./mesonbuild/scripts/symbolextractor.py:25:1: F401 '..mesonlib.MesonException' imported but unused
from ..mesonlib import MesonException, Popen_safe
^
./mesonbuild/scripts/meson_install.py:19:1: F401 '..mesonlib.MesonException' imported but unused
from ..mesonlib import MesonException, Popen_safe
^
./mesonbuild/scripts/yelphelper.py:15:1: F401 'sys' imported but unused
import sys, os
^
./mesonbuild/scripts/yelphelper.py:20:1: F401 '..mesonlib.MesonException' imported but unused
from ..mesonlib import MesonException
^
./mesonbuild/backend/vs2010backend.py:17:1: F401 're' imported but unused
import re
^
./test cases/vala/8 generated sources/src/copy_file.py:3:1: F401 'os' imported but unused
import os
^
./test cases/common/107 postconf/postconf.py:3:1: F401 'sys' imported but unused
import sys, os
^
./test cases/common/129 object only target/obj_generator.py:5:1: F401 'shutil' imported but unused
import sys, shutil, subprocess
^
./test cases/common/57 custom target chain/usetarget/subcomp.py:3:1: F401 'os' imported but unused
import sys, os
^
./test cases/common/95 dep fallback/subprojects/boblib/genbob.py:3:1: F401 'os' imported but unused
import os
^
./test cases/common/98 gen extra/srcgen.py:4:1: F401 'os' imported but unused
import os
^
./test cases/common/113 generatorcustom/gen.py:3:1: F401 'os' imported but unused
import sys, os
^
./test cases/common/113 generatorcustom/catter.py:3:1: F401 'os' imported but unused
import sys, os
^
./test cases/common/59 object generator/obj_generator.py:5:1: F401 'shutil' imported but unused
import sys, shutil, subprocess
^
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years ago
Nirbheek Chauhan
6b8df9da84
custom_target: Make directory outputs installable
...
This is useful in many cases where the list of files cannot be known in
advance and is just dumped inside a directory. For example when
generating documentation with doxygen and other tools that we don't have
built-in support for.
Includes a test for the same.
Closes #893
8 years ago
Nirbheek Chauhan
c693bd9bb4
Allow passing arguments to install scripts
...
Closes #1213
8 years ago
Nirbheek Chauhan
e3a529886c
tests/125 shared module: Run with the VS backend
...
This was skipped during the PR phase because it was broken, but we fixed
it later.
8 years ago
Nirbheek Chauhan
eaafca6f4a
Qt: Allow passing a name arg to preprocess()
...
This sets a unique name for the CustomTarget and the output cpp file.
Closes #959
8 years ago
Nirbheek Chauhan
6292122a19
has_header: Don't compile, only preprocess
...
Since we're checking for the existence of a header, just running the
preprocessor is enough. According to my benchmarks, doing this makes the
test roughly 2x faster.
I'm sure this will be useful for other checks too in the future.
This shaves off 7% on the configure time for glib on my machine.
This also fixes the issue that we had earlier where you had to specify
any extra headers needed to resolve symbols in the header being checked
for with `prefix`.
8 years ago
Nirbheek Chauhan
ff8cdf86f4
tests/vala/14: Disable running of GTK+ test
...
There's no X on the Travis CI, so disable this for now.
8 years ago
Nirbheek Chauhan
de0ce7f25c
Add a test that uses hand-written vapi files
...
To use these, you just need to add the .vapi file to your target as
a source.
This test specifically tests that hand-written vapis referring to
C headers work.
8 years ago
Nirbheek Chauhan
330d9ba7fe
Test target glib version and gresources in Vala
...
Test that the --target-glib= argument while compiling Vala files is set
properly by using a feature (GtkTemplate) that requires glib >=2.38.
At the same time, also test that the appropriate gresource arguments are
also set for Vala targets. For each gresource.xml that is compiled, we
must pass --gresources=path/to/gresource.xml to valac.
8 years ago
Sam Thursfield
627faa0d39
Add a testcase for 'Duplicate outputs' bug
...
With current Meson, this fails to configure with the following error:
Duplicate output 'dependency-generated/enum-types.h' from
'CustomTarget' 'enum-types.h'; conflicts with
'dependency-generated/enum-types.h' from 'CustomTarget'
'enum-types.h'
8 years ago
Jussi Pakkanen
b01d2c35b7
Only add build dir inlude directives if the corresponding dir exists. Closes #1185 .
8 years ago
Nirbheek Chauhan
2c83bd16fc
Test targets with only generated and prebuilt objects
8 years ago
Nirbheek Chauhan
3fad3cbb81
Test extracting static objects into a shared library
...
This was previously broken and we didn't know it. See #1169
8 years ago
Nirbheek Chauhan
3e2d894f55
Add test for cc.symbols_have_underscore_prefix
...
Also add MSVC support while doing so. Doesn't test 32-bit Windows yet
because I can't figure out how to do manual setup for function calls on
Win32 which also does symbol mangling. But this is fine for now.
8 years ago
Nirbheek Chauhan
4967b2a5ea
tests/common/124: Print an error when square fails
...
Otherwise we can't know why it failed and that makes it harder to debug.
8 years ago
Elliott Sales de Andrade
ec47db6c0c
Add Compiler.has_multi_arguments method.
...
It allows checking if a compiler supports a multi-argument option.
8 years ago
Jussi Pakkanen
5787a4b4fb
Make Java compilation work with inner classes. Closes #1157 .
8 years ago
Nirbheek Chauhan
38f6fee86d
Test that g++ and Clang++ can compile assembly
...
When there's no C compiler available
8 years ago
Nirbheek Chauhan
0cd11747f1
Add a test for LLVM IR and ASM compilation
8 years ago