Skip to content

Conversation

@jacwah
Copy link
Contributor

@jacwah jacwah commented Mar 4, 2022

I am writing a test suite using Reframe for a project with the following structure (simplified):

src/
data/
configure
reframe/checks.py

The project is built using Autotools.

At first I simply set sourcesdir = '..', but this did not work well in practice since copying the whole source tree for each build can be quite expensive. Especially on a file system with limited quota.

With the change in this PR, I am able to do an out of source build without copying the entire source tree:

self.build_system.configuredir = os.path.join(self.prefix, '..')

Using this method, the build output is generated in the stage directory while the source files are read from the original source directory.

Please let me know what you think!

@jenkins-cscs
Copy link
Collaborator

Can I test this patch?

@codecov-commenter
Copy link

codecov-commenter commented Mar 4, 2022

Codecov Report

Merging #2460 (4b14bc3) into master (cd07b81) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #2460   +/-   ##
=======================================
  Coverage   85.70%   85.71%           
=======================================
  Files          57       57           
  Lines       10545    10546    +1     
=======================================
+ Hits         9038     9039    +1     
  Misses       1507     1507           
Impacted Files Coverage Δ
reframe/core/buildsystems.py 96.21% <100.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cd07b81...4b14bc3. Read the comment docs.

Copy link
Contributor

@vkarak vkarak left a comment

Choose a reason for hiding this comment

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

Hi @jacwah thanks for your PR. I think it makes sense. Generally, to avoid copying large input files, you should also consider using the readonly_files test attribute.

@pep8speaks
Copy link

pep8speaks commented Mar 29, 2022

Hello @jacwah, Thank you for updating!

Cheers! There are no PEP8 issues in this Pull Request!Do see the ReFrame Coding Style Guide

Comment last updated at 2022-03-29 15:17:20 UTC

@vkarak vkarak added this to the ReFrame Sprint 22.03.2 milestone Mar 29, 2022
@vkarak vkarak changed the title [feat] Add configuredir variable to the Autotools buildsystem [feat] Add configuredir variable to the Autotools build system Mar 29, 2022
@vkarak vkarak merged commit e07b494 into reframe-hpc:master Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants