zestsoftware / zest.releaser

Python software releasing made easy and repeatable
https://zestreleaser.readthedocs.io
GNU General Public License v2.0
198 stars 62 forks source link

tests fails with non-GNU ls #402

Closed mtelka closed 1 year ago

mtelka commented 1 year ago

Example of failure:

File "$(BUILD_DIR)/zest/releaser/tests/utils.txt", line 554, in utils.txt
Failed example:
    print(result)
Expected:
    RED ls...
Got:
    RED some-non-existing-file: No such file or directory

The root cause seems to be this:

$ /bin/ls /x
/x: No such file or directory
$ /usr/gnu/bin/ls /x
ls: cannot access '/x': No such file or directory
$

OS: OpenIndiana

reinout commented 1 year ago

Hey, that's a new one :-) We used to have problems with variations in output of git, svn, hg. I didn't expect one in ls.

The easiest way is probably to run the tests with docker (see https://zestreleaser.readthedocs.io/en/latest/developing.html ), that's useful to work around non-critical deviations like this.

Alternatively, the tests can probably be adjusted to expect RED ... No such file or directory, but using the docker is less work. I assume zest.releaser as such works OK on openindana?

mauritsvanrees commented 1 year ago

We also have test output normalisation. We could strip 'ls:' there.

reinout commented 1 year ago

That's also a possibility. But it also depends on how many differences there are. @mtelka, is it just "ls" or are there more differences?

mtelka commented 1 year ago

I'm packaging zest.releaser for OpenIndiana so running tests in docker is no way. I need to run tests in real and current environment to make sure the created package is okay.

There are more test failures than this one, but I need to analyze them deeper to find where problems really are. The ls output difference is just so obvious so I reported it.