]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Support running multiple autotest tests.
authorTommi Virtanen <tommi.virtanen@dreamhost.com>
Thu, 16 Jun 2011 22:38:25 +0000 (15:38 -0700)
committerTommi Virtanen <tommi.virtanen@dreamhost.com>
Thu, 16 Jun 2011 23:09:49 +0000 (16:09 -0700)
Docs had this from the start, it was just buggy. Still
doesn't support using the "autotest" task more than once,
no easy way to differentiate the results in that case.

teuthology/task/autotest.py

index f91f7c9b779a7f5c0e3e8d273c73a2a96fba9734..4be6e76186bd690572706a9e0595b16dcc971c92 100644 (file)
@@ -32,6 +32,10 @@ def task(ctx, config):
         # TODO parallelize
         ctx.cluster.only(role).run(
             args=[
+                # explicitly does not support multiple autotest tasks
+                # in a single run; the result archival would conflict
+                'mkdir', '/tmp/cephtest/archive/autotest',
+                run.Raw('&&'),
                 'mkdir', '/tmp/cephtest/autotest',
                 run.Raw('&&'),
                 'wget',
@@ -81,10 +85,11 @@ def task(ctx, config):
         scratch = os.path.join(mnt, 'client.{id}'.format(id=id_))
 
         assert isinstance(tests, list)
-        for testname in tests:
-            log.info('Running autotest client test %s...', testname)
+        for idx, testname in enumerate(tests):
+            log.info('Running autotest client test #%d: %s...', idx, testname)
 
-            tag = '{testname}.client.{id}'.format(
+            tag = 'client.{id}.num{idx}.{testname}'.format(
+                idx=idx,
                 testname=testname,
                 id=id_,
                 )
@@ -117,6 +122,11 @@ def task(ctx, config):
 
             remote.run(
                 args=[
-                    'rm', '-rf', '--', control, '/tmp/cephtest/autotest',
+                    'rm', '-rf', '--', control,
                     ],
                 )
+        remote.run(
+            args=[
+                'rm', '-rf', '--', '/tmp/cephtest/autotest',
+                ],
+            )