-
Notifications
You must be signed in to change notification settings - Fork 13
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
Modelica in different directory management added #122
base: master
Are you sure you want to change the base?
Modelica in different directory management added #122
Conversation
test.py
Outdated
if isWin: | ||
modelicaLibpath = ';' + os.path.normpath(os.path.join(os.environ.get('APPDATA'), '.openmodelica', 'libraries')).replace('\\','/') | ||
else: | ||
modelicaLibpath = ':' + os.path.normpath(os.path.join(os.environ.get('APPDATA'), '.openmodelica', 'libraries')).replace('\\','/') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure APPDATA
is defined on non-Windows machines?
Same below, if applicable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, maybe I've made a mistake and in the non Win os the APPDATA
must be replaced with HOME
, as done to set the librariespath
variable.
I'll update the PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, you did not observe DRY/duplicated code, so the same thing happens in another place in the PR, hence my remark "Same below": https://github.com/OpenModelica/OpenModelicaLibraryTesting/pull/122/files#diff-f7c50a89e57f8fd5080d06d65e93480d1c23010919e4c42d72563090c7865414R37, which you did not update just now AFAICT.
I'm actually confused how this worked correctly in the first place -- is this tested by CI, or you locally on a Linux and Windows machine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Cristopher, you are right... I forgot that the same code has been added also to the testmodel.py
script. I'll update the PR.
Unfortunately I've not a linux machine to test the script locally in this moment (I've to build a VM to do this ... it is in my stack...) so I test on WIN 11 only. For the test under linux I use the CI (I understood that all the PR are tested by the CI under Linux...).
This pull request checks if the Modelica libraries are reachable from the given libraries path, if not then the Modelica libraries path is get from the system and added to the MODELICAPATH.