fix 'Failure/Error: expect(out.chomp).to eq('true')' in riscv64 for Bundler/gem analysis. #193
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
There is a problem with the test code of the ruby-pycall 1.5.2-4 package. The package builds failed under the riscv64 and goes well under x86-64 architectures. According to the log output, the signature test file reported an error when entering the test phase.
ruby-pycall-1.5.2-4-riscv64-check.log
My operating environment is the riscv64 environment virtual machine of the arch architecture of Windows WSL.
The process is as follows:
Patch
I modified the test file. Here are my ideas for modification:
This is the relevant code for the command line truncation error in /spec/pycall_spec.rb
The test expects the output to be 'true', but the actual output includes an extra line Resolving dependencies...
This means that PyCall.init prints some extra information while initializing, such as "resolving dependencies" or loading libraries. On the specific architecture of riscv64, it may add some extra logging output.
To fix this, the assertion in the test can be adjusted to not strictly require every part of the output, but only focus on the last line of the output. This can be achieved by modifying the
expect(out.chomp).to eq('true')
statement in the test to ensure that the test only focuses on the last line of output.expect(out.lines.last.chomp).to eq('true')
Do you think this is a good change?