Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

224.fre make compile test #295

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open

224.fre make compile test #295

wants to merge 25 commits into from

Conversation

singhd789
Copy link
Collaborator

Describe your changes

Issue ticket number and link (if applicable)

Checklist before requesting a review

  • I ran my code
  • I tried to make my code readable
  • I tried to comment my code
  • I wrote a new test, if applicable
  • I wrote new instructions/documentation, if applicable
  • I ran pytest and inspected it's output
  • I ran pylint and attempted to implement some of it's feedback

@singhd789 singhd789 requested a review from rem1776 December 26, 2024 17:43
@singhd789 singhd789 marked this pull request as ready for review December 26, 2024 17:43
Copy link
Contributor

@kiihne-noaa kiihne-noaa 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 to me! We discussed a number of these changes last week.

@singhd789 singhd789 requested a review from Ciheim December 26, 2024 17:56
@singhd789 singhd789 requested a review from ilaflott January 7, 2025 22:13
# Check for creation of compile script
# Check for FMS directory
# Check for log.compile file
assert [Path(f"{OUT}/fremake_canopy/test/null_model_full/{plat}-{targ}/exec/compile.sh").exists(),
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should probably also check for the executable file too, the other files might still be there if it failed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for this catch! You're 100% right

Copy link
Collaborator Author

@singhd789 singhd789 Jan 8, 2025

Choose a reason for hiding this comment

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

So I can't actually run the full compile here because it needs the checked out source code and the makefile (which are not made in this test). I can change the test name though to something more informative like "test_compile_execution_logfile_creation" or something (b/c even though the compile fails, the test passes since those paths are there)

Or, I can include that path check for the executable but mark the test as fail.

Thoughts?

Copy link
Collaborator Author

@singhd789 singhd789 Jan 8, 2025

Choose a reason for hiding this comment

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

Ok, I suppose my first though there might be covered by def test_bad_target_compilelog():

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Update: I forgot I can just set an assert equal to False

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.

3 participants