Skip to content

Comments

Git sparse checkout for sourcesdir#3629

Open
victorusu wants to merge 4 commits intoreframe-hpc:developfrom
victorusu:sparse_checkout
Open

Git sparse checkout for sourcesdir#3629
victorusu wants to merge 4 commits intoreframe-hpc:developfrom
victorusu:sparse_checkout

Conversation

@victorusu
Copy link
Contributor

This expands the sourcesdir syntax to include a dictionary format. In this case, the git url is passed via the url key.
Additional command options can be added via the opts key. This capability was previously available in the git_clone function, but not accessible to the sourcesdir git clone interface.

The git sparse-checkout path is available when one defines the files keys with a list of files to checkout.
In this case, instead of emitting a git clone ... command the framework will emit the following set of commands

git clone --no-checkout --depth=1 ...
git sparse-checkout set --no-cone ${file list}
git checkout

where, ${file list} is the list of files defined in the files list.

An example test is this.

@rfm.simple_test
class git_clone_test(rfm.CompileOnlyRegressionTest):
    sourcesdir = {
         'url': 'https://github.com/eth-cscs/alps-gh200-reproducers.git',
         'files' : ['intranode-pinned-host-comm'],
         'opts' : ['--no-optional-locks', '--no-advice', '--no-pager']
    }
    build_system = 'SingleSource'
    sourcepath = 'intranode-pinned-host-comm/intranode_pinned_host_comm.cpp'
    valid_systems = ['*']
    valid_prog_environs = ['*']

Please note that I haven't added any unit tests because the framework does not include any unit tests for the original git_clone function.

closes #3627

@codecov
Copy link

codecov bot commented Feb 23, 2026

Codecov Report

❌ Patch coverage is 46.15385% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.32%. Comparing base (62babc6) to head (ea7a888).
⚠️ Report is 53 commits behind head on develop.

Files with missing lines Patch % Lines
reframe/core/pipeline.py 46.15% 7 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3629      +/-   ##
===========================================
+ Coverage    91.25%   91.32%   +0.06%     
===========================================
  Files           62       62              
  Lines        13587    13532      -55     
===========================================
- Hits         12399    12358      -41     
+ Misses        1188     1174      -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.

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.

only clone a subdirectory of a git repo

1 participant