aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-04-30backends/backends: sort and cleanup importsDylan Baker1-10/+14
2020-04-30mtest: use argparse.type to simplify some codeDylan Baker1-2/+1
2020-04-30mtest: Replace if (bool) { return bool; } with return bool;Dylan Baker1-3/+1
2020-04-30Allow get_variable to still function when the fallback is a disabler.James Hilliard3-1/+31
2020-04-30Update test.json schema to add stdoutJon Turney2-3/+28
Update the test.json schema, adding the 'stdout' property. Also amend the test.json schema so the presence of an unexpected property on the root object causes a validation error. v2: Also add 'tools' property to json schema. Amend the documentation not to use the word 'list' to describe a dict.
2020-04-30Update dircondenser.py tool to update paths in test.json as wellJon Turney1-0/+4
Update dircondenser.py tool to update paths appearing in the expected stdout in test.json when the containing directory is renamed.
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-30Add a mechanism for validating meson output in testsJon Turney2-0/+80
Expected stdout lines must match lines from the actual stdout, in the same order. Lines with match type 're' are regex matched. v2: Ignore comment lines in expected_stdout v3: Automatically adjust path separators for location in expected output v4: Put expected stdout in test.json, rather than a separate file
2020-04-30Cosmetic tweak to error message for incdir() with an absolute pathJon Turney1-2/+3
Cosmetic tweak to the error message for incdir() with an absolute path. Don't split the message in the middle of a sentence at a point which may or may not correspond to the terminal width.
2020-04-30Check before compiler detection if 'c' language is present when adding 'vala'Jon Turney1-5/+6
For the sake of a consistent error message (irrespective of if 'valac' is present or not), check if the 'c' language is present if we are adding 'vala' before (rather than after) we do compiler detection.
2020-04-30Be more careful about the use of repr() in error messagesJon Turney3-4/+7
Generally, we'd want to use str() rather than repr() in error messages anyhow, as that explicitly gives something designed to be read by humans. Sometimes {!r} is being used as a shortcut to avoid writing the quotes in '{!s}'. Unfortunately, these things aren't quite the same, as the repr of a string containing '\' (the path separator on Windows) will have those escaped. We don't have a good string representation to use for the arbitrary internal object used as an argument for install_data() when it's neither a string nor file (which doesn't lead to a good error message), so drop that for the moment.
2020-04-30Skip failing tests when they won't fail in the expected wayJon Turney14-11/+60
2020-04-30Make colourize_console() a functionJon Turney3-13/+30
Currently, colourize_console is a constant, set at process initialization. To allow the actual stdout to be easily compared with the expected when running tests, we want to allow colourization to be on for the test driver, but not for the in-process configure done by run_configure, which has stdout redirected from a tty to a pipe. v2: Cache _colorize_console per file object v3: Reset cache on setup_console()
2020-04-30Docs: Update link_language docs to explain when it should be usedDylan Baker2-2/+14
2020-04-30interpreter: Add link_language to all build targetsDylan Baker4-2/+15
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-30build: Fix link_language selectionDylan Baker1-4/+6
Currently it does nothing, as the field is read too late, and additional languages have already been considered. As such if the language requested is closer to C (for example you want C but have a C++ source with only extern C functions) then link_langauge is ignored. Fixes #6453
2020-04-30unittests: Add test to show that link_language is brokenDylan Baker1-0/+15
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-30build: add missing type annotationDylan Baker1-1/+1
2020-04-30docs: Update documentation for add_*_scriptDylan Baker2-0/+31
2020-04-30allow postconf and dist scripts to use Files, ExternalPrograms, andDylan Baker3-7/+15
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 Baker10-18/+174
This adds support for Files, CustomTarget, Indexs of CustomTargets, ConfigureFiles, ExternalPrograms, and Executables. Fixes: #1234 Fixes: #3552 Fixes: #6175
2020-04-30CI: pin pylintJon Turney1-1/+2
Pin pylint version to workaround https://github.com/PyCQA/pylint/issues/3524
2020-04-30gnome: Print proper error when 'nsversion' or 'namespace' are missingXavier Claessens1-2/+6
2020-04-30ExternalProgram: Do special windows tricks even when name is providedXavier Claessens1-0/+4
Closes: #7051
2020-04-29Fix symlink deletion with --wipe optionLaurent Pinchart1-1/+1
When wiping a build tree with --wipe, every entry in the build directory is removed with mesonlib.windows_proof_rmtree() for directories and mesonlib.windows_proof_rm() for other files. Symlinks to directories are considered directories, resulting in the former being called. This causes an exception to be raised, as the implementation calls shutil.rmtree(), which isn't allowed on symlinks. Fix this by using mesonlib.windows_proof_rm() for symlinks. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-04-29Merge pull request #6911 from mensinda/ciBionicJussi Pakkanen13-21/+145
ci: Add Ubuntu Bionic image
2020-04-28Meson Cmake Wrapper unmaintained [skip ci]Brendan Simon1-1/+1
The Meson CMake Wrapper project is currently unmaintained.
2020-04-28Clarified error message for test(). (#7040)Benjamin Frye1-1/+1
Changes the error message for test() so it now reports the expected and actual number of parameters. Fixes: #7029
2020-04-28gnome: Fix usage of gobject-introspection as subprojectXavier Claessens2-59/+42
2020-04-28Adding a conditional case in _guess_files to confirm that the complete path ↵georgev931-1/+16
is put together in even if a portion of the path is a location that exists. For instance if C:/Program Files (x86)/folder is passed to _guess_files, it would resolve to ['C:/Program Files', '(x86)/folder'] since C:/Program Files is an actual file location that can exist.
2020-04-28ci: Upgrade to checkout@v2Daniel Mensinger1-2/+2
2020-04-28ci: Fix OpenSUSE immage boost_pythonDaniel Mensinger1-1/+1
2020-04-28tests: Skip hotdoc test if hotdoc is not installedDaniel Mensinger2-1/+16
2020-04-28ci: Added bionic imageDaniel Mensinger5-1/+72
2020-04-28tests: Add support for specifying tool requirementsDaniel Mensinger4-4/+31
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-28docs: Fix Contributing.mdDaniel Mensinger1-5/+5
2020-04-28dependency: log cached or skipped dependencies with reference to modulesEli Schwartz1-5/+8
* dependency: log cached or skipped dependencies with reference to modules If the dependency is a special dependency which takes modules, the modules get cached separately and probably reference different pkg-config files. It's very plausible that we have multiple dependencies, using different modules. For example: Run-time dependency qt5 (modules: Core) found: YES 5.14.2 (pkg-config) Dependency qt5 skipped: feature gui disabled Obviously this makes no sense, because of course we found qt5 and even used it. The second line is a lot more readable if it shows this: Dependency qt5 (modules: Widgets) skipped: feature gui disabled Similar confusion abounds in the case where a module is found in the cache -- which module, exactly, has been found here: Dependency qt5 found: YES 5.14.2 (cached) Rewrite the dependency function to *consistently* pass around (and use!) the display_name even in cases where we know it isn't anonymous (this is just more correct anyway), and make it serve a dual purpose by also appending the list of modules just like we do for pretty-printing that a dependency has just been found for the first time. * fixup! dependency: log cached or skipped dependencies with reference to modules pointlessly cast modules to str, as they cannot be anything else. But we want to fail later on, with something more friendly than a stacktrace. boost/wx have special exceptions for people passing an integer there.
2020-04-28find_program: Fixes when the program has been overridden by executableXavier Claessens6-23/+79
- 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-28Merge pull request #7018 from dcbaker/junitJussi Pakkanen8-33/+275
mtest: Generate JUnit results for tests
2020-04-25wrap: Updated docsDaniel Mensinger2-6/+18
2020-04-25wrap: Add test case for local source / patch filesDaniel Mensinger12-8/+30
2020-04-25wrap: Add support for local files via only `*_filename`Daniel Mensinger2-12/+28
2020-04-24backend/vs: Fix build when not all languages have pchPeter Harris1-10/+4
It is not unheard-of for a project to use pch for C++ but not for C (because C usually builds fast enough anyway, so it's not worth the developer overhead of maintaining the pch file). This code was trying to optimize the vcxproj file size by detecting "only one language", but it was only looking at the number of pch-languages defined. This is incorrect when pch is not defined for all languages in use. Instead of tweaking the optimization further, remove it. This makes the vs backend behave more like the ninja backend.
2020-04-24Adjust regex to handle cases such as C:/Program Files/foldergeorgev931-1/+1
2020-04-23ci: Try to fix opensuse imageDylan Baker1-1/+1
2020-04-23mtest: Generate a JUnit xml result fileDylan Baker4-0/+238
JUnit is pretty ubiquitous, lots of services and results viewers understand it, in particular gitlab and jenkins know how to consume JUnit xml. This means projects using CI services can have their test results consumed automatically. Fixes: #6972
2020-04-23mtest: Store individual results for TAP testsDylan Baker1-21/+23
This will be used by the Junit writer
2020-04-23compilers: fix type issueAndrew Udvare1-1/+1
mesonlib.darwin_get_object_archs() only accepts a string argument so convert it.