-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add posix tests (waiting for lsb_vsx port merge) #126
base: master
Are you sure you want to change the base?
Conversation
1cdcd0d
to
5f8d4b9
Compare
5f8d4b9
to
1241441
Compare
1241441
to
7682eef
Compare
db28779
to
914851e
Compare
914851e
to
2483a3a
Compare
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.
I just took a look at the Python code, not a full review.
test_name = [] | ||
test_status = Status.OK | ||
|
||
NAME = r'(.+?)Execute(.+?)T\.(?P<name>.+?)\r+\n' |
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.
Use one type of quotation mark in strings.
We mostly use black to format python code, which defaults to double quotation marks for strings. Basic use of tool is black -l 120 file_to_format.py
NAME = r'(.+?)Execute(.+?)T\.(?P<name>.+?)\r+\n' | |
NAME = r"(.+?)Execute(.+?)T\.(?P<name>.+?)\r+\n" |
if (line.find("IC") != -1 or line.find("TP") != -1 or line.find("TC") != -1 or line.find("Execute") != -1): | ||
continue |
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.
I think it could be simplified.
Maybe something like this:
if (line.find("IC") != -1 or line.find("TP") != -1 or line.find("TC") != -1 or line.find("Execute") != -1): | |
continue | |
if any(keyword in line for keyword in ["IC", "TP", "TC", "Execute"]): | |
continue |
Also parentheses are not necessary with if
if (line.find("IC") != -1 or line.find("TP") != -1 or line.find("TC") != -1 or line.find("Execute") != -1): | |
continue | |
if line.find("IC") != -1 or line.find("TP") != -1 or line.find("TC") != -1 or line.find("Execute") != -1: | |
continue |
result = Result(name=test_name, status=Status.FAIL) | ||
result.status = Status.FAIL |
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.
Why repeat code?
result = Result(name=test_name, status=Status.FAIL) | |
result.status = Status.FAIL | |
result = Result(name=test_name, status=Status.FAIL) | |
result = Result(name=test_name, status=Status.FAIL) | ||
result.status = Status.FAIL | ||
|
||
if (line.find("can't acquire exclusive lock") != -1): |
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.
Can be simplified
For example:
if (line.find("can't acquire exclusive lock") != -1): | |
if "can't acquire exclusive lock" in line: |
|
||
if (line.find("can't acquire exclusive lock") != -1): | ||
result.msg = '\t\t' + "can't acquire exclusive lock\n" | ||
elif (line.find("can't exec") != -1): |
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.
elif (line.find("can't exec") != -1): | |
elif "can't exec" in line: |
- name: T.tmpfile | ||
execute: lsb_vsx_posix T.tmpfile | ||
- name: T.tmpnam | ||
ignore: True |
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.
If you know reasons for ignoring the test or if it is connected to the reported issue on github, you can leave a comment to provide information about that.
Description
Add program to execute posix test suite
Motivation and Context
Types of changes
How Has This Been Tested?
Checklist:
Special treatment