Skip to content

Commit

Permalink
Applied CR Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
gaizkan committed Dec 15, 2015
1 parent 4df3ed2 commit dba5f36
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
12 changes: 8 additions & 4 deletions Tests/UnitTests/ReaderTests/Common/ReaderTestHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace Microsoft { namespace MSR { namespace CNTK
// This fixture sets up paths so the tests can assume the right location for finding the configuration
// file as well as the input data and control data.
// subPath : an optional sub path (or full path) for the location of data.
ReaderFixture(string subPath = "")
ReaderFixture(string subPath = "", string envVariableErrorMessage = "")
{
BOOST_TEST_MESSAGE("Setup fixture");
m_initialWorkingPath = boost::filesystem::current_path().generic_string();
Expand Down Expand Up @@ -61,10 +61,14 @@ namespace Microsoft { namespace MSR { namespace CNTK
else
{
BOOST_TEST_MESSAGE("Invalid environment variable: " + subPath);
fprintf(stderr, "Invalid environment variable: %s ", subPath.c_str());
fprintf(stderr, "Invalid environment variable: %s\n", subPath.c_str());

if (!envVariableErrorMessage.empty())
{
BOOST_TEST_MESSAGE(envVariableErrorMessage);
fprintf(stderr, envVariableErrorMessage.c_str());
}

BOOST_TEST_MESSAGE("This test uses external data that is not part of the CNTK repository. Environment variable CNTK_EXTERNAL_TESTDATA_SOURCE_DIRECTORY must be set to point to the external test data location. \n Refer to the 'Setting up CNTK on Windows' documentation.)");
fprintf(stderr, "This test uses external data that is not part of the CNTK repository. Environment variable CNTK_EXTERNAL_TESTDATA_SOURCE_DIRECTORY must be set to point to the external test data location. \n Refer to the 'Setting up CNTK on Windows' documentation.)");
newCurrentPath = m_testDataPath;
}
}
Expand Down
5 changes: 4 additions & 1 deletion Tests/UnitTests/ReaderTests/HTKLMFReaderTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ namespace Microsoft { namespace MSR { namespace CNTK
// Fixture specific to the AN4 data
struct AN4ReaderFixture : ReaderFixture
{
AN4ReaderFixture() : ReaderFixture("%CNTK_EXTERNAL_TESTDATA_SOURCE_DIRECTORY%/Speech/AN4Corpus/v0")
AN4ReaderFixture() : ReaderFixture(
"%CNTK_EXTERNAL_TESTDATA_SOURCE_DIRECTORY%/Speech/AN4Corpus/v0",
"This test uses external data that is not part of the CNTK repository. Environment variable CNTK_EXTERNAL_TESTDATA_SOURCE_DIRECTORY must be set to point to the external test data location. \n Refer to the 'Setting up CNTK on Windows' documentation.)"
)
{}
};

Expand Down

0 comments on commit dba5f36

Please sign in to comment.