Merge branch 'cassandra-4.1' into trunk

This commit is contained in:
Ekaterina Dimitrova 2023-04-13 10:20:36 -04:00
commit 91f6a9aca8
2 changed files with 10 additions and 48 deletions

View File

@ -156,17 +156,22 @@
<os family="windows" />
</condition>
<!-- Check if all tests are being run or just one. If it's all tests don't spam the console with test output.
<!-- Check if all tests are being run or just one (check testclasslist target). If it's all tests don't spam the
console with test output.
If it's an individual test print the output from the test under the assumption someone is debugging the test
and wants to know what is going on without having to context switch to the log file that is generated.
Debug level output still needs to be retrieved from the log file. -->
<macrodef name="keepbrief">
<macrodef name="set-keepbrief-property">
<attribute name="test-name" />
<sequential>
<javac srcdir="test/anttasks" destdir="${test.classes}" includeantruntime="true" excludes="**/JdkProperties.java" />
<taskdef name="KeepBriefBrief" classname="org.apache.cassandra.anttasks.KeepBriefBrief" classpath="${test.classes}"/>
<KeepBriefBrief property="cassandra.keepBriefBrief"/>
<condition property="cassandra.keepBriefBrief" value="false" else="true">
<not>
<equals arg1="@{test-name}" arg2="*Test"/>
</not>
</condition>
</sequential>
</macrodef>
<set-keepbrief-property test-name="${test.name}" />
<fail message="Unsupported JDK version used: ${ant.java.version}">
<condition><not><contains string="${java.supported}" substring="${ant.java.version}"/></not></condition>

View File

@ -1,43 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.cassandra.anttasks;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
public class KeepBriefBrief extends Task
{
private String property;
public void setProperty(String property)
{
this.property = property;
}
public void execute()
{
Project project = getProject();
if (project.getUserProperty(property) == null)
if (project.getProperty("test.name").equals("*Test"))
project.setProperty(property, "true");
else
project.setProperty(property, "false");
}
}