summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeTests/FileDownloadTest.cmake.in
Commit message (Collapse)AuthorAgeFilesLines
* Tests: Make CMake.FileDownload invalid host name case more robustBrad King2020-01-211-2/+2
| | | | | | Use a well-defined `.invalid` top-level domain instead of assuming there is no `.png` top-level domain. Extend the timeout of this one case to 30 seconds to give DNS lookups a chance to fail instead of timing out.
* file(DOWNLOAD): Don't fail if given just a filename to write toJohnny Jazeix2020-01-151-0/+18
| | | | Fixes: #17969
* Tests: Fix CMake.FileDownload test failures not reportedCraig Scott2020-01-151-4/+32
| | | | | | | | Because the PASS_REGULAR_EXPRESSION test property is set, the exit code of the test is ignored, so we can't just rely on using message(SEND_ERROR) or the command itself failing. We have to add an explicit error message for all unexpected status codes and check for such messages with a FAIL_REGULAR_EXPRESSION.
* Tests: Fix CMake.FileDownload test in presence of proxyBrad King2020-01-151-0/+5
| | | | | | We do not actually need to contact any real http servers. The one attempt we make is to an intentionally bad domain name. Unset any proxy configuration that may change behavior.
* Tests: Extend CMake.FileDownload test internal timeoutsBrad King2020-01-151-11/+13
| | | | | | On a busy machine running many tests in parallel the `file(DOWNLOAD)` step can take longer than 2 seconds even to simply copy a file. Raise the timeout to 4 seconds to reduce spurious failures.
* Reduce size of PNG imagesLucy Phipps2019-01-251-8/+8
| | | | | | Use FileOptimizer 13.50.2431 (x86) and ZopfliPNG 1.0.2. Update expected file hashes in tests.
* Tests: Fix `file://` URLs given to curlBrad King2017-02-101-1/+4
| | | | | | | 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.
* file DOWNLOAD: Test non-zero return status.Matt McCormick2014-01-161-0/+13
|
* file(DOWNLOAD): Change EXPECTED_HASH to take ALGO=valueBrad King2012-09-191-6/+6
| | | | | | Make the EXPECTED_HASH option take only a single value instead of two to avoid handling sub-keyword arguments. This is also consistent with URL_HASH in ExternalProject.
* file(DOWNLOAD): Generalize EXPECTED_MD5 to EXPECTED_HASHBill Hoffman2012-09-111-0/+53
| | | | Add support for SHA algorithms.
* Make file DOWNLOAD less noisy (#11761)David Cole2011-02-091-0/+2
| | | | Thanks to Daniel Nelson for the suggestion and the patch.
* Improve FILE(DOWNLOAD) and ExternalProject.David Cole2010-05-271-0/+41
Improve FILE(DOWNLOAD ...): - Add percent complete progress output to the FILE DOWNLOAD command. This progress output is off by default to preserve existing behavior. To turn it on, pass SHOW_PROGRESS as an argument. - Add EXPECTED_MD5 argument. Verify that the downloaded file has the expected md5 sum after download is complete. - Add documentation for SHOW_PROGRESS and EXPECTED_MD5. When the destination file exists already and has the expected md5 sum, then do not bother re-downloading the file. ("Short circuit" return.) Also, add a test that checks for the status output indicating that the short circuit behavior is actually occurring. Use a binary file for the test so that the md5 sum is guaranteed to be the same on all platforms regardless of "shifting text file line ending" issues. Improve ExternalProject: - Add argument URL_MD5. - Add verify step that compares md5 sum of .tar.gz file before extracting it. - Add md5 check to download step, too, to prevent unnecessary downloads. - Emit a warning message when a file is not verified. Indicate that the file may be corrupt or that no checksum was specified.