You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by mc...@apache.org on 2021/05/06 16:16:41 UTC

[cassandra-builds] branch trunk updated: Repeat last fix to jvm-dtest and jvm-dtest-upgrade too

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

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


The following commit(s) were added to refs/heads/trunk by this push:
     new 6844402  Repeat last fix to jvm-dtest and jvm-dtest-upgrade too
6844402 is described below

commit 6844402e046f1850f08c3cf6de59a40b07ae2f64
Author: Mick Semb Wever <mc...@apache.org>
AuthorDate: Thu May 6 18:16:05 2021 +0200

    Repeat last fix to jvm-dtest and jvm-dtest-upgrade too
---
 build-scripts/cassandra-test.sh | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/build-scripts/cassandra-test.sh b/build-scripts/cassandra-test.sh
index 5680792..b962a1e 100755
--- a/build-scripts/cassandra-test.sh
+++ b/build-scripts/cassandra-test.sh
@@ -128,20 +128,22 @@ _main() {
     "jvm-dtest")
       ant clean jar
       testlist=$( _list_tests "distributed" | grep -v "upgrade" | _split_tests "${split_chunk}")
-      if ! [[ -z "$testlist" ]]; then
-        ant testclasslist -Dtest.classlistprefix=distributed -Dtest.timeout=$(_timeout_for "test.distributed.timeout") -Dtest.classlistfile=<(echo "${testlist}") -Dtmp.dir="${TMP_DIR}" || echo "failed $target"
-      else
-        echo "Skipping $target, no tests in split ${split_chunk}"
+      if [[ -z "$testlist" ]]; then
+          # something has to run in the split to generate a junit xml result
+          echo Hacking jvm-dtest to run only first test found as no tests in split ${split_chunk} were found
+          testlist="$( _list_tests "distributed"  | grep -v "upgrade" | head -n1)"
       fi
+      ant testclasslist -Dtest.classlistprefix=distributed -Dtest.timeout=$(_timeout_for "test.distributed.timeout") -Dtest.classlistfile=<(echo "${testlist}") -Dtmp.dir="${TMP_DIR}" || echo "failed $target"
       ;;
     "jvm-dtest-upgrade")
       _build_all_dtest_jars
       testlist=$( _list_tests "distributed"  | grep "upgrade" | _split_tests "${split_chunk}")
-      if ! [[ -z "$testlist" ]]; then
-        ant testclasslist -Dtest.classlistprefix=distributed -Dtest.timeout=$(_timeout_for "test.distributed.timeout") -Dtest.classlistfile=<(echo "${testlist}") -Dtmp.dir="${TMP_DIR}" || echo "failed $target"
-      else
-        echo "Skipping $target, no tests in split ${split_chunk}"
+      if [[ -z "$testlist" ]]; then
+          # something has to run in the split to generate a junit xml result
+          echo Hacking jvm-dtest-upgrade to run only first test found as no tests in split ${split_chunk} were found
+          testlist="$( _list_tests "distributed"  | grep "upgrade" | head -n1)"
       fi
+      ant testclasslist -Dtest.classlistprefix=distributed -Dtest.timeout=$(_timeout_for "test.distributed.timeout") -Dtest.classlistfile=<(echo "${testlist}") -Dtmp.dir="${TMP_DIR}" || echo "failed $target"
       ;;
     *)
       echo "unregconised \"$target\""

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org