This is an automated email from the ASF dual-hosted git repository.

mck pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git


The following commit(s) were added to refs/heads/master by this push:
     new c5df94b  Add `--only-resource-intensive-tests` command line option to 
only run the resource intensive annotated tests.
c5df94b is described below

commit c5df94bf04ba41d8a077af8f4703a1a98fb7cfc9
Author: Mick Semb Wever <[email protected]>
AuthorDate: Sun Apr 19 18:04:42 2020 +0200

    Add `--only-resource-intensive-tests` command line option to only run the 
resource intensive annotated tests.
    
    Previously on the nightly builds the `dtest-large` job was used as a 
replacement for the `dtest` job. In the pipelines today both dtest and 
dtest-large are executed, so dtest-large re-executing the non-intensive tests 
is a waste.
    
     patch by Mick Semb Wever; reviewed by Eduard Tudenhöfner for 
CASSANDRA-15729
---
 conftest.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/conftest.py b/conftest.py
index 7cc3acc..34de30b 100644
--- a/conftest.py
+++ b/conftest.py
@@ -55,6 +55,8 @@ def pytest_addoption(parser):
                      help="Control the number of data directories to create 
per instance")
     parser.addoption("--force-resource-intensive-tests", action="store_true", 
default=False,
                      help="Forces the execution of tests marked as 
resource_intensive")
+    parser.addoption("--only-resource-intensive-tests", action="store_true", 
default=False,
+                     help="Only run tests marked as resource_intensive")
     parser.addoption("--skip-resource-intensive-tests", action="store_true", 
default=False,
                      help="Skip all tests marked as resource_intensive")
     parser.addoption("--cassandra-dir", action="store", default=None,
@@ -476,6 +478,13 @@ def pytest_collection_modifyitems(items, config):
                     deselect_test = True
                     logger.info("SKIP: Deselecting resource_intensive test %s 
due to insufficient system resources" % item.name)
 
+        if not item.get_closest_marker("resource_intensive") and not 
collect_only:
+            only_resource_intensive = 
config.getoption("--only-resource-intensive-tests")
+            if only_resource_intensive:
+                deselect_test = True
+                logger.info("SKIP: Deselecting non resource_intensive test %s 
as --only-resource-intensive-tests specified" % item.name)
+
+
         if item.get_closest_marker("no_vnodes"):
             if config.getoption("--use-vnodes"):
                 deselect_test = True


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to