From 97ff24c06005cd5a15f03d20f5223f8ac57506f5 Mon Sep 17 00:00:00 2001 From: Tommi Virtanen Date: Fri, 3 Jun 2011 09:48:22 -0700 Subject: [PATCH] Un-hardcode tasks. --- dbench.py | 18 ++++++------------ dbench.yaml | 7 +++++-- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/dbench.py b/dbench.py index 7a7fd5cd5276f..85903302f1576 100644 --- a/dbench.py +++ b/dbench.py @@ -13,6 +13,7 @@ from orchestra import connection, run, remote import orchestra.cluster # TODO cleanup import teuthology.misc as teuthology +from teuthology.run_tasks import run_tasks log = logging.getLogger(__name__) @@ -33,6 +34,10 @@ if __name__ == '__main__': for rem, roles in zip(remotes, ROLES): cluster.add(rem, roles) + ctx = bunch.Bunch( + cluster=cluster, + ) + log.info('Checking for old test directory...') processes = cluster.run( args=[ @@ -414,18 +419,7 @@ if __name__ == '__main__': # TODO rbd - ctx = bunch.Bunch( - cluster=cluster, - ) - from teuthology.run_tasks import run_tasks - run_tasks( - tasks=[ - {'cfuse': ['client.0']}, - {'autotest': {'client.0': ['dbench']}}, - {'interactive': None}, - ], - ctx=ctx, - ) + run_tasks(tasks=config['tasks'], ctx=ctx) log.info('Shutting down mds daemons...') for id_, proc in mds_daemons.iteritems(): diff --git a/dbench.yaml b/dbench.yaml index 32bc4f618b6a6..c69626e6ce516 100644 --- a/dbench.yaml +++ b/dbench.yaml @@ -6,5 +6,8 @@ targets: - ubuntu@sepia70.ceph.dreamhost.com - ubuntu@sepia71.ceph.dreamhost.com - ubuntu@sepia72.ceph.dreamhost.com -client_types: -- client.0: kclient +tasks: +- cfuse: [client.0] +- autotest: + client.0: [dbench] +- interactive: -- 2.39.5