@@ -51,23 +51,28 @@ def runServer():
51
51
os .chdir (d )
52
52
print "Server terminated"
53
53
54
- def analyzeMod (fn , others = []):
55
- print "Analyzing %s... (deps=%s)" % (getModName (fn ), others )
56
- # clean
57
- modsFolder = os .path .join (TEST_SERVER_ROOT , "mods" )
54
+ def prepareCleanServerFolders (serverRoot ):
55
+ modsFolder = os .path .join (serverRoot , "mods" )
58
56
if os .path .exists (modsFolder ):
59
57
shutil .rmtree (modsFolder )
60
58
61
- coremodsFolder = os .path .join (TEST_SERVER_ROOT , "coremods" )
59
+ coremodsFolder = os .path .join (serverRoot , "coremods" )
62
60
if os .path .exists (coremodsFolder ):
63
61
shutil .rmtree (coremodsFolder )
64
62
65
63
os .mkdir (modsFolder )
66
64
os .mkdir (coremodsFolder )
67
- configFolder = os .path .join (TEST_SERVER_ROOT , "config" )
65
+ configFolder = os .path .join (serverRoot , "config" )
68
66
if os .path .exists (configFolder ):
69
67
shutil .rmtree (configFolder )
70
68
69
+ return modsFolder , coremodsFolder , configFolder
70
+
71
+ def analyzeMod (fn , others = []):
72
+ print "Analyzing %s... (deps=%s)" % (getModName (fn ), others )
73
+ # clean
74
+ modsFolder , coremodsFolder , configFolder = prepareCleanServerFolders (TEST_SERVER_ROOT )
75
+
71
76
# install analyzer
72
77
shutil .copyfile (os .path .join ("target" , ANALYZER_FILENAME ), os .path .join (modsFolder , ANALYZER_FILENAME ))
73
78
@@ -322,8 +327,6 @@ def load():
322
327
323
328
return contents
324
329
325
-
326
-
327
330
def main ():
328
331
global fn2depsfn , forceRescan
329
332
0 commit comments