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

Use resinsightdaily in test_ri_wellmod #671

Merged
merged 1 commit into from
Mar 5, 2024
Merged

Conversation

andreas-el
Copy link
Contributor

@andreas-el andreas-el commented Feb 27, 2024

Update:

Tests succeed when executed on both tgx-nodes and GitHub-local-runners*.

  • Tested on linapp-1217 (f_komodo), on others they currently get skipped due to missing resinsight. This is a know issue.

Skipping three failing tests when run on GitHub online runners (as executed by Subscript).
#676


Subscript tests fails/skips currently on:

SKIPPED [1] tests/test_ri_wellmod.py:271: No dev-version of ResInsight available

This is due to the path set in the test.

Update:
When running this test with the --ri_dev option set, we encounter a new problem;

(rhel8-bleed-env + bleeding-py38-rhel8) [andrli@st-linapp1218 subscript]$ /project/res/bin/resinsightdaily
/project/res/bin/resinsightdaily: line 5: lsb_release: command not found
/project/res/bin/resinsightdaily: line 11: [: -eq: unary operator expected
/project/res/bin/resinsightdaily: line 14: [: -eq: unary operator expected

ResInsight unsupported for Linux version

See proposed change underneath; (#671 (comment))

👍 All ri_wellmod tests pass now when running on tgx-nodes

@andreas-el
Copy link
Contributor Author

andreas-el commented Feb 28, 2024

#!/bin/bash
#
# Variables MODIFY for new version!
#RH_VER=`cat /etc/redhat-release | awk '{print $7}' | cut -d. -f1`
RH_VER=`lsb_release -r | awk '{print $2}' | cut -d. -f1`

ECHO="/bin/echo"
CP="/bin/cp"
RI_HOME="/prog/ResInsight"

if [ $RH_VER -eq 7 ]
then
   INSTALL_DIR="/project/res/x86_64_RH_7/share/resinsight/cs_dev_py38"
elif [ $RH_VER -eq 8 ]
then
   INSTALL_DIR="/project/res/x86_64_RH_7/share/resinsight/cs_dev_py38"
else
   $ECHO ""
   $ECHO "ResInsight unsupported for Linux version $RH_VER"
   exit 1
fi

lsb_release is not available on all platforms, can we replace this using uname -r ?

e.g.

if [[ $(uname -r) == *el7* ]] ; then
  echo "rhel7"
elif [[ $(uname -r) == *el8* ]] ; then
  echo "rhel8"
else
  echo "unsupported"
fi

edit: This has now been resolved in the aforementioned script. 👍

@andreas-el andreas-el self-assigned this Feb 28, 2024
Copy link
Collaborator

@alifbe alifbe left a comment

Choose a reason for hiding this comment

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

@andreas-el

I propose to remove this line as well. I think it's related to your PR

pytestmark = pytest.mark.xfail()

@andreas-el andreas-el force-pushed the update_resinsight_path branch 3 times, most recently from 424f814 to 1d90a2c Compare March 4, 2024 15:19
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 95.91837% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 86.48%. Comparing base (289e48d) to head (5987053).
Report is 5 commits behind head on main.

❗ Current head 5987053 differs from pull request most recent head 4558ed5. Consider uploading reports for the commit 4558ed5 to get more accurate results

Files Patch % Lines
src/subscript/casegen_upcars/model.py 75.00% 1 Missing ⚠️
src/subscript/params2csv/params2csv.py 97.67% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #671      +/-   ##
==========================================
+ Coverage   86.26%   86.48%   +0.21%     
==========================================
  Files          50       50              
  Lines        6991     7008      +17     
==========================================
+ Hits         6031     6061      +30     
+ Misses        960      947      -13     

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

@andreas-el andreas-el force-pushed the update_resinsight_path branch 2 times, most recently from 8bb99a1 to a331a5a Compare March 4, 2024 16:10
Remove xfail pytestmark
Skip tests failing online on github runners

These tests were all marked as xfail before, and they still fail due to either
resinsight or lack of drogon/reek data.
@andreas-el andreas-el force-pushed the update_resinsight_path branch from a331a5a to 0dc1684 Compare March 4, 2024 16:25
@andreas-el
Copy link
Contributor Author

When removing the XFAIL mark for pytest, three ri_wellmod tests fail when run on the GitHub online runners.
The same tests succeed when run on tgx or linapp nodes.
Ref. #676

@andreas-el andreas-el requested a review from alifbe March 5, 2024 08:35
Copy link
Collaborator

@alifbe alifbe left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@andreas-el andreas-el merged commit 98679e6 into main Mar 5, 2024
6 checks passed
@andreas-el andreas-el deleted the update_resinsight_path branch March 5, 2024 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants