Skip to content

Conversation

@omlins
Copy link
Contributor

@omlins omlins commented Sep 18, 2018

Includes the migration of the current_run variable to the class RuntimeContext and related changes.
Closes #403.

@omlins omlins added this to the Upcoming sprint milestone Sep 18, 2018
@omlins omlins self-assigned this Sep 18, 2018
@omlins omlins requested a review from vkarak September 18, 2018 12:27
@vkarak vkarak changed the title [feat] Store the results of retries in separate folders to avoid loosing information [feat] Store the results of retries in separate folders to avoid losing information Sep 18, 2018
@vkarak vkarak changed the title [feat] Store the results of retries in separate folders to avoid losing information [feat] Use different stage and output directories for different retries of the same test Sep 19, 2018
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.

Looks good, except for some refinement of the API. I don't like very much the current_run as a public name. See my suggestion.

self.timestamp)
else:
return os.path.join(self.outputdir, self.timestamp)
return os.path.join(os.path.normpath(self.outputdir) +
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you need to normalize the path here? The outputdir and stagedir are automatically converted to absolute paths, thus they are already normalized.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did not realize that is already guaranteed that self.outputdir and self.stagedir are normalized. I will remove it then.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

self.assertEqual(1, stats.num_failures())

# Retries tests are executed in a different runtime as they modify
# the global rt.runtime().current_run what makes subsequent tests fail
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment is not very accurate. You should say that the policy tests need a freshly initialized runtime, that's why we need to switch before every test.

@vkarak
Copy link
Contributor

vkarak commented Sep 19, 2018

Another thing is to augment the unit tests to check that the directory suffixes are created as expected.

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.

lgtm.

:type: `integer`
"""
# Not publicly documented
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment is not actually needed.

@codecov-io
Copy link

codecov-io commented Sep 20, 2018

Codecov Report

Merging #464 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #464      +/-   ##
==========================================
+ Coverage   91.34%   91.36%   +0.01%     
==========================================
  Files          70       70              
  Lines        8784     8790       +6     
==========================================
+ Hits         8024     8031       +7     
+ Misses        760      759       -1
Impacted Files Coverage Δ
reframe/frontend/executors/__init__.py 98.06% <100%> (+0.44%) ⬆️
unittests/test_policies.py 99.09% <100%> (ø) ⬆️
reframe/frontend/statistics.py 72.22% <100%> (-0.39%) ⬇️
reframe/core/runtime.py 87.87% <100%> (+0.78%) ⬆️

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 d59bb78...8950d8f. Read the comment docs.

@vkarak vkarak merged commit 686f0c0 into reframe-hpc:master Sep 20, 2018
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.

3 participants