-
-
Notifications
You must be signed in to change notification settings - Fork 363
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
Refactor of rz-test to use thread safe functions. #4506
Conversation
13b5f75
to
2d42ead
Compare
2d42ead
to
c9b7302
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.
Nice cleanup/modernization!
rz-bindgen
returns error:
[1/7] Generating bindgen_outputs with a custom command
FAILED: rizin.i
/usr/bin/python3 ../src/main.py -o . --clang-path /usr/lib/llvm-14/lib --clang-args ' -resource-dir="/usr/lib/llvm-14/lib/clang/14.0.0"' --rizin-include-path /usr/include/librz --targets SWIG
Traceback (most recent call last):
File "/home/runner/work/rizin/rizin/rz-bindgen/build/../src/main.py", line 51, in <module>
bindings.run()
File "/home/runner/work/rizin/rizin/rz-bindgen/src/bindings.py", line 43, in run
builders = [HeaderBuilder(name) for name in threaded_headers]
File "/home/runner/work/rizin/rizin/rz-bindgen/src/bindings.py", line 43, in <listcomp>
builders = [HeaderBuilder(name) for name in threaded_headers]
File "/home/runner/work/rizin/rizin/rz-bindgen/src/cparser_header.py", line 101, in __init__
assert os.path.exists(filename)
AssertionError
[2/7] Generating plugin/swig_runtime with a custom command
The macOS unit test error is now clearer, nice:
>> MALLOC_PERTURB_=178 /private/var/folders/bc/yvvw2g2s4jlg9r8x7tf61xv800009d/T/woodpecker-local-2757858299/workspace/build/test/unit/test_core_task
――――――――――――――――――――――――――――――――――――― ✀ ―――――――――――――――――――――――――――――――――――――
Hello
this
is
the
main
task!
test_core_task ERR
[XX] Fail at line 44: fcn result: expected 1337, 0
1337, 1
1337, 2
1337, 3
1337, 4
, got (null).
test_core_task_finished_cb ERR
[XX] Fail at line 73: task joined: expected true, got false
The unit tests fails are unrelated to this PR. check dev |
I know they are unrelated, I thought the error improved after this one, but it apparently happended in dev already. So yes, ignore that part of the comment. |
I think having overall count is useful though, could you please also add a column with all tests ran? Also maybe a final report, how many OK, BR, XX are at the end total? |
c9b7302
to
7cef717
Compare
i have removed it by mistake. i changed the code and now it prints it. |
The issue with Bindgen is unrelated to this 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.
There is still room for improvement, e.g. make all XX red in the output if not zero, BR - yellow if not zero, etc. But this is for separate 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.
A running total would be nice -- I generally use it to see how far the build has progressed through the tests. Not sure whether it's strictly necessary, or how to integrate that info in a clean manner.
The running total is printed at the end when
|
do not squash
Your checklist for this pull request
Detailed description
This uses the thread-safe functions and cleans up a bit the rz-test code.
Now we automatically detect the core number and use them all unless
-j <n>
is specified.