Skip to content
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

Fix SimpleCov integration #933

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Fix SimpleCov integration #933

wants to merge 4 commits into from

Conversation

mvz
Copy link
Contributor

@mvz mvz commented Jun 2, 2024

Summary

Activates simplecov on nested processes. It works, but makes the tests very slow. Based on #898 but with a more minimal change.

This should probably be hidden behind an environment variable.

Details

  • Fix simplecov setup for cucumber features
  • Switch formatters for child process to avoid unwanted output
  • Remove unused SimpleCov Formatter monkey-patch

Motivation and Context

PR #898 is stale.

How Has This Been Tested?

I ran cukes. It looks like it tries to calculate coverage for files in tmp/, and maybe even loads simplecov inside the aruba-test-cli and other test executables.

Types of changes

  • Internal change (refactoring, test improvements, developer experience or update of dependencies)

Checklist:

  • I've added tests for my code
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

mvz added 3 commits June 2, 2024 09:22
The way Aruba's environment manipulation currently works, when running
code or child processes in a nested environment, the priority of how the
environment variables are set is like this:

  1. Variables set with Aruba's environment manipulation methods
  2. Variables set in ENV when Aruba's environment manipulation object
     (aruba.environment) was initialized
  3. Variables set in ENV after aruba.environment was initialized

I'm not convinced the order of 2. and 3. is the right order, but due to
this order, setting RUBYOPT directly on ENV had no effect because there
was already a variable RUBYOPT set at the point of initializion of
aruba.environment.

By using the environment manipulation methods, the values set here will
take first priority regardless of whether the variables were set
earlier.
@mvz mvz added the on-hold This issue is waiting for something else to happen first. label Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on-hold This issue is waiting for something else to happen first.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant