|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r79756 - in trunk/libs/filesystem/test: . msvc10/operations_test
From: bdawes_at_[hidden]
Date: 2012-07-26 08:54:59
Author: bemandawes
Date: 2012-07-26 08:54:58 EDT (Thu, 26 Jul 2012)
New Revision: 79756
URL: http://svn.boost.org/trac/boost/changeset/79756
Log:
Generate unique name for operation_test directory. This prevents tests failures if static and shared tests happen to run in parallel.
Text files modified:
trunk/libs/filesystem/test/msvc10/operations_test/operations_test.vcxproj | 4 ++--
trunk/libs/filesystem/test/operations_test.cpp | 7 ++++---
2 files changed, 6 insertions(+), 5 deletions(-)
Modified: trunk/libs/filesystem/test/msvc10/operations_test/operations_test.vcxproj
==============================================================================
--- trunk/libs/filesystem/test/msvc10/operations_test/operations_test.vcxproj (original)
+++ trunk/libs/filesystem/test/msvc10/operations_test/operations_test.vcxproj 2012-07-26 08:54:58 EDT (Thu, 26 Jul 2012)
@@ -61,7 +61,7 @@
</Link>
<PostBuildEvent>
<Message>Executing test $(TargetName).exe...</Message>
- <Command>"$(TargetDir)\$(TargetName).exe" -x</Command>
+ <Command>"$(TargetDir)\$(TargetName).exe"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -84,7 +84,7 @@
</Link>
<PostBuildEvent>
<Message>Executing test $(TargetName).exe...</Message>
- <Command>"$(TargetDir)\$(TargetName).exe" -x</Command>
+ <Command>"$(TargetDir)\$(TargetName).exe"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
Modified: trunk/libs/filesystem/test/operations_test.cpp
==============================================================================
--- trunk/libs/filesystem/test/operations_test.cpp (original)
+++ trunk/libs/filesystem/test/operations_test.cpp 2012-07-26 08:54:58 EDT (Thu, 26 Jul 2012)
@@ -115,7 +115,7 @@
unsigned short language_id; // 0 except for Windows
- const char* temp_dir_name = "operations_test";
+ const fs::path temp_dir(fs::unique_path("operations-test-%%%%-%%%%-%%%%-%%%%"));
void create_file(const fs::path & ph, const std::string & contents = std::string())
{
@@ -576,7 +576,8 @@
bool found(false);
do
{
- if (it->path().filename() == temp_dir_name) found = true;
+ if (it->path().filename() == temp_dir.filename())
+ found = true;
} while (++it != fs::directory_iterator());
BOOST_TEST(found);
}
@@ -1941,7 +1942,7 @@
# endif
cout << "API is " << platform << endl;
- dir = fs::initial_path() / temp_dir_name;
+ dir = fs::initial_path() / temp_dir;
if (fs::exists(dir))
{
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk