Closed xvrc closed 3 years ago
Yes you were right, the CI Python needed to be bumped to Python 3 as well. Thanks for the fixes!
I'm not sure if it would be better to fix this on the command itself (in the CMake script), or just handle it in the LIT configuration.
I think the LIT config is the best place. The LIT substitution system is kind of hacky anyway.
When I went to run the tests, my console was flooded with Python stack traces during the snapshot tests from an error stating that
unified_diff
expects strings. It turns out that the (new?) default behaviour ofsubprocess.check_output
is to return abytes
object instead of a string. Then, even if the contents were equal, the objects would always be different when compared, which would then lead to the badunified_diff
call.I also added a fix for executing tests from a build folder that contains spaces. I'm not sure if it would be better to fix this on the command itself (in the CMake script), or just handle it in the LIT configuration.
As a side note, I noticed the GitHub workflow file sets up Python 2.7. Shouldn't it be bumped up to Python 3? (I was running the tests using Python 3.10 btw)