aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/sledjchisl/sledjchisl.c115
1 files changed, 115 insertions, 0 deletions
diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c
index 436dd0e..443698c 100644
--- a/src/sledjchisl/sledjchisl.c
+++ b/src/sledjchisl/sledjchisl.c
@@ -2007,6 +2007,97 @@ static int filterARs(struct dirtree *node)
2007 return 0; 2007 return 0;
2008} 2008}
2009 2009
2010
2011static void runTests(char *tests[], char *title, char* file)
2012{
2013 char *t = "export MONO_THREADS_PER_CPU=100;";
2014 int i = 0;
2015
2016 // For printing out line numbers use "exec /usr/bin/cli --debug /usr/lib/nunit/nunit-console.exe" instead of "nunit-console".
2017 if (FLAG(v))
2018 snprintf(toybuf, sizeof(toybuf), "echo '%s tests.'; cd %s; %s exec /usr/bin/cli --debug /usr/lib/nunit/nunit-console.exe ", title, scTemp, t);
2019 else
2020 snprintf(toybuf, sizeof(toybuf), "echo '%s tests.'; cd %s; %s nunit-console ", title, scTemp, t);
2021 while(NULL != tests[i])
2022 {
2023 t = xmprintf("%s/current/bin/%s.dll ", scRoot, tests[i++]);
2024 strcat(toybuf, t);
2025 free(t);
2026 }
2027 t = xmprintf("-nologo -output=Test%sOutput.txt -err=Test%sError.txt -labels -noxml ", file, file);
2028 strcat(toybuf, t);
2029 free(t);
2030 I(toybuf);
2031 shellMe(toybuf);
2032}
2033static void testOpenSim(simData *simd, char *sim, char *type, int count, int window, int panes, int pane)
2034{
2035 char *t = xmprintf("%s/../db", scTemp);
2036
2037 if ((! qfile_exist(t)) && (! qfile_mkdir(t, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", t);
2038 free(t);
2039 char *standard0[] =
2040 {
2041 "OpenSim.Tests",
2042 "OpenSim.Framework.Tests",
2043 "OpenSim.Framework.Servers.Tests",
2044 "OpenSim.Framework.Serialization.Tests",
2045 "OpenSim.Region.ClientStack.LindenCaps.Tests",
2046 "OpenSim.Region.ClientStack.LindenUDP.Tests",
2047 "OpenSim.Region.ScriptEngine.Tests",
2048 "OpenSim.Region.CoreModules.Tests",
2049 "OpenSim.Region.Framework.Tests",
2050 NULL
2051 };
2052 runTests(standard0, "Standard", "");
2053 char *SQL[] =
2054 {
2055 "OpenSim.Data.Tests",
2056 NULL
2057 };
2058 runTests(SQL, "SQL", "SQL");
2059 char *standard1[] =
2060 {
2061 "OpenSim.Capabilities.Handlers.Tests",
2062 "OpenSim.Server.Handlers.Tests",
2063 "OpenSim.Services.InventoryService.Tests",
2064 "OpenSim.Tests.Permissions", // Naturally OpenSim can't be consistent.
2065 NULL
2066 };
2067 runTests(standard1, "Standard part 2", "1");
2068 char *Physics[] =
2069 {
2070 "OpenSim.Region.PhysicsModule.BulletS.Tests",
2071 "OpenSim.Region.PhysicsModule.Ode.Tests",
2072 NULL
2073 };
2074 runTests(Physics, "Physics", "Physics");
2075 char *Stress[] =
2076 {
2077 "OpenSim.Tests.Stress",
2078 NULL
2079 };
2080 runTests(Stress, "Stress", "Stress");
2081 char *Performance[] =
2082 {
2083 "OpenSim.Tests.Performance",
2084 NULL
2085 };
2086 runTests(Performance, "Performance", "Perf");
2087 char *Optional[] =
2088 {
2089 "OpenSim.Region.OptionalModules",
2090 NULL
2091 };
2092 runTests(Optional, "Optional", "Opt");
2093 char *Robust[] =
2094 {
2095 "Robust.Tests",
2096 NULL
2097 };
2098 runTests(Robust, "Robust", "Robust");
2099}
2100
2010// Forward declare this. 2101// Forward declare this.
2011my_ulonglong dbCount(char *table, char *where); 2102my_ulonglong dbCount(char *table, char *where);
2012void doSimsThing(simData *simd, char *sim, char *type, int count, int window, int panes, int pane) 2103void doSimsThing(simData *simd, char *sim, char *type, int count, int window, int panes, int pane)
@@ -2344,6 +2435,30 @@ gitARend:
2344 break; 2435 break;
2345 } 2436 }
2346 2437
2438 case BUILD :
2439 {
2440 if (ourSims->doIt)
2441;// testOpenSim(simd, sim, type, count, window, panes, pane);
2442 ourSims->doIt = 0;
2443 break;
2444 }
2445
2446 case TEST :
2447 {
2448 if (ourSims->doIt)
2449 testOpenSim(simd, sim, type, count, window, panes, pane);
2450 ourSims->doIt = 0;
2451 break;
2452 }
2453
2454 case UPDATE :
2455 {
2456 if (ourSims->doIt)
2457;// testOpenSim(simd, sim, type, count, window, panes, pane);
2458 ourSims->doIt = 0;
2459 break;
2460 }
2461
2347 case STOP : // "stop 'Welcome sim'" "stop Welcome.shini" "Welcome.shini stop" "stop Welcome.ini" "stop Welcome" "stop" stop everything 2462 case STOP : // "stop 'Welcome sim'" "stop Welcome.shini" "Welcome.shini stop" "stop Welcome.ini" "stop Welcome" "stop" stop everything
2348 { 2463 {
2349 stopSim(simd, sim, type, count, window, panes, pane); 2464 stopSim(simd, sim, type, count, window, panes, pane);