-
Notifications
You must be signed in to change notification settings - Fork 247
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
Fixing return of incorrect subprocess #3562
Conversation
Nice work! |
Hi @philbucher, we plan to integrate support for mpi, but honestly I don't see it done before christmas |
ok thx |
kratos/python_scripts/run_tests.py
Outdated
@@ -42,7 +40,7 @@ def GetModulePath(module): | |||
|
|||
''' | |||
|
|||
return imp.find_module(module)[1] | |||
return os.path.dirname(KtsMp.__file__) |
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.
This is no longer general I'd say => GetModulePath
should now be named GetKratosMultiphysicsPath
Just to say that it works for me and now reports correctly an error in subprocess |
will this be merged this year? |
@roigcarlo I used the new functions from #3738 Also I noticed that if there is an error in one of the python-tests, running of all tests is aborted! (unrelated to what I changed) |
@philbucher Agree with the changes. Also, the premature exit is caused in one of the changes I introduced in this PR, but honestly I don't remember if it was our intention or a bug, because its even stated that the program should exit. But I find it odd too This is the change: if self.exitCode != 0:
# If thread terminated with an error, propagate and terminate
sys.exit(self.exitCode) Let me speak with @pooyan-dadvand before reverting it |
Hi @philbucher, I spoke with @pooyan-dadvand and he agreed to let the other tests continue, I will change it this afternoon |
ping |
ping :) |
I assume that the ping is for @roigcarlo |
indeed it is :) |
Give me one sec |
…physics/Kratos into ci/fixing-error-code
Done |
Thanks @roigcarlo I am testing it now |
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.
works again, thx!
This fixes the run tests script not returning any error code while failing to execute a subprocess due to the command being invalid. Additionally I added to return an error if the subprocess can be initiated but the command fails due to wrong number of arguments (which should never happen)
I also fixed a warning with the imp lib being deprecated. This should increase compatibility with python 2.x and 3.3 or lower.
Finally, now all executions timed or not, go through the same pipeline to prevent future errors like this.