Skip to content

Commit

Permalink
Make it easier to test multiple packages at once
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsmith committed Dec 7, 2023
1 parent 83a8f23 commit e43f5fc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ The following builds and tests can take a long time, and it's helpful to paralle
as much as possible. So after each build, copy the APK out of the build directory and
install it while running the next build. This is why we test the slowest devices first.

Temporarily edit pkgtest/app/build.gradle to replace the empty list in the `addPackages`
line with `PACKAGE_GROUPS[1]`.
Temporarily edit pkgtest/app/build.gradle to call
`addPackages(delegate, PACKAGE_GROUPS[1])`.

Set `abiFilters` to each of the following values (this tests the single-ABI case), and
test on a corresponding device:
Expand Down
2 changes: 1 addition & 1 deletion server/pypi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ examples: usually we base them on the package's own tutorial.
Open the pkgtest app in Android Studio, and temporarily edit `app/build.gradle` as
follows:

* Add the package to the `addPackages` line, e.g. `addPackages(delegate, ["package-name"])`.
* Set `PACKAGES` to the package's name.
* Set `python { version }` to the Python version you want to test.
* Set the `--extra-index-url` as described above.
* Set `abiFilters` to the ABIs you want to test.
Expand Down
8 changes: 7 additions & 1 deletion server/pypi/pkgtest/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,13 @@ android {
def verParsed = versionName.split(/\./).collect { Integer.parseInt(it) }
versionCode ((verParsed[0] * 1000000) + (verParsed[1] * 1000) + (verParsed[2] * 10))

addPackages(delegate, [])
// To test packages, edit the following line to list their names, separated by
// spaces. Each name must be a subdirectory of PACKAGES_DIR.
def PACKAGES = ""
if (!PACKAGES.isEmpty()) {
addPackages(delegate, PACKAGES.trim().split(/\s+/).toList())
}

python {
version "3.8"

Expand Down

0 comments on commit e43f5fc

Please sign in to comment.