Skip to content

Commit

Permalink
Reset current path to exe path
Browse files Browse the repository at this point in the history
  • Loading branch information
gaizkan committed Nov 18, 2015
1 parent 30b416d commit 13e89e6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
20 changes: 11 additions & 9 deletions Tests/UnitTests/UCIFastReaderTests/DataReaderTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,16 @@ namespace Microsoft
BOOST_TEST_MESSAGE("UCIFastReaderTests --> Current working directory:");
BOOST_TEST_MESSAGE(boost::filesystem::current_path());

// Get the path to the data files
boost::filesystem::path path(boost::unit_test::framework::master_test_suite().argv[0]);
wstring parent_path = path.parent_path().c_str();
if (boost::filesystem::exists(parent_path + L"/Tests/UnitTests/")) // Jenkins or command line at enlistment
{
dataPath = path.parent_path().c_str();
dataPath += L"/Tests/UnitTests/UCIFastReaderTests/Data/";
}

BOOST_TEST_MESSAGE("Setting current path to:");
BOOST_TEST_MESSAGE(parent_path.c_str());

boost::filesystem::current_path(parent_path);

BOOST_TEST_MESSAGE("UCIFastReaderTests --> Current working directory is now:");
BOOST_TEST_MESSAGE(boost::filesystem::current_path());
}

~F()
Expand Down Expand Up @@ -114,9 +116,9 @@ namespace Microsoft
const size_t epochs = 2;

ConfigParameters config;
std::wstring configFilePath(L"configFile=" + dataPath + L"UCIFastReaderSimpleDataLoop_Config.txt");
const std::wstring controlDataFilePath(dataPath + L"UCIFastReaderSimpleDataLoop_Control.txt");
const std::wstring testDataFilePath(dataPath + L"UCIFastReaderSimpleDataLoop_Data.txt");
std::wstring configFilePath(L"configFile=UCIFastReaderSimpleDataLoop_Config.txt");
const std::wstring controlDataFilePath(L"UCIFastReaderSimpleDataLoop_Control.txt");
const std::wstring testDataFilePath(L"UCIFastReaderSimpleDataLoop_Data.txt");

wchar_t* arg[2] { L"CNTK", &configFilePath[0] };
const std::string rawConfigString = ConfigParameters::ParseCommandLine(2, arg, config);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
</Target>
<Target Name="CopyUnitTestDependencies" AfterTargets="Build">
<ItemGroup>
<UnitTestDependencies Include="$(OutDir)..\cntkmath.dll;$(OutDir)..\ucifastreader.dll;$(OutDir)..\libacml_mp_dll.dll;$(OutDir)..\libifcoremd.dll;$(OutDir)..\libifportmd.dll;$(OutDir)..\libiomp*.dll;$(OutDir)..\libmmd.dll;$(OutDir)..\svml_dispmd.dll;$(ProjectDir)Data\*" />
<UnitTestDependencies Include="$(OutDir)..\cntkmath.dll;$(OutDir)..\ucifastreader.dll;$(OutDir)..\libacml_mp_dll.dll;$(OutDir)..\libifcoremd.dll;$(OutDir)..\libifportmd.dll;$(OutDir)..\libiomp*.dll;$(OutDir)..\libmmd.dll;$(OutDir)..\svml_dispmd.dll;$(ProjectDir)Data/*.txt;" />
</ItemGroup>
<Copy SourceFiles="@(UnitTestDependencies)" DestinationFolder="$(OutDir)" SkipUnchangedFiles="true">
<Output TaskParameter="DestinationFiles" ItemName="NewFileWrites" />
Expand Down

0 comments on commit 13e89e6

Please sign in to comment.