Skip to content

Commit

Permalink
Now uses default location for test scripts when test is invoked with …
Browse files Browse the repository at this point in the history
…no cmdline args - this is to faciltate use of windows debugger
  • Loading branch information
Eamonn Brady committed Apr 1, 2014
1 parent 160f9be commit ac7ed2e
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 13 deletions.
2 changes: 1 addition & 1 deletion OpenHome/Tests/TestScriptHttpReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace OpenHome {
class TestScriptHttpReader : public HttpReader
{
public:
TestScriptHttpReader(Environment& aEnv, const std::vector<Brn>& aArgs)
TestScriptHttpReader(Environment& aEnv, std::vector<Brn>& aArgs)
:HttpReader(aEnv)
{
OptionParser parser;
Expand Down
11 changes: 5 additions & 6 deletions OpenHome/Tests/TestTopology1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,14 @@ void SuiteTopology1::ScheduleCallback(void* aObj)

////////////////////////////////////////////

void TestTopology1(Environment& aEnv, const std::vector<Brn>& aArgs)
void TestTopology1(Environment& aEnv, std::vector<Brn>& aArgs)
{
/*
if(aArgs.size()==0)
if(aArgs.size()<2)
{
Log::Print("NO ARGUMENTS SUPPLIED!!!");
ASSERTS();
aArgs.push_back(Brn("--path"));
aArgs.push_back(Brn("~eamonnb/Topology1TestScript.txt"));
}
*/

TestScriptHttpReader reader(aEnv, aArgs);

Runner runner("Topology1 tests\n");
Expand Down
2 changes: 1 addition & 1 deletion OpenHome/Tests/TestTopology1Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using namespace OpenHome;

extern void TestTopology1(OpenHome::Environment& aEnv, const std::vector<Brn>& aArgs);
extern void TestTopology1(OpenHome::Environment& aEnv, std::vector<Brn>& aArgs);

void OpenHome::TestFramework::Runner::Main(TInt aArgc, TChar* aArgv[], Net::InitialisationParams* aInitParams)
{
Expand Down
9 changes: 7 additions & 2 deletions OpenHome/Tests/TestTopology2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,14 @@ void SuiteTopology2::ScheduleCallback(void* aObj)

////////////////////////////////////////////

void TestTopology2(Environment& aEnv, const std::vector<Brn>& aArgs)
void TestTopology2(Environment& aEnv, std::vector<Brn>& aArgs)
{
//Debug::SetLevel(Debug::kTrace);
if(aArgs.size()<2)
{
aArgs.push_back(Brn("--path"));
aArgs.push_back(Brn("~eamonnb/Topology2TestScript.txt"));
}

TestScriptHttpReader reader(aEnv, aArgs);

Runner runner("Topology2 tests\n");
Expand Down
2 changes: 1 addition & 1 deletion OpenHome/Tests/TestTopology2Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using namespace OpenHome;

extern void TestTopology2(OpenHome::Environment& aEnv, const std::vector<Brn>& aArgs);
extern void TestTopology2(OpenHome::Environment& aEnv, std::vector<Brn>& aArgs);

void OpenHome::TestFramework::Runner::Main(TInt aArgc, TChar* aArgv[], Net::InitialisationParams* aInitParams)
{
Expand Down
7 changes: 6 additions & 1 deletion OpenHome/Tests/TestTopologym.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,13 @@ void SuiteTopologym::ScheduleCallback(void* aObj)

////////////////////////////////////////////

void TestTopologym(Environment& aEnv, const std::vector<Brn>& aArgs)
void TestTopologym(Environment& aEnv, std::vector<Brn>& aArgs)
{
if(aArgs.size()<2)
{
aArgs.push_back(Brn("--path"));
aArgs.push_back(Brn("~eamonnb/TopologymTestScript.txt"));
}
TestScriptHttpReader reader(aEnv, aArgs);
Runner runner("Topologym tests\n");
runner.Add(new SuiteTopologym(reader));
Expand Down
2 changes: 1 addition & 1 deletion OpenHome/Tests/TestTopologymMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using namespace OpenHome;

extern void TestTopologym(OpenHome::Environment& aEnv, const std::vector<Brn>& aArgs);
extern void TestTopologym(OpenHome::Environment& aEnv, std::vector<Brn>& aArgs);

void OpenHome::TestFramework::Runner::Main(TInt aArgc, TChar* aArgv[], Net::InitialisationParams* aInitParams)
{
Expand Down

0 comments on commit ac7ed2e

Please sign in to comment.