Skip to content

Leo3418/junit-5-ebuild-repo

Repository files navigation

JUnit 5 ebuild Repository for Gentoo

This is an ebuild repository for prototyping, development, and testing of JUnit 5 support for Gentoo packages. Right now, it contains:

  • An experimental eclass java-pkg-junit-5.eclass, which allows an ebuild to run a Java package's tests using JUnit 5.
  • Some ebuilds that need JUnit 5 for running tests and therefore use java-pkg-junit-5.eclass. These ebuilds also act as test cases for java-pkg-junit-5.eclass.

This ebuild repository should be considered to be in the alpha stage. Packages may be removed, and incompatible eclass changes may occur at any time.

Stages of Work

Using JUnit 5 from an ebuild That Uses java-pkg-simple.eclass

To use JUnit 5 from an ebuild that inherits java-pkg-simple.eclass, please make the following modifications to the ebuild:

  1. If the ebuild is not using EAPI 8, make sure it does so.

    -EAPI=7
    +EAPI=8
  2. If the ebuild does not include the test USE flag in the JAVA_PKG_IUSE variable, make sure it does so. In addition, ensure the JAVA_TESTING_FRAMEWORKS variable's value is not empty (it needs not contain any special value like junit-jupiter or junit-5).

    -JAVA_PKG_IUSE="doc source"
    +JAVA_PKG_IUSE="doc source test"
    +JAVA_TESTING_FRAMEWORKS="foo"
    
     inherit java-pkg-2 java-pkg-simple
  3. Inherit the eclass without removing inheritance of any other eclass.

    -inherit java-pkg-2 java-pkg-simple
    +inherit java-pkg-2 java-pkg-simple java-pkg-junit-5
  4. If the ebuild overrides pkg_setup, ensure that its pkg_setup calls java-pkg-junit-5_pkg_setup. Note that java-pkg-junit-5_pkg_setup may replace any occurrence of java-pkg-2_pkg_setup.

     pkg_setup() {
    -	java-pkg-2_pkg_setup
    +	java-pkg-junit-5_pkg_setup
     }
  5. If the ebuild makes any calls to java-pkg-simple_src_test, replace them with java-pkg-junit-5_src_test.

    -	java-pkg-simple_src_test
    +	java-pkg-junit-5_src_test

About

::junit-5 -- Experimental JUnit 5 support for Gentoo package managers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages