summaryrefslogtreecommitdiff
path: root/test cases/d
AgeCommit message (Collapse)Author
2025-04-05tests/d: Limit integer debug and version statementsAndrei Horodniceanu
Since dmd frontend version 2.111 integer debug and version statements error during parsing: https://dlang.org/changelog/2.111.0.html#dmd.deprecation-version-debug-number
2025-03-11tests: support DC being more than plain dmd or ldc2Andrei Horodniceanu
Dub is very thorough about what it encodes in a build id even collecting the compiler path. Therefore, if dub is not provided the exact same compiler path that meson got during setup, the dependency would not be found and the test would fail. Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
2025-03-05dependencies/dub: First try to describe local projectAndrei Horodniceanu
The current approach of determining dub dependencies is by specifying a name and, optionally, a version. Dub will then be called to generate a json summary of the package and code in meson will parse that and extract relevant information. This can be insufficient because dub packages can provide multiple configurations for multiple use-cases, examples include providing a configuration for an executable and a configuration for a library. As a practical example, the dub package itself provides an application configuration and multiple library configurations, the json description of dub will, by default, be for the application configuration which will make dub as a library unusable in meson. This can be solved without modifying the meson build interface by having dub describe the entire local project and collecting dependencies information from that. This way dub will generate information based on the project's 'dub.json' file, which is free to require dependencies in any way accepted by dub, by specifying configurations, by modifying compilation flags etc. This is all transparent to meson as dub's main purpose is to provide a path to the library file generated by the dependency in addition to other command-line arguments for the compiler. This change will, however, require that projects that want to build with meson also provided a 'dub.json' file in which dependency information is recorded. Failure to do so will not break existing projects that didn't use a 'dub.json', but they will be limited to what the previous implementation offered. Projects that already have a 'dub.json' should be fine, so long as the file is valid and the information in it matches the one in 'meson.build'. For example for a 'dependency()' call in 'meson.build' that dependency must exist in 'dub.json', otherwise the call will now fail when it worked previously. Using a 'dub.json' also has as a consequence that the version of the dependencies that are found are the ones specified in 'dub.selections.json', which can be helpful for projects that already provide a 'dub.json' in addition to 'meson.build' to de-duplicate code. In terms of other code changes: - multiple version requirements for a dub dependency now work, though they can only be used when a 'dub.json' is present in which case the version of dependencies is already pinned by 'dub.selections.json' - the 'd/11 dub' test case has been changed to auto-generate the 'dub.json' config outside of the source directory, as the auto-generated file triggers warning when parsed by dub, which upsets the new code as the warnings interfere with the legitimate output. Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
2025-01-27allow to compare multiple version with version_compareCharles Brunet
2024-09-11Harmonize d_import_dirs and include_directories behavior.Andrew McNulty
This commit harmonizes the handling of `d_import_dirs` and `include_directories`. The treatment of `d_import_dirs` was also different depending on the context: in `declare_dependency` it was treated like the `include_directories`, but in `build_target` et al, it had special treatment. With this commit, they are all treated by the same function. The documentation has been updated to reflect this. Fixes #12742
2024-08-06reactivate dub testsRemi Thebault
Closes: https://github.com/mesonbuild/meson/pull/12143
2024-04-25tests/d/10: Fix condition with clang++ and gdcDylan Baker
Which just checked for clang++ and aborted, instead of for the combination it claimed.
2023-07-16Fix build using GDC 13Jussi Pakkanen
Do not run tests that use integers in versions with compiler that do not support them. Old versions of GDC supported plain integers in version and debug strings but they are deprecated and GDC 13 hard errors on them.
2023-05-18Check dub version (#11794)Remi Thebault
* DubDependency._check_dub returns the version * check for compatible Dub version Dub versions starting at 1.32 have a new cache structure into which Meson doesn't know where to find compatible artifacts * skipping D tests involving Dub * refactor _check_dub makes mypy happier * make linters happy * localize some logic
2023-04-11Change "can not" to "cannot" throughout projectHiPhish
The word "cannot" expresses inability to do something whereas "can not" expresses the ability to refrain from doing something.
2022-06-19Merge pull request #10464 from rtbo/fix_generated_depsJussi Pakkanen
add D generated files to order-only deps
2022-06-17docs: d_module_versions has an undocumented ability to accept integersEli Schwartz
Dlang uses both integer version "levels" and arbitrary string identifiers, and we support both, but don't mention it in the docs. Also update a test case to pass one via declare_dependency. We already test this kwarg for build_target.
2022-06-05add D generated files to order-only depsRemi Thebault
2022-04-30use D compiler to check pointer size in test d/14Remi Thebault
2022-04-30implement and test a few compiler checks for DRemi Thebault
- run - sizeof - alignment - has_header
2022-03-23add test d/14 dub with depsRemi Thebault
2022-03-03ignore dub.json in test "d/11 dub"Remi Thebault
2022-03-03add test d/13 declare depRemi Thebault
2022-02-06dlang: add test case for root include_directory #9250Tobias Pankrath
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.
2020-03-11compilers: Don't put split soname args in start groupsDylan Baker
Some compilers that act as linker drivers (dmd and ldc) need to split arguments that GCC combines with , (ie, -Wl,-foo,bar -> -L=-foo -L=bar). As such we need to detect that the previous argument contained -soname, and not wrap that in a --start-group/--end-group This modifies the shared library test to demonstrate the problem, with a test case. Fixes #6359
2020-03-09project_tests: Add the option to the test format to mark the languageDylan Baker
This is needed when mixing D and C code, as it's possible to end up witha combination of linkers and compilres such that C produces pdb files but D does not.
2020-03-09tests: Add pdb files for d testsDylan Baker
2020-03-09project_tests: Add "version" to "shared_lib" and "pdb" typesDylan Baker
This allows the harness to apply the version correctly, putting it in the right place, dropping the right amount of numbers, etc. pdb taking a version allows it to be more easily copied from the shared_lib type.
2020-03-06project_tests: Add a "shared_lib" typeDylan Baker
This allows fixing tests that produce .dylib's on macOS and .so's on elf Unices.
2020-02-25test: merge installed_files.txt into test.jsonDaniel Mensinger
2019-10-09tests: Don't expect any *.pdb files installed in 'lib'Jakub Adam
Static libraries don't have PDB files. A PDB that would previously end up installed alongside a static library belonged in fact to the dynamic version of the same library built at the same time. This was because the former minstall.Installer implementation, when installing a file target, also blindly copied any *.pdb file it found whose filename was matching the target. So, for example installing foo.dll and foo.a would also install two copies of foo.pdb into both bin/ and lib/, which doesn't seem like the right thing to do - foo.pdb should only get installed with foo.dll.
2018-09-27Additional tests for D version and debug featuresGoaLitiuM
2018-09-17Fix regressed D test cases on WindowsGoaLitiuM
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-20Fix D tests to run on WindowsGoaLitiuM
2018-08-20Improve D mixed language test caseGoaLitiuM
2018-08-20Remove dependency to D runtime in mixed language testsGoaLitiuM
It is undefined behaviour to call D I/O functions without initializing D runtime first. Simplify the test so it will work in all platforms.
2018-06-17test cases: add test case for dubFFY00
2018-05-02Can combine D and C++ in a single target. Closes #3125.Jussi Pakkanen
2018-04-02Merge D feature flag fix branchJussi Pakkanen
2018-03-29Don't crash when using d_module_versions for pkg-configMatthias Klumpp
2018-03-29Add test to check that D feature flags get applied to all filesMatthias Klumpp
This adds regression tests for issue #3337
2018-02-25Use include_directories for D impdirs.Jussi Pakkanen
Change the code to store D properties as plain data. Only convert them to compiler flags in the backend. This also means we can fully parse D arguments without needing to know the compiler being used.
2017-10-28Test GDC shared libraries only from version 8, since 7 is broken in Debian ↵Jussi Pakkanen
at least.
2017-09-17d: Make feature names less verboseMatthias Klumpp
2017-09-12d: Implement specific properties for D featuresMatthias Klumpp
2017-09-12d: Add easy way to use D-specific featuresMatthias Klumpp
Of course D compilers have different flags to set some important D-specific settings. This adds a simple method to change these flags in a compiler-agnostic way in Meson. This replaces the previous `unittest_args` method with a more generic variant.
2017-08-29d: Newer GDC versions can compile shared librariesMatthias Klumpp
Actually, GDC supports shared libraries since version 6.2, but on Debian there are still issues with that version due to the standard library not being compiled with PIC. Therefore, we make a very conservative assumption here and only enable the tests for GDC >= 7.0
2017-08-29trivial: Fix typosMatthias Klumpp
2017-05-21Use assert instead of error.Mike Wey
2017-05-20Update the test case.Mike Wey
2017-05-20Add 'compiles' and 'has_multi_arguments' for dlang.Mike Wey
2017-04-15d: Add testcase for linking multiple versioned shared librariesMatthias Klumpp
2017-01-04tests: Use the new test skipping facility everywhereNirbheek Chauhan