Skip to content

Commit

Permalink
dev-java/bcel: remove test restriction
Browse files Browse the repository at this point in the history
* removes test restriction and specifically excludes failing tests
* tests excluded are documented in the bug
Bug: https://bugs.gentoo.org/830798

Signed-off-by: Volkmar W. Pogatzki <[email protected]>
Closes: gentoo#27477
Signed-off-by: Miroslav Šulc <[email protected]>
  • Loading branch information
vaukai authored and fordfrog committed Oct 9, 2022
1 parent 5727872 commit 1562088
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 25 deletions.
1 change: 1 addition & 0 deletions dev-java/bcel/Manifest
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
DIST bcel-6.5.0-sources.tar.gz 1009051 BLAKE2B fd07d8a5144112efe38e30a8d10c3b6a189a4ec70defa96c402fa88027acf84b07c15138d235354baac18bdb798d407c11ccfada7bbe7339532f829e814e2d2c SHA512 c6da4b4d4cbad3ad2b3a4c0208063e3858170356fc4f6670c95ce819f0aea69f103914875a12bf2715a869c2b19a3e79fcb55a695eb269d9937520db25da1e3d
DIST bcel-6.5.0-src.tar.gz 1009051 BLAKE2B fd07d8a5144112efe38e30a8d10c3b6a189a4ec70defa96c402fa88027acf84b07c15138d235354baac18bdb798d407c11ccfada7bbe7339532f829e814e2d2c SHA512 c6da4b4d4cbad3ad2b3a4c0208063e3858170356fc4f6670c95ce819f0aea69f103914875a12bf2715a869c2b19a3e79fcb55a695eb269d9937520db25da1e3d
60 changes: 35 additions & 25 deletions dev-java/bcel/bcel-6.5.0-r3.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ inherit java-pkg-2 java-pkg-simple

DESCRIPTION="Apache Commons Bytecode Engineering Library"
HOMEPAGE="https://commons.apache.org/proper/commons-bcel/"
SRC_URI="mirror://apache/commons/${PN}/source/${P}-src.tar.gz -> ${P}-sources.tar.gz"
SRC_URI="mirror://apache/commons/${PN}/source/${P}-src.tar.gz"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
Expand All @@ -33,9 +34,9 @@ DEPEND="
dev-java/commons-collections:4
dev-java/commons-io:1
dev-java/commons-lang:3.6
dev-java/jna:4
dev-java/jmh-core:0
dev-java/javax-mail:0
dev-java/jmh-core:0
dev-java/jna:4
)
"

Expand All @@ -51,25 +52,34 @@ JAVA_SRC_DIR="src/main/java"

JAVA_TEST_GENTOO_CLASSPATH="commons-collections-4,commons-io-1,commons-lang-3.6,jmh-core,jna-4,junit-4,javax-mail"
JAVA_TEST_SRC_DIR="src/test/java"
JAVA_TEST_RESOURCE_DIRS=(
"src/test/resources"
)
JAVA_TEST_EXCLUDES=(
# Invalid test class
"org.apache.bcel.data.AnonymousClassTest"
"org.apache.bcel.verifier.tests.TestArray01"
"org.apache.bcel.verifier.tests.TestArrayAccess01"
"org.apache.bcel.verifier.tests.TestArrayAccess02Creator"
"org.apache.bcel.verifier.tests.TestArrayAccess03Creator"
"org.apache.bcel.verifier.tests.TestArrayAccess04Creator"
"org.apache.bcel.verifier.tests.TestLegalInvokeInterface01"
"org.apache.bcel.verifier.tests.TestLegalInvokeSpecial01"
"org.apache.bcel.verifier.tests.TestLegalInvokeSpecial02"
"org.apache.bcel.verifier.tests.TestLegalInvokeStatic01"
"org.apache.bcel.verifier.tests.TestLegalInvokeVirtual01"
"org.apache.bcel.verifier.tests.TestLegalInvokeVirtual02"
"org.apache.bcel.verifier.tests.TestReturn01Creator"
"org.apache.bcel.verifier.tests.TestReturn02"
"org.apache.bcel.verifier.tests.TestCreator"
"org.apache.bcel.verifier.tests.TestReturn03Creator"
)
JAVA_TEST_RESOURCE_DIRS="src/test/resources"

src_prepare() {
default
sed \
-e '/public void/s:testB79:notTestB79:' \
-e '/public void/s:testB295:notTestB295:' \
-i src/test/java/org/apache/bcel/PLSETestCase.java || die
sed \
-e '/public void/s:testLocalVariableCount:notTestLocalVariableCount:' \
-e '/public void/s:testLocalVariableTableCount:notTestLocalVariableTableCount:' \
-i src/test/java/org/apache/bcel/CounterVisitorTestCase.java || die
sed \
-e '/import org.junit.Test/a import org.junit.Ignore;' \
-e '/testRemoveLocalVariable()/i @Ignore' \
-e '/testRemoveLocalVariables()/i @Ignore' \
-e '/testInvalidNullMethodBody_MailDateFormat()/i @Ignore' \
-i src/test/java/org/apache/bcel/generic/MethodGenTestCase.java || die
}

src_test() {
pushd src/test/java || die
local JAVA_TEST_RUN_ONLY=$(find * \
-wholename "**/*TestCase.java" \
! -name "Abstract*TestCase.java" \
)
JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//.java}"
JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//\//.}"
popd
java-pkg-simple_src_test
}

0 comments on commit 1562088

Please sign in to comment.