aboutsummaryrefslogtreecommitdiff
path: root/test cases
AgeCommit message (Collapse)AuthorFilesLines
2020-05-26opts: Allow string concatenation (fixes #7199)Daniel Mensinger1-3/+3
2020-05-26Merge pull request #7197 from jon-turney/test-output-check-mandatoryJussi Pakkanen10-0/+70
Make the expected output check mandatory for failing-meson and warning-meson tests
2020-05-23Add expected stdout for failing-meson tests which are missing itJon Turney10-0/+70
2020-05-23ast: add unittestDaniel Mensinger1-2/+15
2020-05-23Revert "Merge pull request #7172 from jon-turney/test-output-check-mandatory"Jussi Pakkanen10-70/+0
This reverts commit 0871b1032c53287a1ed3ce5108799fb0daccaec5, reversing changes made to 9dc3ca2c1c9fbb47e731551c6432df144f725261.
2020-05-22Merge pull request #7172 from jon-turney/test-output-check-mandatoryJussi Pakkanen10-0/+70
Make the expected output check mandatory for failing-meson and warning-meson tests
2020-05-18pass exe_wrapper to test scripts through the environmentDylan Baker3-0/+36
This adds a new MESON_EXE_WRAPPER environment variable containing the string form of the exe_wrapper, if there is an exe_wrapper defined. Fixes #4427
2020-05-18backends: Consider arguments passed to a test when cross compilingDylan Baker13-0/+0
Otherwise a wrapper script which takes an executable as an argument will mistakenly run when that executable is cross compiled. This does not wrap said executable in an exe_wrapper, just skip it. Fixes #5982
2020-05-18backends: ensure that test executables can be run when passed as argumentsDylan Baker3-0/+25
If an executable is passed as an argument to a script in the build directory that it resides in then it will not execute (on *nix) due to a lack of ./. Ie, `foo` must be called as `./foo`. If it is called from a different directory it will work. Ie `../foo` or `bar/foo`. Fixes #5984
2020-05-18Merge pull request #7103 from dankegel/bug4027-rpath-rememberJussi Pakkanen15-3/+59
Let .pc files and LDFLAGS provide rpaths.
2020-05-16Let LDFLAGS specify rpath.Dan Kegel5-0/+18
Fixes #2567
2020-05-16Let .pc files specify rpath.Dan Kegel10-3/+41
Fixes #4027
2020-05-15Add expected stdout for failing-meson tests which are missing itJon Turney10-0/+70
2020-05-15travis/macos: Restore the old pkg-config behaviourNirbheek Chauhan1-1/+1
We need to test both "have pkg-config" and "don't have pkg-config" pathways on macOS, which is why pkg-config was only installed in one branch based on --unity=on/off.
2020-05-14interpreter: Rename has_exe_wrapper -> can_run_host_binariesDylan Baker3-3/+3
The implementation of this function has changed enough that the name doesn't really reflect what it actually does. It basically returns true unless you're cross compiling, need and exe_wrapper, and don't have one. The original function remains but is marked as deprecated. This makes one small change the meson source language, which is that it defines that can_run_host_binaries will return true in build == host compilation, which was the behavior that already existed. Previously this was undefined in build == host compilation.
2020-05-14interpreterbase: Allow passing an extra message in feature/deprecation warningsDylan Baker1-1/+1
The intended use it to tell people the new thing to do.
2020-05-14gnome.generate_gir: Fix missing include directoriesXavier Claessens6-3/+175
This revert a part of #7020 because it was using gir_inc_dirs before it is set. Properly fix typelib_includes instead that was working only when g-i is a pkgconfig dependency.
2020-05-13Merge pull request #6620 from jon-turney/test-output-checkDylan Baker111-21/+782
Add a mechanism for validating meson output in tests
2020-05-11ConfigToolDependency: Don't fallback to system tool when cross compilingXavier Claessens1-1/+1
The system tool is always the wrong thing to use and cause hard to debug issues when trying to link system libraries with cross built binaries. The ExternalDependency base class already had a method to deal with this, used by PkgConfigDependency and QtBaseDependency, so it should make things more consistent.
2020-05-08Allow indexed custom target to be used in executable's depends.Szabi Tolnai3-0/+42
Change-Id: I7f3e0e0dd9c413d7f6e3267de9664b89f2294e27
2020-05-08rename unstable-kconfig to unstable-keyvalPaolo Bonzini11-11/+11
Discussions in #6524 have shown that there are various possible uses of the kconfig module and even disagreements in the exact file format between Python-based kconfiglib and the tools in Linux. Instead of trying to reconcile them, just rename the module to something less suggestive and leave any policy to meson.build files. In the future it may be possible to add some kind of parsing through keyword arguments such as bool_true, quoted_strings, etc. and possibly creation of key-value lists too. For now, configuration_data objects provide an easy way to access quoted strings. Note that Kconfig stores false as "absent" so it was already necessary to write "x.has_key('abc')" rather than the more compact "x['abc']". Therefore, having to use configuration_data does not make things much more verbose.
2020-05-06Merge pull request #7064 from dcbaker/gtest-protocolJussi Pakkanen1-2/+2
Add support for Gtest as a test protocol
2020-05-04Add native support for gtest testsDylan Baker1-2/+2
Gtest can output junit results with a command line switch. We can parse this to get more detailed results than the returncode, and put those in our own Junit output. We basically just throw away the top level 'testsuites' object, then fixup the names of the tests, and shove that into our junit.
2020-05-04Add regression test for libdir reset.Jussi Pakkanen2-0/+3
2020-05-03Merge pull request #7060 from dcbaker/install-script-targetsJussi Pakkanen11-8/+122
Allow meson.add_*_script to take additional types
2020-05-02Merge pull request #6838 from dcbaker/link-language-in-librariesJussi Pakkanen5-0/+43
Link language in libraries
2020-05-01boost: Only use usage-requirements defines (fixes #7046)Daniel Mensinger1-1/+1
2020-04-30Allow get_variable to still function when the fallback is a disabler.James Hilliard1-0/+28
2020-04-30Add expected stdout for failing-meson and warning-meson testsJon Turney97-10/+722
Initially produced using: for d in "test cases/failing/"* ; do rm -r _build ; ./meson.py setup "$d" _build | grep ERROR >"$d"/expected_stdout.txt; done then converted to json with jq using: jq --raw-input --slurp 'split("\n") | {stdout: map({line: select(. != "")})}' expected_stdout.txt >test.json or merged with existing json using: jq --slurp '.[0] + .[1]' test.json expected.json >test.json.new v2: Add some comments to explain the match when it isn't totally obvious v3: Add or adjust existing re: in expected output to handle '/' or '\' path separators appearing in message, not location. v4: Put expected stdout in test.json, rather than a separate expected_stdout.txt file Park comments in an unused 'comments' key, as JSON doesn't have a syntax for comments
2020-04-30Skip failing tests when they won't fail in the expected wayJon Turney14-11/+60
2020-04-30interpreter: Add link_language to all build targetsDylan Baker2-0/+11
If the feature hadn't been broken in the first place it would have worked on them anyway, so we might as well expose it. I'm loathe to do it because one of the best features of meson in a mixed C/C++ code base is that meson figures out the right linker every time, but there are cases people have where they want to force a linker. We'll let them keep the pieces.
2020-04-30tests: Add common test for link_languageDylan Baker4-0/+32
It's cool we have a fortran test, but we should have a C/C++ test, especially for C++ extern "C".
2020-04-30allow postconf and dist scripts to use Files, ExternalPrograms, andDylan Baker2-1/+7
ConfigureFiles These things are all known to be ready when these scripts are run, and thus they can safely consume them.
2020-04-30interpreter: Allow install_script to use additional input typesDylan Baker9-7/+115
This adds support for Files, CustomTarget, Indexs of CustomTargets, ConfigureFiles, ExternalPrograms, and Executables. Fixes: #1234 Fixes: #3552 Fixes: #6175
2020-04-28tests: Skip hotdoc test if hotdoc is not installedDaniel Mensinger1-1/+4
2020-04-28tests: Add support for specifying tool requirementsDaniel Mensinger2-2/+8
Adds the `tools` section to `tests.json` to specify requirements for the tools in the environment. All tests that fail at least one tool requirements check are skipped.
2020-04-28tests: Avoid a CMake error by checking the CMake versionDaniel Mensinger2-7/+18
2020-04-28find_program: Fixes when the program has been overridden by executableXavier Claessens2-2/+8
- ExternalProgramHolder has path() method while CustomTargetHolder and BuildTargetHolder have full_path(). - The returned ExternalProgramHolder's path() method was broken, because build.Executable object has no get_path() method, it needs the backend. - find_program('overridden_prog', version : '>=1.0') was broken because it needs to execute the exe that is not yet built. Now assume the program has the (sub)project version. - If the version check fails, interpreter uses ExternalProgramHolder.get_name() for the error message but build.Executable does not implement get_name() method.
2020-04-25wrap: Add test case for local source / patch filesDaniel Mensinger12-8/+30
2020-04-21Merge pull request #6816 from dcbaker/framework-matrixJussi Pakkanen4-17/+37
project test junit schema + a few more uses
2020-04-17interpreter: Correctly ignore def files in build directoryXavier Claessens2-0/+16
See https://gitlab.freedesktop.org/gstreamer/gst-build/-/issues/85.
2020-04-17tests: Convert sdl2 to use a matrix optionDylan Baker3-17/+22
2020-04-17tests: use a json matrix for MPIDylan Baker1-0/+15
This is a nice way to ensure that all of the methods continue to work
2020-04-17cmake: Do not compile explicit header filesDaniel Mensinger10-0/+118
2020-04-17tests/common/203: Use a test matrixDylan Baker3-24/+41
This allows us to test the one at a time, and the many at a time functions without the second test getting cached. We really don't want to get cached.
2020-04-17tests/common/93: Fix cross building when no exe_wrapper is availableDylan Baker1-1/+13
By building the generator for the build machine always, and only for the host machine if an exe_wrapper is available. This makes sense to me as generally you are going to build the generator for the build machine, not the host machine, but testing on the host machine makes sense too.
2020-04-12Merge pull request #6963 from mensinda/cmFixCCmdJussi Pakkanen2-0/+19
cmake: some fixes for add_custom_command
2020-04-12Merge pull request #6958 from jon-turney/fix-name-prefix-explicit-defaultJussi Pakkanen2-1/+7
Fix library(name_prefix: [])
2020-04-12cmake: Preserve include directory order (fixes #6959)Daniel Mensinger19-0/+134
2020-04-12cmake: Capture stdout with UNIX pipesDaniel Mensinger2-0/+13