aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/TestSuite/Main.cs
diff options
context:
space:
mode:
authorDan Lake2011-10-31 16:42:50 -0700
committerDan Lake2011-10-31 16:42:50 -0700
commit9d214d4903755e0c681c4458166b44c78b1ca677 (patch)
treeeaa54bd49923d432fc4e039c6c02d602b16d829d /OpenSim/TestSuite/Main.cs
parentRemoved unused show commands from Scene.cs and SceneBase.cs. The show modules... (diff)
parentMake bots share a cache so that asset downloads attempts are only made once i... (diff)
downloadopensim-SC_OLD-9d214d4903755e0c681c4458166b44c78b1ca677.zip
opensim-SC_OLD-9d214d4903755e0c681c4458166b44c78b1ca677.tar.gz
opensim-SC_OLD-9d214d4903755e0c681c4458166b44c78b1ca677.tar.bz2
opensim-SC_OLD-9d214d4903755e0c681c4458166b44c78b1ca677.tar.xz
Merge branch 'master' of git://opensimulator.org/git/opensim
Diffstat (limited to 'OpenSim/TestSuite/Main.cs')
-rw-r--r--OpenSim/TestSuite/Main.cs98
1 files changed, 0 insertions, 98 deletions
diff --git a/OpenSim/TestSuite/Main.cs b/OpenSim/TestSuite/Main.cs
deleted file mode 100644
index ee75bf5..0000000
--- a/OpenSim/TestSuite/Main.cs
+++ /dev/null
@@ -1,98 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using Nini.Config;
30
31namespace OpenSim.TestSuite
32{
33 /// <summary>
34 /// Event Types from the BOT. Add new events here
35 /// </summary>
36 public enum EventType : int
37 {
38 NONE = 0,
39 CONNECTED = 1,
40 DISCONNECTED = 2
41 }
42
43 public class TestSuite
44 {
45 public static void Main(string[] args)
46 {
47 // TODO: config parser
48
49 // TODO: load tests from addings
50
51 // TODO: create base bot cloud for use in tests
52
53 IConfig config = ParseConfig(args);
54 if (config.Get("help") != null || config.Get("loginuri") == null)
55 {
56 Help();
57 }
58 else
59 {
60 // TODO: unused: int botcount = config.GetInt("botcount", 1);
61
62 // BotManager bm = new BotManager();
63
64 Utils.TestPass("Completed Startup");
65 }
66 }
67
68 private static IConfig ParseConfig(String[] args)
69 {
70 //Set up our nifty config.. thanks to nini
71 ArgvConfigSource cs = new ArgvConfigSource(args);
72
73 // TODO: unused: cs.AddSwitch("Startup", "botcount","n");
74 cs.AddSwitch("Startup", "loginuri","l");
75 cs.AddSwitch("Startup", "firstname");
76 cs.AddSwitch("Startup", "lastname");
77 cs.AddSwitch("Startup", "password");
78 cs.AddSwitch("Startup", "help","h");
79
80 IConfig ol = cs.Configs["Startup"];
81 return ol;
82 }
83
84 private static void Help()
85 {
86 Console.WriteLine(
87 "usage: pCampBot <-loginuri loginuri> [OPTIONS]\n" +
88 "Spawns a set of bots to test an OpenSim region\n\n" +
89 " -l, -loginuri loginuri for sim to log into (required)\n" +
90 // TODO: unused: " -n, -botcount number of bots to start (default: 1)\n" +
91 " -firstname first name for the bot(s) (default: random string)\n" +
92 " -lastname lastname for the bot(s) (default: random string)\n" +
93 " -password password for the bots(s) (default: random string)\n" +
94 " -h, -help show this message"
95 );
96 }
97 }
98}