]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa/rgw: Run s3-tests from within the Ceph repo wip-include-s3tests
authorAdam C. Emerson <aemerson@redhat.com>
Mon, 29 Sep 2025 21:11:09 +0000 (17:11 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Tue, 30 Sep 2025 15:14:04 +0000 (11:14 -0400)
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
qa/rgw/s3tests-branch.yaml
qa/tasks/s3tests.py

index 8710ce35893b1e378e1d48ed146891b91332f49c..c5d36404fd45bc6d2bbeb97a5a47a4636cd4ddcc 100644 (file)
@@ -1,4 +1,4 @@
 overrides:
   s3tests:
-     force-branch: ceph-master
+     # force-branch: main
      # git_remote: https://github.com/ceph/
index 93d370251c14c7e38789836b132dbc02e1d55213..4b8fb5814224835cb969e60a012807416472123d 100644 (file)
@@ -33,30 +33,34 @@ def download(ctx, config):
     log.info('Downloading s3-tests...')
     testdir = teuthology.get_testdir(ctx)
     for (client, client_config) in config.items():
-        s3tests_branch = client_config.get('force-branch', None)
+        s3tests_branch = client_config.get('suite_sha1', None);
+        s3tests_sha = client_config.get('suite_sha1', client_config.get('sha1'))
         if not s3tests_branch:
             raise ValueError(
-                "Could not determine what branch to use for s3-tests. Please add 'force-branch: {s3-tests branch name}' to the .yaml config for this s3tests task.")
+                "Could not determine what branch to use for ceph suite.")
 
         log.info("Using branch '%s' for s3tests", s3tests_branch)
-        sha1 = client_config.get('sha1')
-        git_remote = client_config.get('git_remote', teuth_config.ceph_git_base_url)
-        ctx.cluster.only(client).run(
-            args=[
-                'git', 'clone',
-                '-b', s3tests_branch,
-                git_remote + 's3-tests.git',
-                '{tdir}/s3-tests-{client}'.format(tdir=testdir, client=client),
+        git_remote = teuth_config.get_ceph_qa_suite_git_url()
+        if s3tests_sha is not None:
+            ctx.cluster.only(client).run(
+                args=[
+                    'git', 'clone',
+                    '--revision={rev}'.format(rev=s3tests_sha),
+                    '-depth', "1",
+                    git_remote,
+                    '{tdir}/s3-tests-{client}'.format(tdir=testdir, client=client),
                 ],
             )
-        if sha1 is not None:
+        else:
             ctx.cluster.only(client).run(
                 args=[
-                    'cd', '{tdir}/s3-tests-{client}'.format(tdir=testdir, client=client),
-                    run.Raw('&&'),
-                    'git', 'reset', '--hard', sha1,
-                    ],
-                )
+                    'git', 'clone',
+                    '-b', s3tests_branch,
+                    '-depth', "1",
+                    git_remote,
+                    '{tdir}/s3-tests-{client}'.format(tdir=testdir, client=client),
+                ],
+            )
         if client_config.get('boto3_extensions'):
             ctx.cluster.only(client).run(
                     args=['mkdir',
@@ -457,7 +461,7 @@ def run_tests(ctx, config):
         client_config = client_config or {}
         (remote,) = ctx.cluster.only(client).remotes.keys()
         args = [
-            'cd', '{tdir}/s3-tests-{client}'.format(tdir=testdir, client=client), run.Raw('&&'),
+            'cd', '{tdir}/s3-tests-{client}/qa/rgw/s3-tests'.format(tdir=testdir, client=client), run.Raw('&&'),
             'S3TEST_CONF={tdir}/archive/s3-tests.{client}.conf'.format(tdir=testdir, client=client),
             'BOTO_CONFIG={tdir}/boto-{client}.cfg'.format(tdir=testdir, client=client)
             ]