diff options
Diffstat (limited to 'OpenSim/TestSuite')
-rw-r--r-- | OpenSim/TestSuite/BotManager.cs | 2 | ||||
-rw-r--r-- | OpenSim/TestSuite/Main.cs (renamed from OpenSim/TestSuite/pCampBot.cs) | 29 | ||||
-rw-r--r-- | OpenSim/TestSuite/PhysicsBot.cs | 3 | ||||
-rw-r--r-- | OpenSim/TestSuite/Util.cs | 55 |
4 files changed, 68 insertions, 21 deletions
diff --git a/OpenSim/TestSuite/BotManager.cs b/OpenSim/TestSuite/BotManager.cs index efd1613..6ef1dea 100644 --- a/OpenSim/TestSuite/BotManager.cs +++ b/OpenSim/TestSuite/BotManager.cs | |||
@@ -37,7 +37,7 @@ using System.Threading; | |||
37 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
38 | using OpenSim.Framework.Console; | 38 | using OpenSim.Framework.Console; |
39 | 39 | ||
40 | namespace pCampBot | 40 | namespace OpenSim.TestSuite |
41 | { | 41 | { |
42 | /// <summary> | 42 | /// <summary> |
43 | /// Thread/Bot manager for the application | 43 | /// Thread/Bot manager for the application |
diff --git a/OpenSim/TestSuite/pCampBot.cs b/OpenSim/TestSuite/Main.cs index d42d4bd..c2cd7a1 100644 --- a/OpenSim/TestSuite/pCampBot.cs +++ b/OpenSim/TestSuite/Main.cs | |||
@@ -37,7 +37,7 @@ using log4net.Config; | |||
37 | using System.Threading; | 37 | using System.Threading; |
38 | using OpenSim.Framework.Console; | 38 | using OpenSim.Framework.Console; |
39 | 39 | ||
40 | namespace pCampBot | 40 | namespace OpenSim.TestSuite |
41 | { | 41 | { |
42 | /// <summary> | 42 | /// <summary> |
43 | /// Event Types from the BOT. Add new events here | 43 | /// Event Types from the BOT. Add new events here |
@@ -49,17 +49,16 @@ namespace pCampBot | |||
49 | DISCONNECTED = 2 | 49 | DISCONNECTED = 2 |
50 | } | 50 | } |
51 | 51 | ||
52 | public class pCampBot | 52 | public class TestSuite |
53 | { | 53 | { |
54 | |||
55 | private static readonly ILog m_log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
56 | |||
57 | [STAThread] | ||
58 | public static void Main(string[] args) | 54 | public static void Main(string[] args) |
59 | { | 55 | { |
60 | // log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 56 | |
61 | // log4net call | 57 | // TODO: config parser |
62 | // BasicConfigurator.Configure(); | 58 | |
59 | // TODO: load tests from addings | ||
60 | |||
61 | // TODO: create base bot cloud for use in tests | ||
63 | 62 | ||
64 | IConfig config = ParseConfig(args); | 63 | IConfig config = ParseConfig(args); |
65 | if (config.Get("help") != null || config.Get("loginuri") == null) { | 64 | if (config.Get("help") != null || config.Get("loginuri") == null) { |
@@ -67,17 +66,9 @@ namespace pCampBot | |||
67 | } else { | 66 | } else { |
68 | int botcount = config.GetInt("botcount", 1); | 67 | int botcount = config.GetInt("botcount", 1); |
69 | 68 | ||
70 | BotManager bm = new BotManager(); | 69 | // BotManager bm = new BotManager(); |
71 | 70 | ||
72 | System.Console.WriteLine("Error enabled: {0}", m_log.IsErrorEnabled); | 71 | Utils.TestPass("Completed Startup"); |
73 | //startup specified number of bots. 1 is the default | ||
74 | m_log.Error("pCampBot started with " + botcount + "bots"); | ||
75 | |||
76 | // bm.dobotStartup(botcount, config); | ||
77 | // while (true) | ||
78 | // { | ||
79 | // MainConsole.Instance.Prompt(); | ||
80 | // } | ||
81 | } | 72 | } |
82 | } | 73 | } |
83 | 74 | ||
diff --git a/OpenSim/TestSuite/PhysicsBot.cs b/OpenSim/TestSuite/PhysicsBot.cs index 3e12bb1..5c1d966 100644 --- a/OpenSim/TestSuite/PhysicsBot.cs +++ b/OpenSim/TestSuite/PhysicsBot.cs | |||
@@ -37,8 +37,9 @@ using System.Threading; | |||
37 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
38 | using OpenSim.Framework.Console; | 38 | using OpenSim.Framework.Console; |
39 | using Timer = System.Timers.Timer; | 39 | using Timer = System.Timers.Timer; |
40 | using log4net; | ||
40 | 41 | ||
41 | namespace pCampBot | 42 | namespace OpenSim.TestSuite |
42 | { | 43 | { |
43 | public class PhysicsBot | 44 | public class PhysicsBot |
44 | { | 45 | { |
diff --git a/OpenSim/TestSuite/Util.cs b/OpenSim/TestSuite/Util.cs new file mode 100644 index 0000000..edc2a54 --- /dev/null +++ b/OpenSim/TestSuite/Util.cs | |||
@@ -0,0 +1,55 @@ | |||
1 | using System; | ||
2 | |||
3 | namespace OpenSim.TestSuite | ||
4 | { | ||
5 | |||
6 | public class Utils | ||
7 | { | ||
8 | enum Result { | ||
9 | Fail = 0, | ||
10 | Pass = 1, | ||
11 | Skip = 3 | ||
12 | } | ||
13 | |||
14 | private static String ResultToString(Result r) | ||
15 | { | ||
16 | if (r == Result.Pass) | ||
17 | { | ||
18 | return "PASS"; | ||
19 | } | ||
20 | else if (r == Result.Fail) | ||
21 | { | ||
22 | return "FAIL"; | ||
23 | } | ||
24 | else if (r == Result.Skip) | ||
25 | { | ||
26 | return "SKIP"; | ||
27 | } | ||
28 | else | ||
29 | { | ||
30 | return "UNKNOWN"; | ||
31 | } | ||
32 | } | ||
33 | |||
34 | |||
35 | private static void TestResult(Result r, String msg) | ||
36 | { | ||
37 | System.Console.WriteLine("[{0}]: {1}", ResultToString(r), msg); | ||
38 | } | ||
39 | |||
40 | public static void TestFail(String msg) | ||
41 | { | ||
42 | TestResult(Result.Fail, msg); | ||
43 | } | ||
44 | |||
45 | public static void TestPass(String msg) | ||
46 | { | ||
47 | TestResult(Result.Pass, msg); | ||
48 | } | ||
49 | |||
50 | public static void TestSkip(String msg) | ||
51 | { | ||
52 | TestResult(Result.Skip, msg); | ||
53 | } | ||
54 | } | ||
55 | } \ No newline at end of file | ||