You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FilePath::IsAbsolutePath does not recognize Windows UNC-style paths as valid absolute paths (e.g., \\domain\dfs\path\... is incorrectly recognized as a relative path). This manifests as a fatal error when trying to write XML/JSON output when the current directory is a UNC path. Tests run, but I get an error during global test environment tear-down that the system is unable to open the XML file.
Using a PowerShell window with the current directory set to a UNC path, the output looks something like the following (using googletest as shipped with Visual Studio 2019):
PS Microsoft.PowerShell.Core\FileSystem::\\domain\dfs_path\tmp> &.\gTest.exe "--gtest_output=xml:"
Running main() from e:\a\_work\2100\s\thirdparty\googletest\googletest\src\gtest_main.cc
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
... # output elided
[----------] Global test environment tear-down
[ FATAL ] e:\a\_work\2100\s\thirdparty\googletest\googletest\src\gtest.cc(207):: Unable to open file "\domain\dfs_path\tmp\gTest.xml"
PS Microsoft.PowerShell.Core\FileSystem::\\domain\dfs_path\tmp>
Note the reduction of \\ to \ in the output file path error message. Things work fine if you use a mapped drive letter instead (which is unfortunately not feasible in many of our use cases with network file shares).
If you try working around this by passing a complete UNC path for the XML output, it tries to build a "full" path as if the given path was relative. Similar things happen when trying to use Windows long paths such as \\?\UNC\domain\dfs_path\.... I also tried many different options for relative/absolute/long paths for the XML output but had no luck.
The text was updated successfully, but these errors were encountered:
FilePath::IsAbsolutePath does not recognize Windows UNC-style paths as valid absolute paths (e.g.,
\\domain\dfs\path\...
is incorrectly recognized as a relative path). This manifests as a fatal error when trying to write XML/JSON output when the current directory is a UNC path. Tests run, but I get an error during global test environment tear-down that the system is unable to open the XML file.Using a PowerShell window with the current directory set to a UNC path, the output looks something like the following (using googletest as shipped with Visual Studio 2019):
Note the reduction of
\\
to\
in the output file path error message. Things work fine if you use a mapped drive letter instead (which is unfortunately not feasible in many of our use cases with network file shares).If you try working around this by passing a complete UNC path for the XML output, it tries to build a "full" path as if the given path was relative. Similar things happen when trying to use Windows long paths such as
\\?\UNC\domain\dfs_path\...
. I also tried many different options for relative/absolute/long paths for the XML output but had no luck.The text was updated successfully, but these errors were encountered: