diff options
| author | nicole mazzuca <mazzucan@outlook.com> | 2019-08-02 09:52:39 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-02 09:52:39 -0700 |
| commit | 165907550c8f6ce7506beef591f55cd3f8458d78 (patch) | |
| tree | a400e42fdb0391544aa8a829d54678c6e5690638 /toolsrc/src | |
| parent | bacbcf3527390ae7d20cd9660d82a180f2c8e065 (diff) | |
| download | vcpkg-165907550c8f6ce7506beef591f55cd3f8458d78.tar.gz vcpkg-165907550c8f6ce7506beef591f55cd3f8458d78.zip | |
Update tests, and add documentation! (#7506)
This PR does the following:
* fix tests -- now, they're always built in the CMake scripts, and they work on VS2015
*add a new flag, BUILD_TESTING, which allows one to turn off testing builds
* Add documentation for running tests
Diffstat (limited to 'toolsrc/src')
| -rw-r--r-- | toolsrc/src/vcpkg-test/util.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/toolsrc/src/vcpkg-test/util.cpp b/toolsrc/src/vcpkg-test/util.cpp index a80ab36a0..5359b0fad 100644 --- a/toolsrc/src/vcpkg-test/util.cpp +++ b/toolsrc/src/vcpkg-test/util.cpp @@ -76,12 +76,13 @@ namespace vcpkg::Test static bool system_allows_symlinks() { -#if defined(_WIN32) - if (!__cpp_lib_filesystem) - { - return false; - } - +#if FILESYSTEM_SYMLINK == FILESYSTEM_SYMLINK_NONE + return false; +#elif FILESYSTEM_SYMLINK == FILESYSTEM_SYMLINK_UNIX + return true; +#elif !defined(_WIN32) // FILESYSTEM_SYMLINK == FILESYSTEM_SYMLINK_STD + return true; +#else HKEY key; bool allow_symlinks = true; @@ -97,8 +98,6 @@ namespace vcpkg::Test if (status == ERROR_SUCCESS) RegCloseKey(key); return allow_symlinks; -#else - return true; #endif } @@ -125,8 +124,8 @@ namespace vcpkg::Test const bool SYMLINKS_ALLOWED = system_allows_symlinks(); const fs::path TEMPORARY_DIRECTORY = internal_temporary_directory(); -#if FILESYSTEM_SYMLINK == FILSYSTEM_SYMLINK_NONE - constexpr inline char no_filesystem_message[] = +#if FILESYSTEM_SYMLINK == FILESYSTEM_SYMLINK_NONE + constexpr char no_filesystem_message[] = "<filesystem> doesn't exist; on windows, we don't attempt to use the win32 calls to create symlinks"; #endif |
