Beispiel #1
0
def step_compile_java(environment):
    """Compile java file with java compiler"""
    testname = environment.testname
    assert testname.endswith(".java")
    environment.classname = testname[:-5]
    ensure_dir("%(builddir)s/%(classname)s" % environment)
    cmd = "%(javac)s %(testname)s -d %(builddir)s/%(classname)s" % environment
    return execute(environment, cmd, timeout=240)
Beispiel #2
0
def step_compile_java(environment):
	"""Compile java file with java compiler"""
	testname = environment.testname
	assert testname.endswith(".java")
	environment.classname = testname[:-5]
	ensure_dir("%(builddir)s/%(classname)s" % environment)
	cmd = "%(javac)s %(testname)s -d %(builddir)s/%(classname)s" % environment
	return execute(environment, cmd, timeout=240)
Beispiel #3
0
def step_compile_class(environment):
	"""Compile class file with bytecode2firm"""
	testname = environment.testname
	assert testname.endswith(".java")
	environment.classname = testname[:-5]
	environment.executable = "%(builddir)s/%(classname)s.exe" % environment
	ensure_dir(os.path.dirname(environment.executable))
	cmd = "%(bc2firm)s -cp %(builddir)s/%(classname)s %(classname)s %(bc2firmflags)s -o %(executable)s" % environment
	return execute(environment, cmd, timeout=240)
Beispiel #4
0
def step_compile_cxx(environment):
    """Compile C++ source code to executable"""
    setup_c_environment(environment)
    environment.executable = "%(builddir)s/%(testname)s.exe" % environment
    ensure_dir(os.path.dirname(environment.executable))
    if not hasattr(environment, "cxxfile"):
        environment.cxxfile = environment.testname
    cmd = "%(cxx)s %(cppflags)s %(cxxflags)s %(ldflags)s -o %(executable)s %(cfile)s" % environment
    return execute(environment, cmd, timeout=60)
Beispiel #5
0
def step_compile_class(environment):
    """Compile class file with bytecode2firm"""
    testname = environment.testname
    assert testname.endswith(".java")
    environment.classname = testname[:-5]
    environment.executable = "%(builddir)s/%(classname)s.exe" % environment
    ensure_dir(os.path.dirname(environment.executable))
    cmd = "%(bc2firm)s -cp %(builddir)s/%(classname)s %(classname)s %(bc2firmflags)s -o %(executable)s" % environment
    return execute(environment, cmd, timeout=240)
Beispiel #6
0
def step_run(environment):
    """Simple teststep which executes a shell script"""
    cmd = "/bin/sh %(testname)s" % environment
    return execute(environment, cmd, timeout=10)
Beispiel #7
0
def step_compile_d(environment):
	"""Compile file with DC without linking"""
	cmd = "%(dc)s -c %(filename)s %(dflags)s -of%(executable)s" % environment
	return execute(environment, cmd, timeout=240)
Beispiel #8
0
 def step(env):
     """Command to execute as step"""
     cmd = "%(compiler)s --" + param + " %(testname)s"
     return execute(env, cmd % env, timeout=60)