diff options
Diffstat (limited to 'OpenSim/TestSuite')
-rw-r--r-- | OpenSim/TestSuite/BotManager.cs | 13 | ||||
-rw-r--r-- | OpenSim/TestSuite/Main.cs | 10 | ||||
-rw-r--r-- | OpenSim/TestSuite/PhysicsBot.cs | 15 | ||||
-rw-r--r-- | OpenSim/TestSuite/Util.cs | 2 |
4 files changed, 14 insertions, 26 deletions
diff --git a/OpenSim/TestSuite/BotManager.cs b/OpenSim/TestSuite/BotManager.cs index c867cae..ec71973 100644 --- a/OpenSim/TestSuite/BotManager.cs +++ b/OpenSim/TestSuite/BotManager.cs | |||
@@ -27,12 +27,11 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Text; | 30 | using System.Reflection; |
31 | using System.IO; | 31 | using System.Threading; |
32 | using libsecondlife; | 32 | using libsecondlife; |
33 | using libsecondlife.Packets; | 33 | using log4net; |
34 | using Nini.Config; | 34 | using Nini.Config; |
35 | using System.Threading; | ||
36 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
37 | using OpenSim.Framework.Console; | 36 | using OpenSim.Framework.Console; |
38 | 37 | ||
@@ -43,13 +42,13 @@ namespace OpenSim.TestSuite | |||
43 | /// </summary> | 42 | /// </summary> |
44 | public class BotManager : conscmd_callback | 43 | public class BotManager : conscmd_callback |
45 | { | 44 | { |
46 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
47 | 46 | ||
48 | protected ConsoleBase m_console; | 47 | protected ConsoleBase m_console; |
49 | protected List<PhysicsBot> m_lBot; | 48 | protected List<PhysicsBot> m_lBot; |
50 | protected Thread[] m_td; | 49 | protected Thread[] m_td; |
51 | protected bool m_verbose = true; | 50 | protected bool m_verbose = true; |
52 | protected Random somthing = new Random(System.Environment.TickCount); | 51 | protected Random somthing = new Random(Environment.TickCount); |
53 | protected int numbots = 0; | 52 | protected int numbots = 0; |
54 | protected IConfig Previous_config; | 53 | protected IConfig Previous_config; |
55 | 54 | ||
@@ -118,7 +117,7 @@ namespace OpenSim.TestSuite | |||
118 | m_td[pos].IsBackground = true; | 117 | m_td[pos].IsBackground = true; |
119 | m_td[pos].Start(); | 118 | m_td[pos].Start(); |
120 | m_lBot.Add(pb); | 119 | m_lBot.Add(pb); |
121 | OpenSim.Framework.ThreadTracker.Add(m_td[pos]); | 120 | ThreadTracker.Add(m_td[pos]); |
122 | } | 121 | } |
123 | 122 | ||
124 | /// <summary> | 123 | /// <summary> |
diff --git a/OpenSim/TestSuite/Main.cs b/OpenSim/TestSuite/Main.cs index ff4965c..213f02c 100644 --- a/OpenSim/TestSuite/Main.cs +++ b/OpenSim/TestSuite/Main.cs | |||
@@ -26,15 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | ||
30 | using System.Text; | ||
31 | using libsecondlife; | ||
32 | using libsecondlife.Packets; | ||
33 | using Nini.Config; | 29 | using Nini.Config; |
34 | using log4net; | ||
35 | using log4net.Config; | ||
36 | using System.Threading; | ||
37 | using OpenSim.Framework.Console; | ||
38 | 30 | ||
39 | namespace OpenSim.TestSuite | 31 | namespace OpenSim.TestSuite |
40 | { | 32 | { |
@@ -89,7 +81,7 @@ namespace OpenSim.TestSuite | |||
89 | 81 | ||
90 | private static void Help() | 82 | private static void Help() |
91 | { | 83 | { |
92 | System.Console.WriteLine( | 84 | Console.WriteLine( |
93 | "usage: pCampBot <-loginuri loginuri> [OPTIONS]\n" + | 85 | "usage: pCampBot <-loginuri loginuri> [OPTIONS]\n" + |
94 | "Spawns a set of bots to test an OpenSim region\n\n" + | 86 | "Spawns a set of bots to test an OpenSim region\n\n" + |
95 | " -l, -loginuri loginuri for sim to log into (required)\n" + | 87 | " -l, -loginuri loginuri for sim to log into (required)\n" + |
diff --git a/OpenSim/TestSuite/PhysicsBot.cs b/OpenSim/TestSuite/PhysicsBot.cs index 792465f..3d6b54c 100644 --- a/OpenSim/TestSuite/PhysicsBot.cs +++ b/OpenSim/TestSuite/PhysicsBot.cs | |||
@@ -26,17 +26,14 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | ||
30 | using System.IO; | 29 | using System.IO; |
31 | using System.Text; | 30 | using System.Threading; |
31 | using System.Timers; | ||
32 | using libsecondlife; | 32 | using libsecondlife; |
33 | using libsecondlife.Packets; | ||
34 | using Nini.Config; | 33 | using Nini.Config; |
35 | using System.Threading; | ||
36 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
37 | using OpenSim.Framework.Console; | 35 | using OpenSim.Framework.Console; |
38 | using Timer = System.Timers.Timer; | 36 | using Timer=System.Timers.Timer; |
39 | using log4net; | ||
40 | 37 | ||
41 | namespace OpenSim.TestSuite | 38 | namespace OpenSim.TestSuite |
42 | { | 39 | { |
@@ -55,7 +52,7 @@ namespace OpenSim.TestSuite | |||
55 | 52 | ||
56 | protected Timer m_action; // Action Timer | 53 | protected Timer m_action; // Action Timer |
57 | 54 | ||
58 | protected Random somthing = new Random(System.Environment.TickCount);// We do stuff randomly here | 55 | protected Random somthing = new Random(Environment.TickCount);// We do stuff randomly here |
59 | 56 | ||
60 | 57 | ||
61 | //New instance of a SecondLife client | 58 | //New instance of a SecondLife client |
@@ -76,7 +73,7 @@ namespace OpenSim.TestSuite | |||
76 | //We do our actions here. This is where one would | 73 | //We do our actions here. This is where one would |
77 | //add additional steps and/or things the bot should do | 74 | //add additional steps and/or things the bot should do |
78 | 75 | ||
79 | void m_action_Elapsed(object sender, System.Timers.ElapsedEventArgs e) | 76 | void m_action_Elapsed(object sender, ElapsedEventArgs e) |
80 | { | 77 | { |
81 | //client.Throttle.Task = 500000f; | 78 | //client.Throttle.Task = 500000f; |
82 | //client.Throttle.Set(); | 79 | //client.Throttle.Set(); |
@@ -147,7 +144,7 @@ namespace OpenSim.TestSuite | |||
147 | if (OnConnected != null) | 144 | if (OnConnected != null) |
148 | { | 145 | { |
149 | m_action = new Timer(somthing.Next(1000, 10000)); | 146 | m_action = new Timer(somthing.Next(1000, 10000)); |
150 | m_action.Elapsed += new System.Timers.ElapsedEventHandler(m_action_Elapsed); | 147 | m_action.Elapsed += new ElapsedEventHandler(m_action_Elapsed); |
151 | m_action.Start(); | 148 | m_action.Start(); |
152 | OnConnected(this, EventType.CONNECTED); | 149 | OnConnected(this, EventType.CONNECTED); |
153 | client.Self.Jump(); | 150 | client.Self.Jump(); |
diff --git a/OpenSim/TestSuite/Util.cs b/OpenSim/TestSuite/Util.cs index a2b6d1c..c82391b 100644 --- a/OpenSim/TestSuite/Util.cs +++ b/OpenSim/TestSuite/Util.cs | |||
@@ -59,7 +59,7 @@ namespace OpenSim.TestSuite | |||
59 | 59 | ||
60 | private static void TestResult(Result r, String msg) | 60 | private static void TestResult(Result r, String msg) |
61 | { | 61 | { |
62 | System.Console.WriteLine("[{0}]: {1}", ResultToString(r), msg); | 62 | Console.WriteLine("[{0}]: {1}", ResultToString(r), msg); |
63 | } | 63 | } |
64 | 64 | ||
65 | public static void TestFail(String msg) | 65 | public static void TestFail(String msg) |