summaryrefslogtreecommitdiff
path: root/test cases/vala
AgeCommit message (Collapse)Author
2021-08-15editorconfig: add setting to trim trailing whitespaceEli Schwartz
and clean up all outstanding issues Skip 'test cases/common/141 special characters/meson.build' since it intentionally uses trailing newlines.
2021-05-20Revert "Disable failing Cygwin GIR test."Jon Turney
This partially reverts commit add502c6483bde9dc6a0ba80b3c79163304465a4.
2021-05-20vala: Test that adding C manually isn't requiuredDylan Baker
2021-02-18Disable failing Cygwin GIR test.Jussi Pakkanen
2020-11-17gnome: Drop use of volatile in GLib type functionsPhilip Withnall
See https://gitlab.gnome.org/GNOME/glib/-/issues/600 `volatile` was previously mistakenly used in GLib to indicate that a variable was accessed atomically or otherwise multi-threaded. It’s not meant for that, and up to date compilers (like gcc-11) will rightly warn about it. Drop the `volatile` qualifiers. Based on a patch by Jeff Law. See also http://isvolatileusefulwiththreads.in/c/. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2020-08-07interpreter: Lower case languages before checking if 'c' is in the listXavier Claessens
Fixes: #7495
2020-02-25test: merge installed_files.txt into test.jsonDaniel Mensinger
2019-03-22Disallow add_languages('vala') without 'c'Jon Turney
v2: Exercise add_lanagues('vala') after 'c' in a test case
2018-09-14run_proect_tests: add cygwin as platform fix nameMarco Trevisan (Treviño)
2018-09-14test cases: add missing files to installed_files.txtMarco Trevisan (Treviño)
All these are marked as files to be installed, so we need list them.
2018-08-15Kill tabs dead! For good!Jussi Pakkanen
2018-06-10vala: fix extract_all_objects() resultPaolo Bonzini
Because vala is not listed in clike_langs, is_source(fname) is returning False for Vala source files. Therefore, extract_all_objects() is completely empty for Vala programs. Fixes #791
2018-05-10vala: Fix shared_module linking with export_dynamic executableNirbheek Chauhan
Need to generate a vapi and a header, and then use that in the shared module. Needed for GNOME games. Closes https://github.com/mesonbuild/meson/issues/3538
2018-02-20vala: Fix path of C file with generated Vala filesNirbheek Chauhan
We missed one particular edge-case in #2413: when the generated vala file is inside --basedir, the path is not just the basename.c Since this case can never happen in a project test, this includes a unit test for the same. Closes https://github.com/mesonbuild/meson/issues/815
2018-01-06Use GObject-based libraries in test case/vala/11 generated vapiJon Turney
Non-GObject-based libraries are not (reliably) introspectable, and this only happens to work by accident, at the moment. Briefly: In non-libtool mode, g-ir-scanner inspects the run-time dependencies of a generated executable to determine the shared library name an -l flag corresponds to. But this generated executable only references the libraries by *_get_type() functions. So, if the library doesn't contain any Gobject-based types, it is not referenced, and this inspection fails with PECOFF binaries. It seems that distutils doesn't currently decide to use --as-needed, so this just happens to work on ELF.
2018-01-06Fix installed files check for gobject-introspection tests on CygwinJon Turney
g-ir-scanner --no-libtool needed some fixes similar to [1] for Cygwin, as well. Now that is done, it's possible to make these tests run and pass on Cygwin. [1] https://bugzilla.gnome.org/show_bug.cgi?id=781525
2017-12-11Fix Vala thread flag breakage (#2756)Ernestas Kulik
2017-10-03Add additional directory depth tests to Vala test case 22Alistair Thomas
2017-10-03Reduce code complexity, fix nested array in files instructionCorentin Noël
2017-10-02Allow different directories for Vala filesCorentin Noël
2017-09-18ninja: Fix the dependency on the VAPI when 'vala_vapi' is usedGuillaume Poirier-Morency
2017-06-30vala: Add a shared module testcase using 'GLib.TypeModule'Guillaume Poirier-Morency
2017-06-27Merged Genie support.Jussi Pakkanen
2017-06-27Merge pull request #1986 from phako/masterJussi Pakkanen
Skip handling non-available dependencies
2017-06-26Add test for Genie with multiple and mixed sourcesAlistair Thomas
2017-06-26Add test case for compiling a Genie fileAlistair Thomas
2017-06-26Add a test for ignoring not-found vala depsNirbheek Chauhan
https://github.com/mesonbuild/meson/pull/1986
2017-06-22vala: Only add --use-header for unity buildsNirbheek Chauhan
Closes https://github.com/mesonbuild/meson/issues/1969
2017-06-17Make external library no-op when used with incompatible target (#1941)Nirbheek Chauhan
* tests: Add a test for C library in Vala target https://github.com/mesonbuild/meson/issues/1939 * Make external library no-op when used with incompatible target This is how it used to behave earlier, but we accidentally regressed Closes https://github.com/mesonbuild/meson/issues/1939
2017-06-02Don't add dependencies recursively while linkingNirbheek Chauhan
We were doing this on the basis of an old comment, but there was no test for it and I couldn't reproduce the issue with clang on Linux at all. Let's add a (somewhat comprehensive) test and see if it breaks anywhere if we stop doing this. Halves the size of gstreamer's build.ninja from 20M to 8.7M Closes https://github.com/mesonbuild/meson/issues/1057
2017-05-14ninja: Deduplicate dependent vapisOle André Vadla Ravnås
The Vala compiler does not like being fed the same .vapi multiple times.
2017-05-13ninja: Also include Vala headers in generated headersOle André Vadla Ravnås
2017-04-12vala: Allow installation into default directoriesNirbheek Chauhan
For generated headers, vapis, and GIRs. https://github.com/mesonbuild/meson/pull/1469#issuecomment-292814000
2017-04-04Support multiple install dirs for built/custom targetsNirbheek Chauhan
You can now pass a list of strings to the install_dir: kwarg to build_target and custom_target. Custom Targets: =============== Allows you to specify the installation directory for each corresponding output. For example: custom_target('different-install-dirs', output : ['first.file', 'second.file'], ... install : true, install_dir : ['somedir', 'otherdir]) This would install first.file to somedir and second.file to otherdir. If only one install_dir is provided, all outputs are installed there (same behaviour as before). To only install some outputs, pass `false` for the outputs that you don't want installed. For example: custom_target('only-install-second', output : ['first.file', 'second.file'], ... install : true, install_dir : [false, 'otherdir]) This would install second.file to otherdir and not install first.file. Build Targets: ============== With build_target() (which includes executable(), library(), etc), usually there is only one primary output. However some types of targets have multiple outputs. For example, while generating Vala libraries, valac also generates a header and a .vapi file both of which often need to be installed. This allows you to specify installation directories for those too. # This will only install the library (same as before) shared_library('somevalalib', 'somesource.vala', ... install : true) # This will install the library, the header, and the vapi into the # respective directories shared_library('somevalalib', 'somesource.vala', ... install : true, install_dir : ['libdir', 'incdir', 'vapidir']) # This will install the library into the default libdir and # everything else into the specified directories shared_library('somevalalib', 'somesource.vala', ... install : true, install_dir : [true, 'incdir', 'vapidir']) # This will NOT install the library, and will install everything # else into the specified directories shared_library('somevalalib', 'somesource.vala', ... install : true, install_dir : [false, 'incdir', 'vapidir']) true/false can also be used for secondary outputs in the same way. Valac can also generate a GIR file for libraries when the `vala_gir:` keyword argument is passed to library(). In that case, `install_dir:` must be given a list with four elements, one for each output. Includes tests for all these. Closes https://github.com/mesonbuild/meson/issues/705 Closes https://github.com/mesonbuild/meson/issues/891 Closes https://github.com/mesonbuild/meson/issues/892 Closes https://github.com/mesonbuild/meson/issues/1178 Closes https://github.com/mesonbuild/meson/issues/1193
2016-12-19tree-wide: remove unused importsIgor Gnatenko
./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>
2016-12-16tests/vala/14: Disable running of GTK+ testNirbheek Chauhan
There's no X on the Travis CI, so disable this for now.
2016-12-15Add a test that uses hand-written vapi filesNirbheek Chauhan
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.
2016-12-15Test target glib version and gresources in ValaNirbheek Chauhan
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.
2016-12-15Add a testcase for 'Duplicate outputs' bugSam Thursfield
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'
2016-12-04Renamed dirs to plug holes in numbering.Jussi Pakkanen
2016-11-14Rename test cases to remove duplicate numbers.Elliott Sales de Andrade
2016-11-12vala: Generate GIR into the build directory (fix #185)Guillaume Poirier-Morency
Add a Vala test generating GIR and typelib files.
2016-11-12vala: Implement valac.find_libraryNirbheek Chauhan
Move CCompiler.compile to Compiler.compile so that ValaCompiler can use it. Also rewrite ValaCompiler.sanity_check to use it since it does a simple compile check. At the same time, it enhances ExternalLibrary to support arguments for languages other than C-like. Includes a test for this that links against zlib through Vala. Closes #983
2016-11-12Revert "vala: Build with '--nostdpkg'", MR #920Jussi Pakkanen
This reverts commit 0f098c37ae3f257649eae7566391ad74b7010c45.
2016-11-12vala: Fix compiled object extractionNirbheek Chauhan
Fixes #791
2016-11-12vala: Build with '--nostdpkg'Guillaume Poirier-Morency
Since Vala require 'glib-2.0' and 'gobject-2.0' dependencies, it's better to fail at 'valac' step with meaningful error. Add missing 'gobject-2.0' dependency on the mixed source test case.
2016-11-02Merge pull request #895 from mesonbuild/wip/tingping/gnome-vapiJussi Pakkanen
gnome: Add generate_vapi function
2016-10-25Merge pull request #912 from valum-framework/wip/vala-custom-header-and-vapiJussi Pakkanen
vala: Custom header and vapi name (fix #892)
2016-10-24vala: Custom header and vapi name (fix #892)Guillaume Poirier-Morency
2016-10-21gnome: Add generate_vapi() functionPatrick Griffis
This allows C projects to generate vapi bindings from gir files and returns a dependency that can be used by Vala.