aboutsummaryrefslogtreecommitdiff
path: root/unittests/linuxliketests.py
AgeCommit message (Collapse)AuthorFilesLines
2021-11-24shared_module: Add soname when used as a link targetNirbheek Chauhan1-0/+18
Emit a detailed deprecation warning that explains what to do instead. Also add a unittest. ``` DEPRECATION: target prog links against shared module mymod, which is incorrect. This will be an error in the future, so please use shared_library() for mymod instead. If shared_module() was used for mymod because it has references to undefined symbols, use shared_libary() with `override_options: ['b_lundef=false']` instead. ``` Fixes https://github.com/mesonbuild/meson/issues/9492
2021-10-31Fix cygwin test failure due to shortpath usageNirbheek Chauhan1-0/+6
Two tests are failing on Cygwin because the argument is passed as a long-path and the Path is ending up as a short-path: AllPlatformTests.test_run_target_files_path Traceback (most recent call last): File "/cygdrive/d/a/meson/meson/test cases/common/51 run target/check-env.py", line 22, in <module> assert build_root == env_build_root AssertionError SubprojectsCommandTests.test_purge > self.assertEqual(deleting(out), sorted([ str(self.subprojects_dir / 'redirect.wrap'), str(self.subprojects_dir / 'sub_file'), str(self.subprojects_dir / 'sub_git'), ])) E AssertionError: Lists differ: ['/cygdrive/c/Users/runneradmin/AppData/Local/Temp/tmpeaa2a49[205 chars]git'] != ['/cygdrive/c/Users/RUNNER~1/AppData/Local/Temp/tmpeaa2a49z/s[196 chars]git'] [...] ['/cygdrive/c/Users/runneradmin/AppData/Local/Temp/tmpeaa2a49z/src/subprojects/redirect.wrap', ^^^^^^^^^^^ ['/cygdrive/c/Users/RUNNER~1/AppData/Local/Temp/tmpeaa2a49z/src/subprojects/redirect.wrap', ^^^^^^^^ The fix is to not use the tempdir for all tests, but only for tests that check the mode.
2021-10-26unittests: use better assert methodsEli Schwartz1-8/+8
assertTrue and assertFalse are recommended against, if you can get a more specific assertion. And sometimes it is considerably shorter, for example we have a custom assertPathExists which we can take advantage of.
2021-10-08cmake: handle arguments in the [binaries] section of the machine filePaolo Bonzini1-0/+32
Sometimes, the machine file can include compiler command line options, in order to pick the correct multilib. For example, Meson uses "$cc --print-search-dirs" to find the library search path, where $cc is the cc from the machine file. Because the outputs of "gcc -m32 --print-search-dirs" and "gcc --print-search-dirs" are different, this only works if you have [binaries] cc = ['gcc', '-m32'] in the machine file. Right now, however, the cmake module assumes that the compiler listed in the machine file is either a compiler, or a "launcher" followed by the compiler. Check if the second argument starts with a slash (for Microsoft-like compilers) or a dash (for everyone else), and if so presume that the CMAKE_*_COMPILER_LAUNCHER need not be defined.
2021-09-29pkgconfig: pkg-configs version<0.29.1 escape variables incorrectlymakise-homura1-1/+2
2021-09-25unittests: Make test_prelinking work on SolarisAlan Coopersmith1-3/+6
Running 'cc --version' finds the Solaris Studio C compiler, not gcc, and it doesn't support --version.
2021-08-20unittests: Ensure that symlink is removed after tests completeDylan Baker1-3/+7
using `TestCase.addCleanup` is both neat and tidy, and also ensures that the cleanup will be done, even if the test fails.
2021-08-15editorconfig: add setting to trim trailing whitespaceEli Schwartz1-6/+5
and clean up all outstanding issues Skip 'test cases/common/141 special characters/meson.build' since it intentionally uses trailing newlines.
2021-08-09pkg-config: support for `-l:libfoo.a`lilinzhe1-0/+43
fixs: #9000 Meson not correctly process with -l:xxx.a link arguments in pkgconfig .pc file. see also:https://stackoverflow.com/questions/48532868/gcc-library-option-with-a-colon-llibevent-a with unit test, unit test will be partially skiped if pkg-config version < 0.28 . see: https://gitlab.freedesktop.org/pkg-config/pkg-config/-/blob/master/NEWS
2021-07-26Split run_unittests.py fileXavier Claessens1-0/+1649