Ejemplo n.º 1
0
def changetarget(targetClass):
    '''tranverse all class name to run the test '''
    prefix = "/JavaTest/com/trustie/junitest/"
    for k, v in classdict.items():
        if targetClass not in classdict.keys() == True:
            command = "mv" + " " + prefix + k + " " + prefix + targetClass
            os.system(command)
            print(k + " start!!!!!!!!!!!!!!!!!!!!!")
            #      runtest.run()
            print(k + " run!!!!!!!!!!!!!!!!!!!!!")
            command = "mv" + " " + prefix + targetClass + " " + prefix + k
            os.system(command)
        elif k != targetClass:
            command = "mv" + " " + prefix + targetClass + " " + prefix + "cache.class"
            os.system(command)

            command = "mv" + " " + prefix + k + " " + prefix + targetClass
            os.system(command)

            print(k + " start!!!!!!!!!!!!!!!!!!!!!")
            runtest.run()
            print(k + " run!!!!!!!!!!!!!!!!!!!!!")

            command = "mv" + " " + prefix + targetClass + " " + prefix + k
            os.system(command)

            command = "mv" + " " + prefix + "cache.class" + " " + prefix + targetClass
            os.system(command)
        else:
            runtest.run()
Ejemplo n.º 2
0
	if options.progress is not None:
		g_progress = int(options.progress)
	if options.no_progress is not None:
		g_progress = None
	if options.timeout is not None:
		g_timeout = int(options.timeout)
	if options.kernel is not None:
		g_kernel = options.conf

	if len(args) != 1:
		sys.stderr.write("Usage: test.py [options] test-commands\n")
		exit(1)
	return args[0]
# end getargs

testcommands = getargs()
msg = runtest.run(testcommands,
	sys.stdout,
	menuprompt=g_menuprompt,
	shellprompt=g_shellprompt,
	conf=g_conf,
	ram=g_ram,
	cpus=g_cpus,
	doom=g_doom,
	progress=g_progress,
	timeout=g_timeout,
	kernel=g_kernel)
if msg is not None:
	sys.stderr.write("test.py: test commands aborted with %s\n" % msg)
exit(0)
Ejemplo n.º 3
0
	if options.progress is not None:
		g_progress = int(options.progress)
	if options.no_progress is not None:
		g_progress = None
	if options.timeout is not None:
		g_timeout = int(options.timeout)
	if options.kernel is not None:
		g_kernel = options.kernel

	if len(args) != 1:
		sys.stderr.write("Usage: test.py [options] test-commands\n")
		exit(1)
	return args[0]
# end getargs

testcommands = getargs()
msg = runtest.run(testcommands,
	sys.stdout,
	menuprompt=g_menuprompt,
	shellprompt=g_shellprompt,
	conf=g_conf,
	ram=g_ram,
	cpus=g_cpus,
	doom=g_doom,
	progress=g_progress,
	timeout=g_timeout,
	kernel=g_kernel)
if msg is not None:
	sys.stderr.write("test.py: test commands aborted with %s\n" % msg)
exit(0)
Ejemplo n.º 4
0
#!/usr/bin/env python

import os
import sys

sys.path.append(os.path.join(os.path.dirname(__file__), '..'))

from runtest import version_info, get_filter, cli, run
from runtest_config import configure

assert version_info.major == 2

# Construct a filter list
energy = [
    get_filter(string='ddcosmo electrostatic solvation energy (kcal/mol):',
               abs_tolerance=1.0e-10)
]
# Invoke the command line interface parser which returns options
options = cli()

ierr = run(options,
           configure,
           input_files='Input.txt',
           filters={'out': energy})

sys.exit(ierr)
Ejemplo n.º 5
0
import runtest
import compilefile
import sys
sys.path.append("/JavaTest/dirlist/")
import listdir

step1 = listdir.lsdir()
print("obtaining docs' names finished! \n")
step2 = compilefile.compile()
print("compiling file finished! \n")

#import multisource
#step3 = multisource.changetarget("calculate.class")
step3 = runtest.run()
print("running junit test finished! \n")