-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to Run Tests document needs amater-friendly updates #283
Comments
I think this is the crucial line. You probably don't have |
|
Oh, then it's probably |
Those are installed already, too.
|
Here's some more:
|
My reproducer on a minimal CentOS Stream 8 machine: # dnf module enable ruby:2.7 -y
# dnf install ruby-devel rubygems-devel rubygem-bundler rubygem-rake gcc gcc-c++ make git -y
# git clone https://github.com/voxpupuli/puppet-systemd
# cd puppet-systemd
# bundle install That fails on
The crucial bit is |
Still no luck. I started up a fedora:latest docker container and it seems to perform better than any Red Hat image. However, I can't get past the linting stage with Fedora. The vospupuli docs make this look like it should be pretty hands-off to run the tests but that's not my experience so far. |
The "ignoring" part may be relevant, and can point at a broken bundler path. Where things are installed with Rubygems is honestly speaking very poor. I'd even consider it broken by default. https://github.com/voxpupuli/modulesync_config/blob/master/moduleroot/.github/CONTRIBUTING.md.erb is a bit more complete (and https://github.com/voxpupuli/puppet-example/blob/master/.github/CONTRIBUTING.md is the rendered version). It recommends setting a bundler path. That works, but is less efficient if you have multiple modules since you can't reuse gems between repositories. Instead, I have this in my # https://github.com/rubygems/rubygems/issues/4031
# https://bugzilla.redhat.com/show_bug.cgi?id=1574594
if command -v ruby > /dev/null ; then
GEM_HOME="$(ruby -e 'print Gem.user_dir')"
export GEM_HOME
fi |
So far no luck. Even a brand-new Ubuntu container is failing. |
Trying fresh, starting a container with Then:
This works for me, so I wonder where the failure is for you. |
So the export GEM_HOME must be the trick. I was able to run 'bundle exec rake release_checks' and all kinds of stuff just wizzed by on my screen with a successful exit code. Thank you so much for your help. Shouldn't the documentation be updated to reflect these (Centos/RHEL8) steps so that others can benefit? |
I was able to get RHEL7 to run all of the spec tests with a combination of the following:
Documentation on how to use the Red Hat Software Collections is found here, however a Red Hat subscription is required to view the document. I think this is most useful for people like me who have nearly zero experience with ruby/spec testing and it would be a great addition to the test suite documentation. |
I'm beginning my journey with voxpupulii and am trying to run tests on a self-hosted RHEL 8 server.
The how to run tests procedure makes all kinds of assumptions regarding the state of the testing machine.
On a basic RHEL 8 server, I had to install:
just to be able to run "bundle install". Unfortunately, the 'bundle install' command failed a few seconds into its run with some not-so-helpful error messages:
and
The file ' /tmp/bundler20230321-30083-1k34vfjnio4r-2.5.8/extensions/x86_64-linux/2.5.0/nio4r-2.5.8/mkmf.log
' doesn't even exist and of course, I'm not blaming the documentation for bundle's terrible feedback. The error, 'You have to install development tools first.' implies to me that gcc and/or gcc++ needs to be installed.
It would be great of the documentation would describe the packages required in order to achieve a successful 'bundle install' run on various operating systems.
I'm not sure how I can help contribute to the updated documentation other than to keep trying 'bundle install' until I have the minimum packages installed on my system and then provide a pull request.
The text was updated successfully, but these errors were encountered: