summaryrefslogtreecommitdiff
path: root/unittests/baseplatformtests.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix cygwin test failure due to shortpath usageNirbheek Chauhan2021-10-311-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* compilers/rust: Add support for clippyDylan Baker2021-09-241-2/+3
| | | | | | | | | | | Clippy is a compiler wrapper for rust that provides an extra layer of linting. It's quite popular, but unfortunately doesn't provide the output of the compiler that it's wrapping in it's output, so we don't detect that clippy is rustc. This small patch adds a new compiler class (that is the Rustc class with a different id) and the necessary logic to detect that clippy is in fact rustc) Fixes: #8767
* unittests/base: Allow init method to failDylan Baker2021-08-161-11/+29
| | | | | | | This adds a new keyword argument to the init method, `allow_fail`. When set to True (default is False) then a failure to configure is not an error, and output is still returned. This can be useful for cases where we expect initialization to fail, and want to check the output.
* unittests/base: Move code out of the try block of a try/except statementDylan Baker2021-08-161-15/+18
| | | | | | | There are two problems with having this in the try/except block. The first is that both of the if statements will raise, and the except statement cathces `Exception`, so it catches these two cases, prints a message that we either don't want or already printed, then re-raises.
* unittests/baseplatform: don't double print on errorDylan Baker2021-08-161-2/+4
|
* editorconfig: add setting to trim trailing whitespaceEli Schwartz2021-08-151-1/+0
| | | | | | | and clean up all outstanding issues Skip 'test cases/common/141 special characters/meson.build' since it intentionally uses trailing newlines.
* Split run_unittests.py fileXavier Claessens2021-07-261-0/+438