This commit is contained in:
maoling 2026-08-01 14:09:47 +03:00 committed by GitHub
commit 623cce3140
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 28 additions and 0 deletions

View File

@ -1671,6 +1671,34 @@
</testmacro> </testmacro>
</target> </target>
<!--
ant testpackage -Dtest.package=org.apache.cassandra.cache
ant testpackage -Dtest.package=org.apache.cassandra.streaming
-->
<target name="testpackage" depends="maybe-build-test" description="Execute unit tests with dot-separated package names">
<!-- Replace dots in the package name with slashes -->
<loadresource property="test.package.dir">
<propertyresource name="test.package"/>
<filterchain>
<tokenfilter>
<replaceregex pattern="\." replace="/" flags="g"/>
</tokenfilter>
</filterchain>
</loadresource>
<!-- Print the package being tested -->
<echo message="Running tests under package: ${test.package}"/>
<!-- Collect all test classes -->
<path id="all-test-classes-path">
<fileset dir="${test.unit.src}" includes="${test.package.dir}/**/*Test.java"/>
</path>
<pathconvert property="all-test-classes" pathsep=",">
<path refid="all-test-classes-path"/>
</pathconvert>
<!-- Set the test file list and call the test helper -->
<property name="test.file.list" value="${all-test-classes}"/>
<testhelper testdelegate="testlist"/>
</target>
<!-- Use this with an FQDN for test class, and an optional csv list of methods like this: <!-- Use this with an FQDN for test class, and an optional csv list of methods like this:
ant long-testsome -Dtest.name=org.apache.cassandra.cql3.ManyRowsTest ant long-testsome -Dtest.name=org.apache.cassandra.cql3.ManyRowsTest
ant long-testsome -Dtest.name=org.apache.cassandra.cql3.ManyRowsTest -Dtest.methods=testLargeCount ant long-testsome -Dtest.name=org.apache.cassandra.cql3.ManyRowsTest -Dtest.methods=testLargeCount