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

bereng pushed a commit to branch cassandra-3.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/cassandra-3.0 by this push:
     new c91e2714b9 Generate.sh -s param to skip autodetection of tests
c91e2714b9 is described below

commit c91e2714b9c43f7959da1b698f2c4e28c94b9b6d
Author: Bereng <[email protected]>
AuthorDate: Fri Jun 9 09:47:30 2023 +0200

    Generate.sh -s param to skip autodetection of tests
    
    patch by Berenguer Blasi; reviewed by Andres de la Peña for CASSANDRA-18553
---
 .circleci/generate.sh | 12 +++++++++---
 .circleci/readme.md   |  3 +++
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/.circleci/generate.sh b/.circleci/generate.sh
index 40bdd205db..94d46f10e0 100755
--- a/.circleci/generate.sh
+++ b/.circleci/generate.sh
@@ -30,7 +30,7 @@ die ()
 
 print_help()
 {
-  echo "Usage: $0 [-f|-p|-a|-e|-i|-b]"
+  echo "Usage: $0 [-f|-p|-a|-e|-i|-b|-s]"
   echo "   -a Generate the config.yml, config.yml.FREE and config.yml.PAID 
expanded configuration"
   echo "      files from the main config_template.yml reusable configuration 
file."
   echo "      Use this for permanent changes in config that will be committed 
to the main repo."
@@ -39,6 +39,8 @@ print_help()
   echo "   -b Specify the base git branch for comparison when determining 
changed tests to"
   echo "      repeat. Defaults to ${BASE_BRANCH}. Note that this option is not 
used when"
   echo "      the '-a' option is specified."
+  echo "   -s Skip automatic detection of changed tests. Useful when you need 
to repeat a few ones,"
+  echo "      or when there are too many changed tests for CircleCI."
   echo "   -e <key=value> Environment variables to be used in the generated 
config.yml, e.g.:"
   echo "                   -e DTEST_BRANCH=CASSANDRA-8272"
   echo "                   -e 
DTEST_REPO=https://github.com/adelapena/cassandra-dtest.git";
@@ -74,9 +76,11 @@ paid=false
 env_vars=""
 has_env_vars=false
 check_env_vars=true
-while getopts "e:afpib:" opt; do
+detect_changed_tests=true
+while getopts "e:afpib:s" opt; do
   case $opt in
       a ) all=true
+          detect_changed_tests=false
           ;;
       f ) free=true
           ;;
@@ -93,6 +97,8 @@ while getopts "e:afpib:" opt; do
           ;;
       i ) check_env_vars=false
           ;;
+      s ) detect_changed_tests=false
+          ;;
       \?) die "Invalid option: -$OPTARG"
           ;;
   esac
@@ -173,7 +179,7 @@ elif (!($has_env_vars)); then
 fi
 
 # add new or modified tests to the sets of tests to be repeated
-if (!($all)); then
+if $detect_changed_tests; then
   # Sanity check that the referenced branch exists
   if ! git show ${BASE_BRANCH} -- >&/dev/null; then
     echo -e "\n\nUnknown base branch: ${BASE_BRANCH}. Unable to detect changed 
tests.\n"
diff --git a/.circleci/readme.md b/.circleci/readme.md
index e65be5158a..302c7f0df7 100644
--- a/.circleci/readme.md
+++ b/.circleci/readme.md
@@ -101,6 +101,9 @@ generate.sh -p \
   -e REPEATED_UPGRADE_DTESTS=upgrade_tests/cql_tests.py \
   -e 
REPEATED_JVM_UPGRADE_DTESTS=org.apache.cassandra.distributed.upgrade.GroupByTest
 ```
+If you need to repeat a particular set of tests and avoid automatic detection 
of changed tests 
+use the -s command line option.
+
 For particular Ant test targets that are not included in the regular test 
suites, you can
 use the `run_repeated_utest` job:
 ```


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

Reply via email to