forked from BuildCraft/BuildCraft
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
executable file
·27 lines (20 loc) · 752 Bytes
/
test.py
File metadata and controls
executable file
·27 lines (20 loc) · 752 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import xml.etree.ElementTree as et
import re
import os
import sys
import shutil
forgeRoot = sys.argv [1]
root = et.parse (forgeRoot + ".classpath")
classpath = forgeRoot + "bin"
for e in root.findall (".//classpathentry"):
path = e.attrib ["path"]
classpath = classpath + ";" + path
testRoot = "testsuite"
testDir = testRoot + "/" + sys.argv [2]
os.chdir (testDir)
shutil.rmtree ("world", True)
shutil.copytree ("../base/world", "world")
shutil.copy ("../base/server.properties", "server.properties")
command = "java -Xincgc -Xmx1024M -Xms1024M -classpath \"" + classpath + "\" net.minecraftforge.fml.relauncher.ServerLaunchWrapper --nogui --world world --test test.seq --quit"
print command
os.system (command)