From 6c4b5d61b6a8e1d9d0d4fdc8cbb7beacfee8ceba Mon Sep 17 00:00:00 2001 From: Dingli Zhang Date: Fri, 10 May 2024 13:02:17 +0000 Subject: [PATCH] Increase test timeout for riscv64 --- 0002-Increase-test-timeout-for-riscv64.patch | 35 ++++++++++++++++++++ apache-rat.spec | 9 ++++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 0002-Increase-test-timeout-for-riscv64.patch diff --git a/0002-Increase-test-timeout-for-riscv64.patch b/0002-Increase-test-timeout-for-riscv64.patch new file mode 100644 index 0000000..05495ed --- /dev/null +++ b/0002-Increase-test-timeout-for-riscv64.patch @@ -0,0 +1,35 @@ +From 0f5c5d02a3b8018f41bd2e201621168c90b351ed Mon Sep 17 00:00:00 2001 +From: Dingli Zhang +Date: Fri, 10 May 2024 13:08:25 +0000 +Subject: [PATCH] Increase test timeout for riscv64 + + +diff --git a/apache-rat-core/src/test/java/org/apache/rat/analysis/license/AppliedApacheSoftwareLicense20Test.java b/apache-rat-core/src/test/java/org/apache/rat/analysis/license/AppliedApacheSoftwareLicense20Test.java +index 94c0917..0e681a5 100644 +--- a/apache-rat-core/src/test/java/org/apache/rat/analysis/license/AppliedApacheSoftwareLicense20Test.java ++++ b/apache-rat-core/src/test/java/org/apache/rat/analysis/license/AppliedApacheSoftwareLicense20Test.java +@@ -101,7 +101,7 @@ public class AppliedApacheSoftwareLicense20Test { + DirectoryScanner.testFilesInDir("appliedAL20/good", license, true); + } + +- @Test(timeout = 2000) // may need to be adjusted if many more files are added ++ @Test(timeout = 20000) // may need to be adjusted if many more files are added + public void baddFiles() throws Exception { + DirectoryScanner.testFilesInDir("appliedAL20/bad", license, false); + } +diff --git a/apache-rat-core/src/test/java/org/apache/rat/analysis/license/OASISLicenseTest.java b/apache-rat-core/src/test/java/org/apache/rat/analysis/license/OASISLicenseTest.java +index 7e46921..c460e82 100644 +--- a/apache-rat-core/src/test/java/org/apache/rat/analysis/license/OASISLicenseTest.java ++++ b/apache-rat-core/src/test/java/org/apache/rat/analysis/license/OASISLicenseTest.java +@@ -109,7 +109,7 @@ public class OASISLicenseTest { + DirectoryScanner.testFilesInDir("oasis/good", license, true); + } + +- @Test(timeout = 2000) // may need to be adjusted if many more files are added ++ @Test(timeout = 20000) // may need to be adjusted if many more files are added + public void baddFiles() throws Exception { + DirectoryScanner.testFilesInDir("oasis/bad", license, false); + } +-- +2.41.0 + diff --git a/apache-rat.spec b/apache-rat.spec index 8d1a5b2..dce9395 100644 --- a/apache-rat.spec +++ b/apache-rat.spec @@ -1,12 +1,13 @@ Name: apache-rat Version: 0.13 -Release: 1 +Release: 2 Summary: Apache Release Audit Tool (RAT) License: ASL 2.0 URL: http://creadur.apache.org/rat/ Source0: https://archive.apache.org/dist/creadur/apache-rat-%{version}/apache-rat-%{version}-src.tar.bz2 BuildArch: noarch Patch1: 0001-Port-to-current-doxia-sitetools.patch +Patch2: 0002-Increase-test-timeout-for-riscv64.patch BuildRequires: maven-local mvn(commons-cli:commons-cli) BuildRequires: mvn(commons-collections:commons-collections) mvn(commons-io:commons-io) BuildRequires: mvn(commons-lang:commons-lang) mvn(junit:junit) mvn(org.apache.ant:ant) @@ -69,6 +70,9 @@ This package contains the API documentation for %{name}. %prep %setup -q -n %{name}-%{version} %patch1 -p1 +%if "%{_arch}" == "riscv64" +%patch2 -p1 +%endif %pom_disable_module apache-rat %pom_remove_plugin -r :maven-antrun-plugin %pom_remove_plugin -r :apache-rat-plugin @@ -107,6 +111,9 @@ echo "apache-rat/rat-core apache-rat/rat-tasks" > $RPM_BUILD_ROOT%{_sysconfdir}/ %doc LICENSE NOTICE %changelog +* Fri May 10 2024 Dingli Zhang - 0.13-2 +- Increase test timeout for riscv64 + * Wed May 10 2023 chenchen - 0.13-1 - update to version 0.13