moving everything into OpenSim.TestSuite namespace
parent
e7e157d95e
commit
1dfa382e44
|
@ -37,7 +37,7 @@ using System.Threading;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
|
|
||||||
namespace pCampBot
|
namespace OpenSim.TestSuite
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Thread/Bot manager for the application
|
/// Thread/Bot manager for the application
|
||||||
|
|
|
@ -37,7 +37,7 @@ using log4net.Config;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
|
|
||||||
namespace pCampBot
|
namespace OpenSim.TestSuite
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Event Types from the BOT. Add new events here
|
/// Event Types from the BOT. Add new events here
|
||||||
|
@ -49,17 +49,16 @@ namespace pCampBot
|
||||||
DISCONNECTED = 2
|
DISCONNECTED = 2
|
||||||
}
|
}
|
||||||
|
|
||||||
public class pCampBot
|
public class TestSuite
|
||||||
{
|
{
|
||||||
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
|
|
||||||
[STAThread]
|
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
// log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
// log4net call
|
// TODO: config parser
|
||||||
// BasicConfigurator.Configure();
|
|
||||||
|
// TODO: load tests from addings
|
||||||
|
|
||||||
|
// TODO: create base bot cloud for use in tests
|
||||||
|
|
||||||
IConfig config = ParseConfig(args);
|
IConfig config = ParseConfig(args);
|
||||||
if (config.Get("help") != null || config.Get("loginuri") == null) {
|
if (config.Get("help") != null || config.Get("loginuri") == null) {
|
||||||
|
@ -67,17 +66,9 @@ namespace pCampBot
|
||||||
} else {
|
} else {
|
||||||
int botcount = config.GetInt("botcount", 1);
|
int botcount = config.GetInt("botcount", 1);
|
||||||
|
|
||||||
BotManager bm = new BotManager();
|
// BotManager bm = new BotManager();
|
||||||
|
|
||||||
System.Console.WriteLine("Error enabled: {0}", m_log.IsErrorEnabled);
|
Utils.TestPass("Completed Startup");
|
||||||
//startup specified number of bots. 1 is the default
|
|
||||||
m_log.Error("pCampBot started with " + botcount + "bots");
|
|
||||||
|
|
||||||
// bm.dobotStartup(botcount, config);
|
|
||||||
// while (true)
|
|
||||||
// {
|
|
||||||
// MainConsole.Instance.Prompt();
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,8 +37,9 @@ using System.Threading;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
using Timer = System.Timers.Timer;
|
using Timer = System.Timers.Timer;
|
||||||
|
using log4net;
|
||||||
|
|
||||||
namespace pCampBot
|
namespace OpenSim.TestSuite
|
||||||
{
|
{
|
||||||
public class PhysicsBot
|
public class PhysicsBot
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,55 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace OpenSim.TestSuite
|
||||||
|
{
|
||||||
|
|
||||||
|
public class Utils
|
||||||
|
{
|
||||||
|
enum Result {
|
||||||
|
Fail = 0,
|
||||||
|
Pass = 1,
|
||||||
|
Skip = 3
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String ResultToString(Result r)
|
||||||
|
{
|
||||||
|
if (r == Result.Pass)
|
||||||
|
{
|
||||||
|
return "PASS";
|
||||||
|
}
|
||||||
|
else if (r == Result.Fail)
|
||||||
|
{
|
||||||
|
return "FAIL";
|
||||||
|
}
|
||||||
|
else if (r == Result.Skip)
|
||||||
|
{
|
||||||
|
return "SKIP";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "UNKNOWN";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private static void TestResult(Result r, String msg)
|
||||||
|
{
|
||||||
|
System.Console.WriteLine("[{0}]: {1}", ResultToString(r), msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void TestFail(String msg)
|
||||||
|
{
|
||||||
|
TestResult(Result.Fail, msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void TestPass(String msg)
|
||||||
|
{
|
||||||
|
TestResult(Result.Pass, msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void TestSkip(String msg)
|
||||||
|
{
|
||||||
|
TestResult(Result.Skip, msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue