summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-04-20 14:00:27 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-04-20 14:00:33 (GMT)
commit63ffe210365ce2d1dd67fcabcc67e20913f320a8 (patch)
tree406cbd35b9c0ca94258c98dbe25c1625cc74a723
parent4c0d69e8131c8fde3446d2d966d3c68cc3bef296 (diff)
parentb5cb26e287645d5a54459347635dbf7517b6552a (diff)
downloadCMake-63ffe210365ce2d1dd67fcabcc67e20913f320a8.zip
CMake-63ffe210365ce2d1dd67fcabcc67e20913f320a8.tar.gz
CMake-63ffe210365ce2d1dd67fcabcc67e20913f320a8.tar.bz2
Merge topic 'update-kwsys'
b5cb26e287 Merge branch 'upstream-KWSys' into update-kwsys d98342d868 KWSys 2021-04-19 (d6139c66) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6018
-rw-r--r--Source/kwsys/testSystemTools.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/kwsys/testSystemTools.cxx b/Source/kwsys/testSystemTools.cxx
index cfa420d..04f66ff 100644
--- a/Source/kwsys/testSystemTools.cxx
+++ b/Source/kwsys/testSystemTools.cxx
@@ -290,15 +290,17 @@ static bool CheckFileOperations()
res = false;
}
+ std::cerr << std::oct;
// Reset umask
-#if defined(_WIN32) && !defined(__CYGWIN__)
+#ifdef __MSYS__
+ mode_t fullMask = S_IWRITE;
+#elif defined(_WIN32) && !defined(__CYGWIN__)
// NOTE: Windows doesn't support toggling _S_IREAD.
mode_t fullMask = _S_IWRITE;
#else
// On a normal POSIX platform, we can toggle all permissions.
mode_t fullMask = S_IRWXU | S_IRWXG | S_IRWXO;
#endif
- mode_t orig_umask = umask(fullMask);
// Test file permissions without umask
mode_t origPerm, thisPerm;
@@ -370,6 +372,7 @@ static bool CheckFileOperations()
res = false;
}
+ mode_t orig_umask = umask(fullMask);
// Test setting file permissions while honoring umask
if (!kwsys::SystemTools::SetPermissions(testNewFile, fullMask, true)) {
std::cerr << "Problem with SetPermissions (3) for: " << testNewFile
@@ -496,6 +499,7 @@ static bool CheckFileOperations()
}
#endif
+ std::cerr << std::dec;
return res;
}
@@ -1093,7 +1097,7 @@ static bool CheckCopyFileIfDifferent()
ret = false;
continue;
}
- std::string bdata = readFile("file_b");
+ std::string bdata = readFile(cptarget);
if (diff_test_cases[i].a != bdata) {
std::cerr << "Incorrect CopyFileIfDifferent file contents in test case "
<< i + 1 << "." << std::endl;