• Re: [gentoo-dev] [PATCH] distutils-r1.eclass: support nonfatal in test

    From Anna@21:1/5 to alexey+gentoo@asokolov.org on Fri Jan 6 01:10:02 2023
    On 2023-01-05 23:55, alexey+gentoo@asokolov.org wrote:
    From: Alexey Sokolov <alexey+gentoo@asokolov.org>

    Signed-off-by: Alexey Sokolov <alexey+gentoo@asokolov.org>
    ---
    eclass/distutils-r1.eclass | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
    index 371d52bcb7e..8896768d3ce 100644
    --- a/eclass/distutils-r1.eclass
    +++ b/eclass/distutils-r1.eclass
    @@ -1,4 +1,4 @@
    -# Copyright 1999-2022 Gentoo Authors
    +# Copyright 1999-2023 Gentoo Authors
    # Distributed under the terms of the GNU General Public License v2

    # @ECLASS: distutils-r1.eclass
    @@ -1559,7 +1559,7 @@ distutils-r1_python_test() {
    esac

    if [[ ${?} -ne 0 ]]; then
    - die "Tests failed with ${EPYTHON}"
    + die -n "Tests failed with ${EPYTHON}"

    I don't think "nonfatal" should be used with tests. Any valid use cases
    for that?

    fi
    }

    --
    2.38.2



    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexey Sokolov@21:1/5 to All on Fri Jan 6 01:10:02 2023
    06.01.2023 00:03, Anna пишет:
    On 2023-01-05 23:55, alexey+gentoo@asokolov.org wrote:
    From: Alexey Sokolov <alexey+gentoo@asokolov.org>

    if [[ ${?} -ne 0 ]]; then
    - die "Tests failed with ${EPYTHON}"
    + die -n "Tests failed with ${EPYTHON}"

    I don't think "nonfatal" should be used with tests. Any valid use cases
    for that?

    src_test() {
    virtx distutils-r1_src_test
    }

    If the test fails with "die", Xvfb keeps running forever; but it's
    cleaned up correctly with die -n

    --
    Best regards,
    Alexey "DarthGandalf" Sokolov

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From alexey+gentoo@asokolov.org@21:1/5 to All on Fri Jan 6 01:00:01 2023
    From: Alexey Sokolov <alexey+gentoo@asokolov.org>

    Signed-off-by: Alexey Sokolov <alexey+gentoo@asokolov.org>
    ---
    eclass/distutils-r1.eclass | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
    index 371d52bcb7e..8896768d3ce 100644
    --- a/eclass/distutils-r1.eclass
    +++ b/eclass/distutils-r1.eclass
    @@ -1,4 +1,4 @@
    -# Copyright 1999-2022 Gentoo Authors
    +# Copyright 1999-2023 Gentoo Authors
    # Distributed under the terms of the GNU General Public License v2

    # @ECLASS: distutils-r1.eclass
    @@ -1559,7 +1559,7 @@ distutils-r1_python_test() {
    esac

    if [[ ${?} -ne 0 ]]; then
    - die "Tests failed with ${EPYTHON}"
    + die -n "Tests failed with ${EPYTHON}"
    fi
    }

    --
    2.38.2

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sam James@21:1/5 to All on Fri Jan 6 01:10:02 2023
    On 6 Jan 2023, at 00:05, Alexey Sokolov <alexey+gentoo@asokolov.org> wrote:

    06.01.2023 00:03, Anna пишет:
    On 2023-01-05 23:55, alexey+gentoo@asokolov.org wrote:
    From: Alexey Sokolov <alexey+gentoo@asokolov.org>

    if [[ ${?} -ne 0 ]]; then
    - die "Tests failed with ${EPYTHON}"
    + die -n "Tests failed with ${EPYTHON}"
    I don't think "nonfatal" should be used with tests. Any valid use cases
    for that?

    src_test() {
    virtx distutils-r1_src_test
    }

    If the test fails with "die", Xvfb keeps running forever; but it's cleaned up correctly with die -n


    Rationale should be mentioned in the commit message. Could you put it in?

    -----BEGIN PGP SIGNATURE-----

    iNUEARYKAH0WIQQlpruI3Zt2TGtVQcJzhAn1IN+RkAUCY7dmuV8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MAAKCRBzhAn1IN+R kMCXAP91NVmA/aUAYw38KV8LZ7spTygUbd4A3M/VF8n8yH9hXgD/Viiwm0wHhgZV 5anuJdJ7fqz6JE0U4g1xaKyIx1RY9wY=
    =pMYf
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)