From 165907550c8f6ce7506beef591f55cd3f8458d78 Mon Sep 17 00:00:00 2001 From: nicole mazzuca Date: Fri, 2 Aug 2019 09:52:39 -0700 Subject: 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 --- toolsrc/src/vcpkg-test/util.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'toolsrc/src') 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[] = " doesn't exist; on windows, we don't attempt to use the win32 calls to create symlinks"; #endif -- cgit v1.2.3