Exemple #1
0
    def __init__(self, accountID):
        self.accountID = accountID
        self.db = db_handler.DBHandler()

        self.tops = top_handler.AllTopHandler(accountID)

        account = self.db.get_websim_account(accountID)
        self.ws = websim.WebSim(login=account[0], password=account[1])
        self.ws.authorise()
        self.sb = submitter.Submitter(accountID)
Exemple #2
0
        if e.updated:
            NumUpdated += 1
        RunningEngines.append(e)
    except:
        print "Exception in user code:"
        print '-' * 60
        traceback.print_exc(file=sys.stdout)
        print '-' * 60


class Slave:
    def __init__(self, machine):
        self.machine = machine


submit = submitter.Submitter(Slave(utils.config.get('main', 'machine')))

# No updates. Report to server and wait 60 seconds, before moving on
if NumUpdated == 0 and not options.force:
    submit.Awake()
    time.sleep(60)
    sys.exit(0)

# Report all engines
submit.Start()
for e in RunningEngines:
    for modeInfo in e.modes:
        submit.AddEngine(modeInfo["name"], e.cset)

ranBenchmark = False
Exemple #3
0
resource.setrlimit(resource.RLIMIT_AS, (-1, -1))
resource.setrlimit(resource.RLIMIT_RSS, (-1, -1))
resource.setrlimit(resource.RLIMIT_DATA, (-1, -1))

# A mode is a configuration of an engine we just built.
Mode = namedtuple('Mode', ['shell', 'args', 'env', 'name', 'cset'])

# Set of engines that get build.
KnownEngines = [builders.MozillaInbound()]

# The native compiler is a special thing, for now.
native = builders.NativeCompiler()

# No updates. Report to server and wait 60 seconds, before moving on
for slave in slaves.init():
    submit = submitter.Submitter(slave)
    revs = submit.RequestedRevs()

    for rev in revs:
        Engines, NumUpdated = builders.build(KnownEngines, rev=rev["cset"])

        # Make a list of all modes.
        modes = []
        for engine in Engines:
            shell = os.path.join(utils.RepoPath, engine.source, engine.shell())
            env = None
            with utils.chdir(os.path.join(utils.RepoPath, engine.source)):
                env = engine.env()
            for m in engine.modes:
                engineArgs = engine.args if engine.args else []
                modeArgs = m['args'] if m['args'] else []
Exemple #4
0
def mainstats():
    t = submitter.Submitter()
    t.start()
    while t.is_alive():
        time.sleep(5)
Exemple #5
0
######### RECOMPILE ###############

pwd = os.path.dirname(os.path.realpath(__file__))
output = subprocess.check_call("cd " + pwd + "; ./compile.sh", shell=True)

######### RUN ####################

rev = utils.run(
    'hg parent --template "{node|short}" --cwd /home/h4writer/Build/mozilla-inbound'
)
print rev

engines = [engine.X86Engine()]
for engine in engines:
    submit = submitter.Submitter()
    submit.Start(rev, engine)
    runner.OctaneRunner(rev, engine, submit, normaljs).bench()
    runner.SSRunner(rev, engine, submit, normaljs).bench()
    runner.PeaceKeeperRunner(rev, engine, submit, normaljs).bench()
    submit.Finish()

######### SAVE COLORS ############

utils.run(engines[0].js + " -e ''")

fp = open("/tmp/tl-data.json", "r")
data = json.load(fp)
fp.close()

colors = utils.run(
Exemple #6
0
        'output': None
    },
    'kraken': {
        'name': 'kraken',
        'filter': benchmark.sunspider_filter,
        'output': None
    }
}

config = ConfigParser.RawConfigParser()
config.read(configFile)

if config.get('main', 'local') == 'yes':
    submit = submitter.FakeSubmitter(config)
else:
    submit = submitter.Submitter(config)

# Run benchmarks, filter and collect outputs.
for suite in benchmarks.keys():
    try:
        output = runGaiaTest(benchmarks[suite]['name'])
        benchmarks[suite]['output'] = benchmarks[suite]['filter'](output)
    except Exception as e:
        benchmarks[suite]['output'] = None
        print e

# Submit the request to the remote DB.
submit.Start()
submit.AddEngine(engine, changeset)
for suite in benchmarks.keys():
    tests = benchmarks[suite]['output']