aboutsummaryrefslogtreecommitdiff
path: root/test cases/unit
AgeCommit message (Collapse)AuthorFilesLines
2020-11-21Create unit test for C++ modules and accept ixx as C++ source extension.Jussi Pakkanen12-0/+92
2020-11-13Use c99 instead of c11 for buildoptions testjpark371-1/+1
Older verisons of MSVC do not support C11 properly.
2020-11-03Condense test directory names again.Jussi Pakkanen33-0/+0
2020-11-01interpreter: store correct files for project regenerationDylan Baker4-0/+14
Right now sub-sub projects are not correctly registered, because we don't have a way to pass up past the first level of subproject. This patch changes that by making the build_Def_files as defined in the Interpreter initializer accurate for translated dependencies, ie, cmake dependencies won't define a dependency on a non-existent meson.build. This means that it can always add the subi.build_def_files because they are always accurate.
2020-10-15intro: Add extra_files key to intro output (fixes #7310)Daniel Mensinger3-3/+12
2020-10-07Tests: py.dependency() now has required:true by defaultXavier Claessens1-1/+1
It used to ignore the required argument and got fixed to be consistent with dependency() function.
2020-10-05options: Handle updates to choices in optionsDylan Baker3-0/+27
Currently if you change the `choices` field in the meson_options.txt file, no update will be done until `meson setup --wipe` is called. Now if the choices change then the options will be properly merged. If the currently select value is still valid it is guaranteed to be kept, if it is now invalid the new default value will be used and a warning will be printed. Fixes #7386
2020-10-05Never run clang-format / clang-tidy against directoriesBernd Busse2-0/+2
`pathlib.Path.glob()` also returns directories that match source filenames (i.e. a directory named `test.h/`), but `clang-format` and `clang-tidy` fail when handed a directory. We manually skip calling `clang-format` and `clang-tidy` on those directories.
2020-09-14InternalDependency: Add as_link_whole() methodXavier Claessens3-0/+23
2020-09-09Merge pull request #7428 from jon-turney/introspector-add-languagesJussi Pakkanen1-0/+2
Handle add_languages(native:) in introspector
2020-09-09Add a test of add_languages(native:) introspectionJon Turney1-0/+2
If the meson.build doesn't use a native compiler, the native compiler options (e.g. 'c_args') shouldn't be present in the output of 'meson introspect --buildoptions'.
2020-09-08IntrospectInterpreter: allow dictionaries with nonconstant keysPaolo Bonzini1-0/+1
Something like {a: foo} currently stymies the IntrospectionInterpreter and breaks introspection of the source directory. The fix is just to walk the keys and return a dummy dictionary. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-09-04introspect: add test dependencies info to test/benchmark JSONPaolo Bonzini2-2/+10
Add the ids of any target that needs to be rebuilt before running the tests as computed by the backend, to the introspection data for tests and benchmarks. This also includes anything that appears on the test's command line. Without this information, IDEs must update the entire build before running any test. They can now instead selectively build the test executable itself and anything that is needed to run it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-09-02Special case meson.version().version_compare() statementXavier Claessens1-0/+17
when that statement gets evaluated, the interpreter remembers the version target and if it was part of the evaluation of a `if` condition then the target meson version is temporally overriden within that if-block. Fixes: #7590
2020-08-27tests: update .gitignoreDaniel Mensinger1-0/+1
2020-08-18Interpreter: Fix c_stdlib usageXavier Claessens6-0/+82
- Exceptions raised during subproject setup were ignored. - Allow c_stdlib in native file, was already half supported. - Eliminate usage of subproject variable name by overriding '<lang>_stdlib' dependency name.
2020-08-01run dircondensor.pyDylan Baker20-0/+0
2020-07-30Allow setting project options from cross or native filesDylan Baker2-0/+4
This allows adding a `[project options]` section to a cross or native file that contains the options defined for a project in it's meson_option.txt file.
2020-07-21summary: Wrap lines when printing listsXavier Claessens1-0/+1
When a list_sep is provided (e.g. ', ') all items are printed on the same line, which gets ugly on very long lists (e.g. list of plugins enabled).
2020-07-01wrap: Add 'provide' sectionXavier Claessens1-2/+1
2020-06-30wrap: Apply patch even in VCS casesXavier Claessens3-0/+11
2020-06-22unittests: Fix test_identity_cross on SolarisAlan Coopersmith2-4/+16
Since mesonbuild/environment.py doesn't recognize Studio compilers, force use of gcc on Solaris for now. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2020-05-23ast: add unittestDaniel Mensinger1-2/+15
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-14interpreter: Rename has_exe_wrapper -> can_run_host_binariesDylan Baker1-1/+1
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-04Add regression test for libdir reset.Jussi Pakkanen2-0/+3
2020-04-30allow postconf and dist scripts to use Files, ExternalPrograms, andDylan Baker1-0/+1
ConfigureFiles These things are all known to be ready when these scripts are run, and thus they can safely consume them.
2020-04-17interpreter: Correctly ignore def files in build directoryXavier Claessens2-0/+16
See https://gitlab.freedesktop.org/gstreamer/gst-build/-/issues/85.
2020-03-06ast: Implement dummy evaluate_notstatementDaniel Mensinger1-0/+1
2020-02-26summary: Add list_sep keyword argumentXavier Claessens1-0/+1
This allows having lists on a single line instead of having each value aligned on a new line.
2020-02-01summary: Fix empty list caseXavier Claessens1-0/+1
Fixes: #6557.
2020-01-21Use python3 in some tests which were still using pythonSebastien Bacher5-5/+5
The unversioned command is deprecated and removed from some distributions
2020-01-17wrap: Fix support of file:// URLsXavier Claessens3-0/+4
Fixes: #6445
2020-01-08Rename test dirs to sequential order.Jussi Pakkanen36-0/+0
2019-12-19summary: Change 'section' to be a kwarg instead of positionalXavier Claessens1-8/+8
Fixes: #6372.
2019-12-12summary: Add bool_yn keyword argumentXavier Claessens1-0/+2
2019-12-12summary: Allow section with no title, and passing key/value separatelyXavier Claessens2-6/+3
2019-12-12Add a summary() function for configuration summarizationXavier Claessens3-0/+23
Based on patch from Dylan Baker. Fixes #757
2019-12-10mintro: Add version key to --scan-dependencies (fixes #6287)Daniel Mensinger1-2/+3
2019-11-18Use strict function prototypesMichael Hirsch, Ph.D19-20/+20
2019-11-13coredata: CmdLineFileParser no longer interpolates strings.Paulo Neves1-0/+1
Previously if a user tried to pass a command line build option that contained a '%' character the command line parser assumed that there was string interpolation to be done. As there is no sense in such a scenario no code provides any input for the interpolation. This then leads to a failure. In this commit we specifically override the defaults in ConfigParser and set interpolation to None, which disables command line build option interpolation. Fixes #6157
2019-11-13Revert "Add `-Wl,-rpath-link` for secondary dependencies"Jussi Pakkanen8-45/+0
This reverts commit 7b9c348102792030859ed0001a51416506a0a092. Closes #6027.
2019-11-06Fix typos found by codespellWolfgang Stöggl1-1/+1
- Typos were found by codespell v1.16.0
2019-10-21Remove duplicated object files in static librariesXavier Claessens4-0/+29
When a static library link_whole to a bunch of other static libraries, we have to extract all their objects recursively. But that could introduce duplicated objects. ar is dumb enough to allow this without error, but once the resulting static library is linked into an executable or shared library, the linker will complain about duplicated symbols.
2019-10-15Add test case to verify identity cross buildsRoss Burton3-0/+22
A build with a cross file should always be identified as a cross build, even if the host and build machine are identical. This was the case in 0.50, regressed in 0.51, and is fixed again in 0.52, so add a test case to ensure it doesn't regress again.