-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
How to test kiwix-lib/kiwix-android integration ? #346
Comments
@mgautierfr could you please have a look at this? I've been stuck on this for a week |
What is you system ? It will not fix the issue, but if you what a library for android, you must use the following command to build kiwix-lib for android : |
@Aditya-Sood this is already the case, you should not have to use kiwix-build.
really I should just delete kiwixlib folder (I'll make a ticket) from the android project but the important line is this |
This is bit more than bleeding edge versions. This is custom version. |
I view this as much like a release of a new api. In previous roles an api update had to go through testing/review on another project and go through ci before viable to be pushed to staging (here snapshot) while my integration branch of the app was updated based on the given spec and tested with mocked responses and would await a staging release. It is not the quickest but is good process. That was a much more senior team thought, I am not sure of Aditya's experience with kiwixlib and how complex the changes are. A suite of unit tests would really give confidence here. For now Aditya can run the command you suggested |
What you say is totally exact. An API update should got through a CI build/testing before being push as new release/snapshot. But while I'm developing (fix bug or changing api), I want to be able to test my new lib version without passing through a CI. The command I give will only build kiwix-lib for the correct android arch. But (s)he will have to test kiwix-android with this library. I don't know what the best way to do it with gradle but it seems necessary to be able to locally build an apk with a locally build library without having to push the lib somewhere on a server. |
If we can produce kiwixlib with the There should be no necessity for the android project to build kiwixlib itself |
Well, if you do this ( |
Yeah, I have yet to make the ticket and now it seems pointless. If we have no way of assuring ourselves of the functionality of kiwix-lib outside of integrating it with kiwix-android then there is no other way |
Or your build task can ouput the |
Yes work with the |
Xpost: |
I've just recreate an issue for the original issue (very few things have been discuss about it here). |
After more thought my proposal is now: |
I have read the comments and discuss a bit with @mgautierfr and @mhutti1. They are a few things I want to avoid:
I believe that assuming that we can release libkiwix without testing integration in kiwix-android is not the most optimal approach. So, I think I quite disagree with @macgills here, if I have understand him well. Here is how I propose to solve that problem:
I'm also quite in favour of publishing, through libkiwix CI, all new git master HEAD of libkiwix to a bintray dev version. That way anybody could use a cutting edge version of the libkiwix without having to compile the libkiwix himself. This would be complementary of what I have proposed earlier. This is the purpose of #345 and I also support it, but not as main solution to solve this ticket. |
After discussing with @mhutti1, it looks like we can share the location of the |
Is it possible to build an aar without an application project though? |
Yes, an aar is built for a library module so that is no problem.
I am of the opinion that each project should be capable of validation independent of another project. This would speed up development I believe. I may be unaware of the types of errors that occur during integration but I think this solution should cover them |
@macgills Quite agree with your comment. I have created https://github.com/kiwix/kiwix-lib/issues/249 as an attempt to automated test the |
I'm using ubuntu 18.04, and my phone is moto g5s+ (uses snapdragon 625, which is arm afaik)
But wouldn't this use the kiwix-lib in its |
So essentially I build kiwix-lib for my platform and then replace the |
@Aditya-Sood that is the current solution yes. |
@Aditya-Sood My steps: Implement the gradle changes in: kiwix/kiwix-android#1348 Build kiwix lib using kiwix-build. Changes the files in SOURCE/kiwix-lib and recompile and re sync to get the new changes. |
Building kiwix-lib works for android_arm (failing for android because of:
Also, for the link command: |
I am not sure about the crash. @mgautierfr might know more. |
@mhutti1 I think it's just |
It is not just kiwix-lib. It is definitely the command I told you. If you just build kiwix-lib you won't build any of the android wrapper. |
Running the command that you specified gives this error:
Maybe it's one of the other choices? |
Are you sure you have the latest version of kiwix-build. It 100% works for me. You must not have followed a step in the instructions. Have you done My targets are: |
So |
Make sure to use the --upgrade and --user flags as needed. |
I'll run it again |
@mhutti1 so I got the following error with pip:
Resolved by using pip3 instead:
Followed the other steps in the readme, still getting the same error (about kiwix-lib-app not being a valid choice) |
Is it possible that kiwix-build needs python3 and is using python (2) instead? I think my system uses 2 internally, while I downloaded 3 later |
What does |
Sorry for the trouble, I copied the lines for execution wrong (was using python instead of python3) I'm now getting a: |
@mhutti1 @macgills Please write the documentation corresponding to kiwix/kiwix-android#1348 in Kiwix-Andoird CONTRIBUTING.md. No building "magic" without proper developer documentation. I want also to close that PR as this PR has solved it. If @Aditya-Sood can not compile the libkiwix with kiwix-build, I would like a proper dedicated ticket. |
@kelson42 I had most probably caused the problem myself by copying one of the commands incorrectly, and I didn't pay attention to the new issue @mgautierfr had created to help me out - I'll ask for help on the new issue in case I face problems. Thanks a lot |
Documentation is kiwix/kiwix-android#1313 |
@Aditya-Sood @macgills I think we should/close that ticket as the situation is now clear and solution is documented. Do you? |
@kelson42 @macgills just one query: when you add the local, updated kiwix-lib repo in the So should I add a line somewhere saying that the kiwix-lib branch with the changes should be merged into master before copying it into |
@Aditya-Sood The problem you report is not already reported in another ticket of this repo? |
@Aditya-Sood The scenario you commented about is a bug in kiwix-build, see for example #378. This should not be documented. This should be fixed. |
@kelson42 my problem was slightly different in the sense that I didn't want it to checkout the master branch (like it does right now, based on this comment), instead I wanted it to use the currently checked out non-master branch on which I had made the changes. I got around this by temporarily merging my changes to the local master and then copying the repository (so that when the master was checked out during building of kiwix-lib, it already had the updated code). So I was thinking it might be useful to mention somewhere in the readme that the changes to kiwix-lib need to be merged into master before copying the local kiwix-lib repository to the SOURCE directory of kiwix-build. |
@Aditya-Sood I have created a ticket #395 |
Thanks! I'll give a gist of the problem there |
I'm working on fixing kiwix/kiwix-android/#765 for which I had to compile kiwix-lib into the app, which I was told required using kiwix-build
During setup, upon running
kiwix-build kiwix-lib -v
, I obtained the following output:The entire output of the command is here
There was a
test libzim : run command 'meson test --verbose -t 8'
line in the middle of that output, running which gave this error:I'm guessing this is related to the timeout bit in #188
I am basically looking for a way to test the changes I have made to kiwix-lib (commit) & kiwix-android (commit)
Any help is much appreciated!
The text was updated successfully, but these errors were encountered: