Skip to content

test: replace tar alias with shell function for macOS compatibility#85

Merged
kgiusti merged 1 commit intocontainers:mainfrom
rmiki-dev:macos-system-test
May 6, 2026
Merged

test: replace tar alias with shell function for macOS compatibility#85
kgiusti merged 1 commit intocontainers:mainfrom
rmiki-dev:macos-system-test

Conversation

@rmiki-dev
Copy link
Copy Markdown
Collaborator

@rmiki-dev rmiki-dev commented Apr 29, 2026

With the tar alias failing on previous macOS runs, this PR replaces it with the tar() shell function defined in use_gnu_tar_if_available() which uses gtar instead of tar if available.

The previous alias tar=gtar did not propagate inside the create_tar() function, causing it to use BSD tar instead of the required GNU tar.

Closes #83

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.19%. Comparing base (afb00d4) to head (de91302).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #85      +/-   ##
==========================================
+ Coverage   72.87%   79.19%   +6.31%     
==========================================
  Files          10       10              
  Lines        1412     1115     -297     
==========================================
- Hits         1029      883     -146     
+ Misses        271      134     -137     
+ Partials      112       98      -14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates tests/utils.sh to replace the tar alias with a shell function when gtar is available. The review feedback suggests removing the export -f command to avoid unnecessary environment pollution and Bash-specific extensions, as the function is already available within the sourced script's context.

Comment thread tests/utils.sh
Signed-off-by: Rosy-Glorious Miki <rmiki@redhat.com>
Copy link
Copy Markdown
Collaborator

@djach7 djach7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kgiusti kgiusti merged commit 3a306a0 into containers:main May 6, 2026
12 of 14 checks passed
@rmiki-dev rmiki-dev deleted the macos-system-test branch May 6, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System tests for MacOS compatibility

3 participants