The ruby shared tests
  • Shell 94.3%
  • Ruby 5.7%
Find a file
Jun Aruga 4961106bd9 Remove .gitignore only managing Emacs editor's backup files.
You can manage such specific settings by core.excludesFile in the user’s
~/.gitconfig according to the following Git document.

https://git-scm.com/docs/gitignore

> Patterns which a user wants Git to ignore in all situations (e.g., backup or
> temporary files generated by the user’s editor of choice) generally go into
> a file specified by core.excludesFile in the user’s ~/.gitconfig. Its
> default value is $XDG_CONFIG_HOME/git/ignore. If $XDG_CONFIG_HOME is either
> not set or empty, $HOME/.config/git/ignore is used instead.

You can refer to .gitignore settings for editors on the following repository
including Emacs and Vim settings.

https://github.com/github/gitignore/tree/main/Global

* https://github.com/github/gitignore/blob/main/Global/Emacs.gitignore
* https://github.com/github/gitignore/blob/main/Global/Vim.gitignore
2026-04-16 13:48:49 +01:00
.fmf Add tmt plan to run modified tests 2022-11-30 11:11:32 +01:00
run-basic-rails-application run-basic-rails-application: Use Rails RPM to run Rails application server 2025-02-20 14:48:22 +01:00
Sanity/native-extension-gem-is-installed-without-error Disable native.../ruby31 on rhel-10 2024-08-06 18:21:43 +02:00
systemtap-static-probes-in-ruby Use TracePoint.new{} in Hash.new() example 2025-01-22 18:03:24 +01:00
tls-minimal-version tls-minimal-version: Fix incorrect component and require. 2025-02-20 16:52:05 +01:00
main.fmf Remove Makefile/PURPOSE file, add summary/description 2024-07-16 18:38:49 +02:00
plans.fmf Add a dummy plan and test to make CI pass on no tests selected. 2026-03-03 21:08:36 +00:00
README.md README.md: Align the description with the CentOS Stream README.md. 2026-02-25 18:51:25 +00:00

Ruby Fedora tests

This repository contains shared Fedora tests for the Ruby component.

Contributing

Testing

You can run the tests in your local environment.

Install tmt.

$ sudo dnf install tmt+all

Run the following command to run the tests for Fedora rawhide:

$ tmt -c distro=fedora-rawhide run --all provision -h virtual -i fedora-rawhide
/var/tmp/tmt/run-NNN
...

The tmt's provisioning method virtual (tmt run provision -h virtual) must be used, otherwise the tests fail due to known issues with container provisioning method (tmt run provision -h container). Also note the run-NNN printed on the output of the command. This represents the run ID used with tmt run --id option in later steps.

Run the following command to see the report, setting the value of the above run ID to the --id option. As this repository doesn't have tmt's plans to run the tests, we need to set the plans --default to use the default plans. See this tmt's document about the tmt run report options.

$ tmt run --id run-NNN report -vvv

Running a specific test

You can run a specific test.

List available tests.

$ tmt tests ls
/Sanity/native-extension-gem-is-installed-without-error/ruby25
/Sanity/native-extension-gem-is-installed-without-error/ruby26
/Sanity/native-extension-gem-is-installed-without-error/ruby27
/Sanity/native-extension-gem-is-installed-without-error/ruby30
/Sanity/native-extension-gem-is-installed-without-error/ruby31
/Sanity/native-extension-gem-is-installed-without-error/system
/run-basic-rails-application
/systemtap-static-probes-in-ruby

Run the following command to run a specific test with -n option to specify a regular expression to match the test name for Fedora rawhide:

$ tmt -c distro=fedora-rawhide run --all \
  provision -h virtual -i fedora-rawhide \
  tests -n '^/systemtap-static-probes-in-ruby$'

Testing with a rpms/ruby pull-request

Run a scratch build x86_64 on the branch used for the rpms/ruby pull-request that you want to test:

$ fedpkg --release rawhide scratch-build --srpm --arches x86_64

Run the following command with the above build's x86_64 task ID (not build ID) to download the RPM packages. Remove the SRPM file to keep only binary RPM files in the /path/to/packages directory to avoid an error on the later tmt command.

$ pwd
/path/to/packages
$ koji download-task TASK_ID
$ rm *.src.rpm

Run the following command to run the tests with the above RPM files.

$ tmt -c distro=fedora-rawhide run --all \
  prepare --insert --how install -D /path/to/packages \
  provision -h virtual -i fedora-rawhide

Sending pull-requests

Always send pull-requests rather than pushing the commits directly to avoid breaking CI.