Initial commit
This commit is contained in:
23
docs/tests/Build.md
Normal file
23
docs/tests/Build.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Build
|
||||
There are a variety of aspects to building the SDK and demo app. Although much of this ends up being tested automatically by the CI server, understanding these step can help when troubleshooting build issues. These test cases provide sanity checks that the build is not broken.
|
||||
|
||||
# Build
|
||||
1. Run the assemble Gradle task, e.g. `./gradlew assemble`
|
||||
1. Verify the build completes successfully
|
||||
|
||||
# Build tests
|
||||
1. Run the assembleAndroidTest Gradle task, e.g. `./gradlew assembleAndroidTest`
|
||||
1. Verify the build completes successfully
|
||||
|
||||
# Publishing
|
||||
1. Run the task `./gradlew publishToMavenLocal`
|
||||
1. Open the `~/.m2` directory and look for the newly published artifact
|
||||
1. Verify the coordinate are correct, e.g. `cash/z/ecc/android/zcash-android-sdk`
|
||||
1. Verify the version is correct, matching the version set in `gradle.properties`
|
||||
1. Verify the file size looks correct—the AAR should be on the order of 9 megabytes, which indicates that the native libraries have been bundled in
|
||||
|
||||
# Clean builds
|
||||
_To have a clean build, both the local Gradle outputs as well as the Rust outputs need to be deleted. The Rust outputs are stored in the directory `sdk-lib/targets`. The `clean` task has been modified to delete the folder `sdk-lib/targets` if it exists._
|
||||
1. Run the clean Gradle task, e.g. `./gradlew clean`
|
||||
1. Run the assemble Gradle task, forcing the Gradle build cache to be ignored, e.g. `./gradlew assemble --rerun-tasks`. _Note that `--rerun-tasks` also causes the cache under `~/.gradle/` to be ignored_
|
||||
1. Verify that the build completes successfully
|
||||
31
docs/tests/Darkside.md
Normal file
31
docs/tests/Darkside.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Running Darksidewalletd tests
|
||||
Some tests are executed against a fake version of the Zcash network, by running a localhost lightwalletd server in a special mode called "darkside". This is different from the Zcash test network, which is a publicly accessible and deployed network that acts more like a staging network before changes are pushed to the production network.
|
||||
|
||||
The module [darkside-test-lib](../../darkside-test-lib) contains a test suite that requires manually launching a localhost lightwalletd instance in darkside mode.
|
||||
|
||||
To run these tests
|
||||
|
||||
1. clone [lightwalletd](https://github.com/zcash/lightwalletd.git)
|
||||
`git clone https://github.com/zcash/lightwalletd.git`
|
||||
1. Install Go.
|
||||
1. If you're using homebrew
|
||||
```` zsh
|
||||
brew install go
|
||||
````
|
||||
1. Inside the `lightwalletd` checkout, compile lightwalletd
|
||||
```` zsh
|
||||
make
|
||||
````
|
||||
|
||||
1. Inside the `lightwalletd` checkout, run the program in _darkside_ mode
|
||||
```` zsh
|
||||
./lightwalletd --log-file /dev/stdout --darkside-very-insecure --darkside-timeout 1000 --gen-cert-very-insecure --data-dir . --no-tls-very-insecure
|
||||
````
|
||||
1. Launch an Android emulator. Darkside tests are configured to only run on an Android emulator, as this makes it easy to automate finding the localhost server running on the same computer that's also running the emulator.
|
||||
1. Run the Android test suite
|
||||
1. From the command line
|
||||
```` zsh
|
||||
./gradlew :darkside-test-lib:connectedAndroidTest
|
||||
````
|
||||
1. From Android Studio
|
||||
1. Choose the run configuration `:darkside-test-lib:connectedAndroidTest`
|
||||
31
docs/tests/Public APIs.md
Normal file
31
docs/tests/Public APIs.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Public APIs
|
||||
The SDK has a variety of public APIs that should be kept stable for SDK consumers, unless an explicit decision is made to introduce a breaking API change. To reduce the introduction of incompatible changes, these test cases covers how to verify our own apps don't break.
|
||||
|
||||
# Compile Compatibility
|
||||
1. Publish the SDK to mavenLocal
|
||||
1. Bump the SDK version in [gradle.properties](../../gradle.properties)
|
||||
1. Navigate to the root of the SDK checkout
|
||||
1. Run the Gradle task `./gradlew publishToMavenLocal`
|
||||
1. Modify the wallet app to build against the new SDK
|
||||
1. Check out the [Zcash Android Wallet](https://github.com/zcash/zcash-android-wallet)
|
||||
1. Modify settings.gradle to additionally include `mavenLocal()` in the `dependencyResolutionManagement` block
|
||||
1. Modify [Dependencies.kt](https://github.com/zcash/zcash-android-wallet/blob/master/buildSrc/src/main/java/cash/z/ecc/android/Dependencies.kt) to use the new SDK version defined in the first step
|
||||
1. Navigate to the root of the wallet app checkout
|
||||
1. Build the wallet app and unit tests with the task `./gradlew assembleAndroidTest`
|
||||
1. Verify the build completes successfully
|
||||
|
||||
# Upgrade Compatibility
|
||||
1. Install the wallet app using the old SDK
|
||||
1. Ensure that no version of the Android wallet is currently installed on your test Android device or emulator
|
||||
1. Build the unmodified version of the wallet app
|
||||
1. Run the wallet app and create a new wallet
|
||||
1. Publish the SDK to mavenLocal
|
||||
1. Bump the SDK version in [gradle.properties](../../gradle.properties)
|
||||
1. Navigate to the root of the SDK checkout
|
||||
1. Run the Gradle task `./gradlew publishToMavenLocal`
|
||||
1. Modify the wallet app to build against the new SDK
|
||||
1. Check out the [Zcash Android Wallet](https://github.com/zcash/zcash-android-wallet)
|
||||
1. Modify settings.gradle to additionally include `mavenLocal()` in the `dependencyResolutionManagement` block
|
||||
1. Modify [Dependencies.kt](https://github.com/zcash/zcash-android-wallet/blob/master/buildSrc/src/main/java/cash/z/ecc/android/Dependencies.kt) to use the new SDK version defined in the first step
|
||||
1. Install the wallet app using the new SDK
|
||||
1. Verify that the wallet behaves correctly (it should not act as if it is starting fresh; user data persisted by the old version of the SDK should still be present after SDK upgrade)
|
||||
Reference in New Issue
Block a user