-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fixes of Broken CI #27
Conversation
cb30ff0
to
9d962a3
Compare
Most of the test cases i have refactored and they are running successfully.
in both methods we have difference of spaces that's why test cases are failing on this.
Edited I'm adding new test cases for
|
You have modified the spaces in |
For now i have modify the the main.html to pass the test cases (to write new test cases and match 100% code coverage report), without modifying the main.html the spaces error is ouurcing. |
I've just tested I suggest you modify |
f009122
to
441a154
Compare
Thanks, I have done the changes in
can you please help me out from these error so i can move forward to right more new test cases for library and searcher. |
I cannot compile the test on my computer :
|
these are the
Edited |
088cf82
to
c5bf83a
Compare
Bookmark wrapper can be created using two ways: - From a existing (cpp) bookmark (done internally by Library wrapper code) - As a totally new one (empty) the java code will have to setup (using `set*` methods). If the `Bookmark` constructor always create an empty new cpp bookmark, when we set the wrapper to point to the existing bookmark, we will have a leak of the new created bookmark. As we want to keep the "basic" constructor as the normal java api to create an empty bookmark, we need another (private) constructor to avoid the construction of an empty bookmark. The new constructor take a handle and directly set the `nativeHandle`. On `Library.getBookmarks` we cannot use the helper `BUILD_WRAPPER` and we must use "internal" function to use the `(J)V` constructor instead of the basic `()V`.
@MohitMaliFtechiz I have fixed the cpp wrapping (as far as testing points to broken cpp). However, I have tests failing about wrong indentation in expected html. I let you fix that. |
… this commit i have removed that extra spaces to pass test cases
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #27 +/- ##
=======================================
Coverage ? 38.20%
Complexity ? 15
=======================================
Files ? 24
Lines ? 89
Branches ? 6
=======================================
Hits ? 34
Misses ? 51
Partials ? 4 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
I'm in favour of merging this ASAP. extending testing and code coverage can be done in furthet PRs. |
@kelson42 Ok, I have create a ticket for adding more new test cases for latest wrapper #29 . @mgautierfr can you please review this PR. |
@mgautierfr , have you find something on these error? |
@MohitMaliDeveloper Why do we have a green CI if there an error? Please move everything which is not mandatory and still NOK to #30. This PR has to be ready to review = perfect. |
@kelson42 , we haven't included the failing test cases in this PR for writing new test cases we commented that part of code.
Okay, I'm removing the commented code from here and moving these test cases to #30 . |
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.
Few things to change on the code itself.
More generally, we have to test the wrapper. Meanning we have to run all functions and check they are not broken. Testing the behavior (returned values) of such functions is nice but it is not what we want to test. The behavior of libkiwix is tested in libkiwix side.
The same way, you have fixed existing tests to make it pass with the new api. But it would be better to fully adapt the tests to the new api and not being stuck with the old logic.
(And see my answers to the discussion in the PR comments)
SHARED | ||
${PROJECT_SOURCE_DIR}/../main/cpp/libkiwix/book.cpp | ||
${PROJECT_SOURCE_DIR}/../main/cpp/libkiwix/bookmark.cpp | ||
${PROJECT_SOURCE_DIR}/../main/cpp/libkiwix/filter.cpp | ||
${PROJECT_SOURCE_DIR}/../main/cpp/libkiwix/illustration.cpp | ||
${PROJECT_SOURCE_DIR}/../main/cpp/libkiwix/kiwixicu.cpp | ||
${PROJECT_SOURCE_DIR}/../main/cpp/libkiwix/kiwixserver.cpp | ||
${PROJECT_SOURCE_DIR}/../main/cpp/libkiwix/library.cpp | ||
${PROJECT_SOURCE_DIR}/../main/cpp/libkiwix/manager.cpp | ||
${PROJECT_SOURCE_DIR}/../main/cpp/libzim/archive.cpp | ||
${PROJECT_SOURCE_DIR}/../main/cpp/libzim/blob.cpp | ||
${PROJECT_SOURCE_DIR}/../main/cpp/libzim/entry.cpp | ||
${PROJECT_SOURCE_DIR}/../main/cpp/libzim/entry_iterator.cpp | ||
${PROJECT_SOURCE_DIR}/../main/cpp/libzim/item.cpp | ||
${PROJECT_SOURCE_DIR}/../main/cpp/libzim/query.cpp | ||
${PROJECT_SOURCE_DIR}/../main/cpp/libzim/search.cpp | ||
${PROJECT_SOURCE_DIR}/../main/cpp/libzim/search_iterator.cpp | ||
${PROJECT_SOURCE_DIR}/../main/cpp/libzim/searcher.cpp | ||
${PROJECT_SOURCE_DIR}/../main/cpp/libzim/suggestion_item.cpp | ||
${PROJECT_SOURCE_DIR}/../main/cpp/libzim/suggestion_iterator.cpp | ||
${PROJECT_SOURCE_DIR}/../main/cpp/libzim/suggestion_search.cpp | ||
${PROJECT_SOURCE_DIR}/../main/cpp/libzim/suggestion_searcher.cpp | ||
${PROJECT_SOURCE_DIR}/../main/cpp/utils.h |
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.
Tests should not recompile the wrapper.
It should use the already compiled wrapper (with build
target) as kiwix-android will use it.
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.
We are not running test cases on android architecture its linux variant upon which test needs to run .
I have fixed all cpp errors I can found by running the test on my computer (and the CI). As @kelson42 said, the tests must NOT pass if there is error. This is the purpose of tests. However, I agree with @kelson42, if this pr is good enough to have tests running (and it is), we can merge it right now and fix things later. |
Let me conclude what i understood by your comment , We have to test the wrapper changes functionality on android side so after building the wrapper , we have compile kiwix-android replace the .aar file and run the test as we are running it for android by this way we can ensure wrapper is working fine. let me know if this is making sense. |
Not exactly. |
We have merged this PR as it is technically working. But few things still have to be improved. I have open the issue #31 for that. |
Since, We have changed the folder structure, generated files destination to build folder. That's why CI is failing on testing.
Reader, Searcher
in latest libkiwix, so in this PR we have refactored the test cases as well according to the latest libkiwix.