#38 Ensure that test failures are not hidden
Merged 2 years ago by ksurma. Opened 2 years ago by psss.
rpms/ psss/pipenv shell-options  into  rawhide

file modified
+5
@@ -18,6 +18,7 @@ 

  

  /smoke2:

      test: |

+         set -eux

          mkdir two

          cd two

          pipenv --two
@@ -28,6 +29,7 @@ 

  

  /smoke3:

      test: |

+         set -eux

          mkdir three

          cd three

          pipenv --three
@@ -40,6 +42,7 @@ 

  # As imports are discovered, pipenv uses requests to check the proper case of package names on PyPI

  /pipreqs:

      test: |

+         set -eux

          mkdir pipreqstest

          cd pipreqstest

          pipenv --three
@@ -51,6 +54,7 @@ 

  # This test doesn't work in container, run in virtual machine.

  /shellingham:

      test: |

+         set -eux

          mkdir shelltest

          cd shelltest

          pipenv --completion
@@ -59,6 +63,7 @@ 

  # When there is a .env file in the project directory, pipenv uses dotenv to set the environment variables from it.

  /dotenv:

      test: |

+         set -eux

          mkdir dotenvtest

          cd dotenvtest

          echo "HELLO=WORLD" > .env

Currently only the last command's exit code is checked which results in cd .. masking actual failures.

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

Currently only the last command's exit code is checked...

Wow. That was completely unexpected. Is there some room for improvement, or is this behavior set in stone?

On more related note, thanks for the PR. This gets the job done and I see the CI failed. I suspect the uncovered issue started to happen with the Python 3.10 upgrade.

@ksurma Could you please inspect the actual failure?

@psss, thank you looking into it. Is there a way to set set -eux somehow globally? Or could have been the tests better designed?
It actually occurred to me recently, it'd be handy for debug, but I didn't expect the current setup would invalidate the whole test result.

@churchyard, on it. Also think Python 3.10 will be the deciding factor here.

The issue seems to be hidden in the update of urllib3. The patch that imported needed functions from ssl was deleted and the upstream version imports from _implementation.py that was removed in the install phase of the build. I guess restoring the _implementation.py file should solve the problem, unless there are strong reasons why we shouldn't ship it.

python-urrlib3 fix is prepared in its repository, the changes here are valid, I'm merging the PR.

Pull-Request has been merged by ksurma

2 years ago

@psss, thank you looking into it. Is there a way to set set -eux somehow globally? Or could have been the tests better designed?

Well, these multi-line strings are just executed as shell scripts, together with the fact that only the last command's exit code is checked. We could possibly consider to enable exit code checking by default, but the question is if this would not surprise other users. Let's discuss the best way to address this in the issue I've just filed.

Metadata