Merge branch 'cassandra-4.1' into trunk

* cassandra-4.1:
  Generate.sh -s param to skip autodetection of tests
This commit is contained in:
Bereng 2023-06-12 10:02:58 +02:00
commit dcb763ec2c
3 changed files with 21 additions and 6 deletions

View File

@ -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"
@ -81,9 +83,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
;;
@ -100,6 +104,8 @@ while getopts "e:afpib:" opt; do
;;
i ) check_env_vars=false
;;
s ) detect_changed_tests=false
;;
\?) die "Invalid option: -$OPTARG"
;;
esac
@ -187,7 +193,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"

View File

@ -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_11_and_17.yml, config_11_and_17.yml.FREE and config_11_and_17.yml.PAID expanded configuration"
echo " files from the main config_template.yml reusable configuration file."
echo " Use this for permanent changes in config_11_and_17.yml 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_11_and_17.yml, e.g.:"
echo " -e DTEST_BRANCH=CASSANDRA-8272"
echo " -e DTEST_REPO=https://github.com/adelapena/cassandra-dtest.git"
@ -77,9 +79,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
;;
@ -96,6 +100,8 @@ while getopts "e:afpib:" opt; do
;;
i ) check_env_vars=false
;;
s ) detect_changed_tests=false
;;
\?) die "Invalid option: -$OPTARG"
;;
esac
@ -181,7 +187,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"

View File

@ -124,6 +124,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:
```