diff options
author | 2017-02-15 13:07:52 +0000 | |
---|---|---|
committer | 2017-02-15 14:47:42 +0000 | |
commit | d7d4def945b38133c43e3df3ea7c450b229d2bfb (patch) | |
tree | b370d2c91c525a692e4eee01e2fbe6331e7e1df2 /src/test/cpp/util/windows_test_util.h | |
parent | 2a0bb37397e1354eaf06b7697913f71443332175 (diff) |
Bazel client, JNI, Windows: impl. CreateJunction
Implement a CreateJunction function in the Windows
JNI library. Also move a bit of code from
file_windows to the JNI library, where it is
(also) needed.
This implementation is an improved version of
`blaze_util::SymlinkDirectories` in
blaze_util_windows: this version handles Windows
paths as `name` and `target`, and performs more
validation (e.g. on the length of `target`), plus
has more comments explaining the logic. In a
subsequent change I'll start using this new
function in blaze_util_windows.
This method will also be helpful in tests: we will
no longer have to shell out to mklink.
See https://github.com/bazelbuild/bazel/issues/2107
--
Change-Id: I7e9b085fdc2ba47be83da5319bded02bd323e71b
Reviewed-on: https://cr.bazel.build/8892
PiperOrigin-RevId: 147585207
MOS_MIGRATED_REVID=147585207
Diffstat (limited to 'src/test/cpp/util/windows_test_util.h')
-rw-r--r-- | src/test/cpp/util/windows_test_util.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/cpp/util/windows_test_util.h b/src/test/cpp/util/windows_test_util.h index 2ec5844e41..ababc3e685 100644 --- a/src/test/cpp/util/windows_test_util.h +++ b/src/test/cpp/util/windows_test_util.h @@ -21,7 +21,8 @@ namespace blaze_util { using std::wstring; // Returns $TEST_TMPDIR as a wstring. -// The result will have backslashes as directory separators (but no UNC prefix). +// The result will have backslashes as directory separators, but no UNC prefix. +// The result will also not have a trailing backslash. wstring GetTestTmpDirW(); // Deletes all files and directories under `path`. |