summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/file
Commit message (Collapse)AuthorAgeFilesLines
* Tests: Update tests to run in symlinked treeKyle Edwards2023-09-221-16/+20
|
* file(REAL_PATH): resolve symlinks before '..' componentsRobert Maynard2023-07-201-0/+37
| | | | | | | | Previously REAL_PATH would collapse paths before resolving any symlinks so if `..` crossed a symlink the output from `REAL_PATH` would be wrong. It looked like REAL_PATH did this by mistake since it was a side-effect of ensuring we had an absolute path before resolving symlinks.
* codespell: Fix typosBrad King2023-05-222-2/+2
|
* codespell: Avoid escape sequence that looks like misspelled "nodes"Brad King2023-05-223-3/+3
|
* file(REAL_PATH): Ensure same behavior as get_filename_component(REALPATH)Marc Chevrier2023-03-201-0/+16
| | | | Fixes: #24605
* Tests/RunCMake: Update cmake_minimum_required versionsBrad King2023-02-111-1/+1
| | | | | | | | For policy-specific tests, use the version before the policy was introduced. Otherwise, use 3.5 where possible. Also, remove `cmake_minimum_required()` and `project()` calls from individual cases where they are handled by `CMakeLists.txt`.
* file(MAKE_DIRECTORY): Provide a more descriptive error messageTerence Noone2022-12-084-0/+14
| | | | | | Previously, MAKE_DIRECTORY would print `problem creating directory: {}`, which was very unhelpful for debugging. Extend the message with the OS error string.
* Merge topic 'test-file-download'Brad King2022-11-2129-115/+0
|\ | | | | | | | | | | | | | | | | | | 28513a5fba Tests: Honor CMake_TEST_NO_NETWORK in RunCMake.file-DOWNLOAD 52b9c7b958 Tests: Move CMake.FileDownload cases into RunCMake.file-DOWNLOAD 9dda7c276c Tests: Factor out common helper in RunCMake.file-DOWNLOAD cases d6af54c473 Tests: Factor out a RunCMake.file-DOWNLOAD test Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7937
| * Tests: Factor out a RunCMake.file-DOWNLOAD testBrad King2022-11-1729-115/+0
| | | | | | | | Move the `DOWNLOAD-*` cases over from the `RunCMake.file` test.
* | file(COPY_FILE): Add option to retry on Windows if input access failsBrad King2022-11-172-0/+11
|/ | | | | | | | On Windows, a file may be inaccessible for a short time after it is created. This occurs for various reasons, including indexing, antivirus tools, and NTFS's asynchronous semantics. Add an `INPUT_MAY_BE_RECENT` option to tell CMake that the input file may have been recently created so that we can retry a few times to read it.
* file(COPY_FILE): Report if failure occurred on input or output pathBrad King2022-11-157-0/+39
| | | | | When we know whether a failure was associated with the input or the output path, include this information in the error message.
* file(DOWNLOAD EXPECTED_HASH): better error message when download failedAurelien Regat-Barrel2022-11-091-1/+0
|
* cmFileCommand: Report keyword errors via argument parser resultsBrad King2022-07-221-2/+7
|
* file(TIMESTAMP): Interpret relative paths w.r.t. the source treeTheBrokenRail2022-07-063-0/+4
| | | | Fixes: #23610
* Merge topic 'file-READ_ELF-capture-error'Brad King2022-01-122-2/+21
|\ | | | | | | | | | | | | | | 41bebbe50a file: Restore error capture in undocumented READ_ELF mode Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6853
| * file: Restore error capture in undocumented READ_ELF modeBrad King2022-01-112-2/+21
| | | | | | | | | | | | | | | | | | Revise the error message added by commit 115ff6a347 (cmELF: Include the ELF parsing code unconditionally, 2021-06-17, v3.22.0-rc1~557^2) to honor the `CAPTURE_ERROR` option. This is needed by the call site in `BundleUtilities` to suppress errors on non-ELF files. Fixes: #23074
* | cmMessenger: Adopt backtrace printing functionsBrad King2021-12-081-7/+15
|/ | | | | | Move backtrace printing functions from `cmListFileBacktrace` over to `cmMessenger`, their primary caller. Thread `cmMessenger` instances through APIs needed to update other call sites.
* Tests: Skip RunCMake.file INSTALL-FOLLOW_SYMLINK_CHAIN case on CygwinBrad King2021-10-061-1/+3
| | | | | | | This case was added by commit e3ff7ced63 (file(INSTALL): Add FOLLOW_SYMLINK_CHAIN argument, 2019-05-16, v3.15.0-rc1~103^2). Skip it on Cygwin because it fails due to `foo/../` pairs being flattened away in symlinks.
* MSYS: Add support for running under MSYS runtime environmentOrgad Shaneh2021-04-261-2/+6
| | | | Detect MSYS as CYGWIN, with the required adaptations.
* file(REAL_PATH): add option EXPAND_TILDEMarc Chevrier2021-04-212-12/+35
| | | | | This option enables the replacement of any leading tilde with the path to the user's home directory.
* file: add `COPY_FILE` subcommandBen Boeckel2021-03-1030-0/+151
| | | | | | The `file(COPY)` subcommand is overloaded and busy for such a simple operation. Instead, make a simpler subcommand with error handling support.
* file(RENAME): Add option to not replace existing pathBrad King2021-03-047-0/+41
| | | | | Add a `NO_REPLACE` option that prevents overwriting `<newname>` if it exists.
* file(RENAME): Add option to capture error message on failureBrad King2021-03-0413-0/+57
|
* Tests: Update RunCMake.file case with workaround for Xcode "new build system"Brad King2020-09-181-0/+6
|
* file(): Add REAL_PATH sub-commandMarc Chevrier2020-09-088-0/+27
|
* file(DOWNLOAD): Make file argument optionalKyle Edwards2020-07-275-0/+14
|
* file(UPLOAD): Add support for TLS_VERIFY and TLS_CAINFOHarry Mallon2020-04-0813-0/+28
| | | | | * Improve and test err messages when TLS_VERIFY and TLS_CAINFO are not set in file(DOWNLOAD) and file(UPLOAD).
* file: GLOB_RECURSE VerifyGlobs.cmake should have CMP0009 set to newShane Parris2020-02-115-0/+28
| | | | | | | | | | | | | | | In certain cases, rebuilds with CMake using the CONFIGURE_DEPENDS flag with GLOB_RECURSE could result in a reconfigure loop due to CMP0009 not being propogated to the generated VerifyGlobs.cmake script. During the inital configuration phase, RecurseThroughSymlinksOn() is called for recursive glob operations either by having the CMP0009 status not set to NEW or by explicitly providing the FOLLOW_SYMLINKS flag. At the end when the VerifyGlobs script is created, the FOLLOW_SYMLINKS flag is written according to the final resolved form through a call to GetRecurseThroughSymlinks(). Thus, setting CMP0009 to NEW in the generated file is safe and allows correct behavior whether or not the end user sets the policy status to NEW or OLD.
* Tests: Perform minor cleanups in RunCMake.file testShane Parris2020-02-111-2/+2
|
* Ninja: Add multi-config variantKyle Edwards2019-12-131-2/+2
| | | | Co-Authored-by: vector-of-bool <vectorofbool@gmail.com>
* file: Change REMOVE to ignore empty namesBrad King2019-05-213-0/+15
| | | | | | | | | | | | | | | Previously code like file(REMOVE_RECURSE "${accidentally_missing_variable}") treated the empty string as a relative path with respect to the current directory and removed its contents. Change this behavior to ignore the empty string with a warning instead. Normally such behavior changes are done with a policy, but in this case such code is likely a real bug in project code that can delete data. Fixes: #19274
* file(INSTALL): Add FOLLOW_SYMLINK_CHAIN argumentKyle Edwards2019-05-162-0/+169
|
* Tests: Avoid cross-device links in CREATE_LINK testTushar Maheshwari2019-01-163-1/+20
| | | | Add a test for COPY_ON_ERROR to cover that scenario.
* Tests: Skip symlink tests on WindowsTushar Maheshwari2019-01-165-10/+10
|
* Tests: CREATE_LINK subcommand negative test caseTushar Maheshwari2019-01-164-0/+7
|
* Tests: file CREATE_LINK subcommand test casesTushar Maheshwari2019-01-164-0/+21
|
* file: Fix formatting of error in SIZE sub-commandKyle Edwards2018-12-062-3/+4
|
* file: Add READ_SYMLINK sub-commandKyle Edwards2018-12-068-0/+33
|
* file: add SIZE optionWouter Klouwen2018-11-275-0/+20
| | | | | This commit adds the SIZE option to file(). It returns the file size of the given path if it exists and produces an error if not.
* Testing: Update hard-coded line numbers to [0-9]+ in some testsKyle Edwards2018-10-102-7/+7
|
* file: Drop error cases added by CMake 3.12.0-rc1 to avoid regressionsBrad King2018-06-226-11/+1
| | | | | | | | | Refactoring in commit v3.12.0-rc1~418^2~3 (Refactor HandleGlobCommand, 2018-02-13) introduced error diagnostics for argument combinations that were previously accepted. Restore acceptance to avoid regressing projects that used those combinations even if they do not make sense. Fixes: #18097
* Add tests for `file(GLOB)` CONFIGURE_DEPENDS flagShane Parris2018-04-0219-0/+159
|
* Add test for sorting and deduping of file(GLOB) resultShane Parris2018-03-073-0/+24
|
* Enhance RunCMake test coverage for file(GLOB)Shane Parris2018-02-2815-2/+35
|
* Adds file(TOUCH) and file(TOUCH_NOCREATE) sub-commandsShane Parris2018-02-1510-0/+36
|
* Add testcases for file(DOWNLOAD|UPLOAD) netrc optionsShane Parris2017-10-189-0/+72
|
* file: Add COPY/INSTALL option for fixed layout relative to a directoryBrad King2017-04-139-0/+38
| | | | | | | | Add a `FILES_FROM_DIR` option to install a specific set of files specified relative to a given directory and preserve their layout in the destination. Currently we intend to use this internally to implement other things so we don't provide an `install()` porcelain or documentation yet.
* handle non-existing symlink creation locationsDomen Vrankar2017-03-283-0/+17
|
* file: Add READ_ELF command to parse ELF binariesFlorian Apolloner2017-03-104-0/+6
| | | | | Leave it undocumented for now because we intend to use it internally and it cannot be made available everywhere.
* Tests: Fix `file://` URLs given to curlBrad King2017-02-103-3/+12
| | | | | | | Since upstream curl commit curl-7_52_0~131 (URL-parser: for file://[host]/ URLs, the [host] must be localhost, 2016-11-11) we can no longer use URLs of the form `file://c:/...` on Windows. These worked only accidentally before. Use `file:///c:/...` instead.