예제 #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)
예제 #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)
예제 #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)
예제 #4
0
파일: c.py 프로젝트: rep6/sisyphus
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)
예제 #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)
예제 #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)
예제 #7
0
파일: d.py 프로젝트: rep6/sisyphus
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)
예제 #8
0
 def step(env):
     """Command to execute as step"""
     cmd = "%(compiler)s --" + param + " %(testname)s"
     return execute(env, cmd % env, timeout=60)