JuliaTesting / Aqua.jl

Auto QUality Assurance for Julia packages
MIT License
339 stars 25 forks source link

Fix environments in `test_persistent_tasks` #240

Closed lgoettgens closed 11 months ago

lgoettgens commented 11 months ago

On the CI testing setup of AbstractAlgebra.jl, I got the following error in the sub-process of test_persistent_tasks. (log)

ERROR: ArgumentError: Package Pkg not found in current path.
- Run `import Pkg; Pkg.add("Pkg")` to install the Pkg package.

After some digging around, I found that LOAD_PATH was just ["@", "/tmp/jl_yzJAOE"] there, so that's the reason why Pkg could not be found. The easiest (and only) solution I could find, was to clear the ENV of the sub-process explicitly to allow a default value for LOAD_PATH to populate (see https://docs.julialang.org/en/v1/manual/environment-variables/#JULIA_LOAD_PATH).

Furthermore, this PR allows errors in the sub-process to show up in the stderr of the main process.

codecov[bot] commented 11 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (0f04e76) 76.24% compared to head (0e439ea) 76.27%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #240 +/- ## ========================================== + Coverage 76.24% 76.27% +0.03% ========================================== Files 11 11 Lines 783 784 +1 ========================================== + Hits 597 598 +1 Misses 186 186 ``` | [Flag](https://app.codecov.io/gh/JuliaTesting/Aqua.jl/pull/240/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaTesting) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/JuliaTesting/Aqua.jl/pull/240/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaTesting) | `76.27% <100.00%> (+0.03%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaTesting#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.