Commit graph

28 commits

Author SHA1 Message Date
Kostiantyn Syrykh e587305308 Update iOS codesign options 2021-03-17 21:46:55 +02:00
Kostiantyn Syrykh 1a3fb61b37
Allow setting custom p4a URL instead of fork (#1305)
* Allow setting custom p4a URL instead of fork

* Apply suggestions from code review

Co-authored-by: Pol Canelles <canellestudi@gmail.com>

* Add tests for p4a clone URL

Co-authored-by: Pol Canelles <canellestudi@gmail.com>
2021-03-14 10:47:27 +01:00
Joril d27020fe4e Add android.backup_rules parameter to buildozer.spec 2020-10-02 10:21:17 +02:00
Eero af Heurlin 7b35b3d030
Add option for controlling p4a distutils support, fixes #1224 (#1225)
* Add option for controlling p4a distutils support, refs #1224

* note that .toml needs to be in included extensions if using pyprojet.toml

* Add the default --ignore-setup-py flag to test
2020-09-13 17:25:14 +02:00
Jorilx 7bf9f39709
Fix issue #881: Add android.allow_backup parameter to buildozer.spec (#1206)
* Add android.allow_backup parameter to buildozer.spec
* Rework patch to only use --allow-backup when it is set to false
* Added testcase for android.allow_backup
* Added default value for android.allow_backup to spec
2020-08-14 15:35:13 +02:00
Andre Miras a9fc2fce61 Increases ios target test coverage
This is a follow-up for #1160 and #1168.
Addresses the following:
- grows `buildozer/targets/ios.py` target coverage from 24% to 56%
- fixes `AttributeError` on `TargetIos` error call

Next up should be improving:
- code signing process (toggle off not fully integrated)
- actual deployment (not yet tested)
- further increase `buildozer/targets/ios.py` test coverage
2020-06-25 07:42:42 +02:00
Andre Miras ece5748982 Unit test ios target
- basic ios target test
- refactors existing android test for code sharing
- changes `call_build_package()` to simple function

Grows `buildozer/targets/ios.py` coverage from 11% to 24%.
This setups the canvas for more tests to come later.
2020-06-24 18:07:34 +02:00
Andre Miras 435d6a21eb ⬆️ Migrates to Command line tools
The SDK Tools package is deprecated and no longer receiving updates:
https://developer.android.com/studio/releases/sdk-tools
Also drops the "tools" package install as it's considered obsolete.

Migrates to command line tools:
https://developer.android.com/studio#cmdline-tools
https://developer.android.com/studio/command-line

Makes it possible to use both OpenJDK 8 and more recent versions.
Tested successfully in Arch with OpenJDK 10.
2020-05-31 12:06:20 +02:00
Andre Miras 5dcc879bfb Tests android.numeric_version config
Follow-up for #1126
2020-05-30 00:47:18 +02:00
pavelsof 5b541de4d8 Refactored the TargetAndroid tests. 2020-05-28 18:36:52 +02:00
Andre Miras 10a2fb9848 🗑️ Removes Python 2 constructions
- Drops Python 2 imports
- Drops `if IS_PY3` constructions
- Drops `object` inheritance
- Drops `__future__` imports
- Drops `mocks` dependency
- Uses Python 3 `super()`
2020-05-18 23:09:51 +02:00
Andre Miras 891e24b6f2 Also tests against macOS platform
Increases coverage from 28% to 30%.
2020-04-25 18:21:10 +02:00
Andre Miras 757941aabb Unit tests TargetAndroid.build_package()
Increases android.py coverage from 24% to 36% and total coverage from
25% to 29%.
Note that this tests would have caught the glob issue reported in #1044.
2020-04-13 21:27:13 +02:00
Andre Miras 5f35e8b409 F841: local variable is assigned to but never used 2020-04-13 17:38:32 +02:00
Andre Miras 0c4116c469 Starts unit testing buildozer/targets/android.py
This is a best effort approach trying to increase the coverage of that
module. Therefore some tests are not completely isolating all
dependencies via `mock.patch`-ing.
Subsequent pull request could cover more methods and focus on edge case.
This increases the overall coverage from 20% to 25% and
`buildozer/targets/android.py` coverage from 15% to `24%`.
2020-04-10 21:12:52 +02:00
Andre Miras 8e56f880ce Fixes test_p4a_recommended_android_ndk_found() mocking
Mocking `for line in open()` should be done via `StringIO`.
Also uses `pytest` in `tox.ini` so assert errors are more verbose.
2019-10-05 15:01:18 +02:00
Alexander Taylor 9fcf28ba44 Code improvements around NDK download (#961)
* Cleaned up some variable references
* Improved how user build dir is accessed
* Minor code style improvements
* Fixed dist_dir calculation following p4a changes
2019-10-05 13:34:49 +02:00
opacam 8dd22bd4d4 [p4a] Add ability to get p4a's recommended android's NDK version
Only if the p4a version used has the file `pythonforandroid/recommendations.py`, which contains the info we want, otherwise we will return the buildozer's one
2019-08-24 11:45:10 +02:00
Andre Miras 11b733cbd9 Unit test unicode decode on command output, fixes #857
Also fixes stderr/stdout writing refs #743.
2019-05-28 22:32:10 +02:00
Alexander Taylor 81b6ac51a3
Merge pull request #860 from robertpro/master
Download Apache ANT at the same path as the buildozer.spec android.ant_path option
2019-05-26 14:03:48 +01:00
Andre Miras 586152c6ce Exits with error code on build exception, fixes #674 2019-04-17 22:25:30 +02:00
José Roberto Meza Cabrera 5540f84452 Added Android ANT path test 2019-03-17 19:05:55 -06:00
Andre Miras 5cde0b0f92 Changes default log level to debug (2)
Helps with troubleshooting and error reporting.
Also closes #824
2019-03-12 20:04:13 +01:00
Andre Miras 831d85a5e0 Handles unknown command/target error gracefully, closes #812
Running `buildozer unknown_command` should show a meaningful error and
exit. Fixes regression introduced in 4936d31 and adds unit tests.

Also updates other tests `assert` keyword rather than `self.assert*` in
order to keep style consistent.

Last, minor `Dockerfile` documentation update as per recent @tshirtman
feedback.
2019-03-12 19:31:46 +01:00
Andre Miras 9c137b06a7 Unit test logger
- adds test utils methods
- checks default log level
- sets log level via spec file
- checks messages printing depending on level
2019-02-17 18:10:18 +01:00
Andre Miras 0d22e60e2e Unit tests buildozer --help command, refs #813
This test should fail due to #813. Next commit will fix it.
2019-02-08 18:53:34 +01:00
Andre Miras 27d8880411 Unit tests read spec file, refs #793 2019-01-21 18:55:48 +01:00
Andre Miras 58faefa243 Introduces CI and tox testing, fixes #679
- run setup.py on both Python2 and Python3
- runs simple test case for both Python2 and Python3
- checks the PEP8 style
- updates README.md adds Travis badge
2019-01-16 23:16:29 +01:00