comment out a class-based testbild thingie

This commit is contained in:
Terence Parr 2015-06-27 18:46:29 -07:00 committed by parrt
parent 9fa4b0333f
commit 7d8078cfc2
1 changed files with 50 additions and 44 deletions

View File

@ -44,48 +44,42 @@ BUILD = "build"
JUNIT = ["junit-4.11.jar", "hamcrest-core-1.3.jar"] JUNIT = ["junit-4.11.jar", "hamcrest-core-1.3.jar"]
class Goal: # class Goal:
def __init__(self,name,srcdirs,dependencies=[],usesmods=[],resources=[]): # def __init__(self,name,srcdirs,dependencies=[],usesmods=[],resources=[]):
self.name = name # self.name = name
self.srcdirs = srcdirs # self.srcdirs = srcdirs
self.dependencies = dependencies # self.dependencies = dependencies
self.usesmods = usesmods # self.usesmods = usesmods
self.resources = resources # self.resources = resources
#
def compile(self): #
mycompile(self.name, # goals = {}
self.srcdirs, #
[os.path.join(JARCACHE,d) for d in self.dependencies] + # def goal(name,srcdirs,dependencies=[],usesmods=[],resources=[]):
[os.path.join(BUILD,d) for d in self.usesmods]) # global goals
# goals[name] = Goal(name,srcdirs,dependencies,usesmods,resources)
#
goals = [] #
# goal(name="runtime",
def goal(name,srcdirs,dependencies=[],usesmods=[],resources=[]): # srcdirs=["runtime/Java/src","gen4"],
global goals # dependencies=["antlr-"+BOOTSTRAP_VERSION+"-complete.jar"])
goals += [Goal(name,srcdirs,dependencies,usesmods,resources)] #
# goal(name="runtime-test",
# srcdirs=["runtime-testsuite/test"],
goal(name="runtime", # dependencies=["antlr-"+BOOTSTRAP_VERSION+"-complete.jar"]+JUNIT,
srcdirs=["runtime/Java/src","gen4"], # usesmods=["runtime", "tool"],
dependencies=["antlr-"+BOOTSTRAP_VERSION+"-complete.jar"]) # resources=["runtime/CSharp/Antlr4.Runtime/Antlr4.Runtime.mono.csproj",
# "runtime/JavaScript/src",
goal(name="runtime-test", # "runtime/Python2/src",
srcdirs=["runtime-testsuite/test"], # "runtime/Python3/src",
dependencies=["antlr-"+BOOTSTRAP_VERSION+"-complete.jar"]+JUNIT, # "runtime/Java/src"
usesmods=["runtime", "tool"], # ])
resources=["runtime/CSharp/Antlr4.Runtime/Antlr4.Runtime.mono.csproj", #
"runtime/JavaScript/src", # goal(name="tool",
"runtime/Python2/src", # srcdirs=["gen3", "tool/src"],
"runtime/Python3/src", # dependencies=["antlr-3.5.2-runtime.jar", "ST-4.0.8.jar"],
"runtime/Java/src" # usesmods=["runtime"],
]) # resources=["tool/resources"])
goal(name="tool",
srcdirs=["gen3", "tool/src"],
dependencies=["antlr-3.5.2-runtime.jar", "ST-4.0.8.jar"],
usesmods=["runtime"],
resources=["tool/resources"])
RUNTIME_SRC = ["runtime/Java/src","gen4"] RUNTIME_SRC = ["runtime/Java/src","gen4"]
RUNTIME_DEP = ["antlr-"+BOOTSTRAP_VERSION+"-complete.jar"] RUNTIME_DEP = ["antlr-"+BOOTSTRAP_VERSION+"-complete.jar"]
@ -126,6 +120,13 @@ def download_libs():
copyfile(src="runtime/Java/lib/org.abego.treelayout.core.jar", trg=JARCACHE) copyfile(src="runtime/Java/lib/org.abego.treelayout.core.jar", trg=JARCACHE)
# def compile_goal(goal): all
# print "compile "+goal.name
# mycompile(goal.name,
# goal.srcdirs,
# [os.path.join(JARCACHE,d) for d in goal.dependencies] +
# [os.path.join(BUILD,d) for d in goal.usesmods])
def mycompile(goal,srcpaths,dependencies,skip=[]): def mycompile(goal,srcpaths,dependencies,skip=[]):
args = ["-Xlint", "-Xlint:-serial", "-g"] args = ["-Xlint", "-Xlint:-serial", "-g"]
jars=None jars=None
@ -138,6 +139,12 @@ def mycompile(goal,srcpaths,dependencies,skip=[]):
for src in srcpaths: for src in srcpaths:
javac(srcdir=src, trgdir=trgdir, version="1.6", cp=jars, args=args, skip=skip) javac(srcdir=src, trgdir=trgdir, version="1.6", cp=jars, args=args, skip=skip)
# for g in goals:
# for mod in goals[g].usesmods:
# compile_goal(goals[mod])
# compile_goal(goals[g])
def parsers(): def parsers():
antlr3("tool/src/org/antlr/v4/parse", "gen3", version="3.5.2", package="org.antlr.v4.parse") antlr3("tool/src/org/antlr/v4/parse", "gen3", version="3.5.2", package="org.antlr.v4.parse")
antlr3("tool/src/org/antlr/v4/codegen", "gen3", version="3.5.2", package="org.antlr.v4.codegen", antlr3("tool/src/org/antlr/v4/codegen", "gen3", version="3.5.2", package="org.antlr.v4.codegen",
@ -171,8 +178,7 @@ def runtime_tests():
RUNTIME_TEST_RES +\ RUNTIME_TEST_RES +\
[os.path.join(BUILD,d) for d in RUNTIME_TEST_MOD_DEP] [os.path.join(BUILD,d) for d in RUNTIME_TEST_MOD_DEP]
cp = [uniformpath(p) for p in cp] cp = [uniformpath(p) for p in cp]
for target in TARGETS: junit(os.path.join(BUILD,"runtime-tests"), cp=string.join(cp,os.pathsep), verbose=False)
junit(os.path.join(BUILD,"runtime-tests/org/antlr/v4/test/runtime/"+target.lower()), cp=string.join(cp,os.pathsep), verbose=False)
def tool_tests(): def tool_tests():