diegoperez | c21b670 | 2020-07-15 10:23:51 +0100 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # Script that builds androidx SNAPSHOT and runs the androidx integration |
| 4 | # tests from the Studio branch. |
| 5 | |
| 6 | set -e |
| 7 | |
| 8 | readonly SCRIPT_PATH="$(dirname $(realpath "$0"))" |
| 9 | readonly BASE_PATH="$(realpath "$SCRIPT_PATH/../../..")" |
| 10 | readonly PREBUILTS_DIR="$BASE_PATH/prebuilts" |
| 11 | readonly OUT_DIR="$BASE_PATH/out" |
| 12 | readonly BAZEL_CMD="$BASE_PATH/tools/base/bazel/bazel" |
| 13 | readonly M2REPO_DIR="$PREBUILTS_DIR/tools/common/androidx-integration/m2repository" |
| 14 | readonly ANDROIDX_INTERNAL_DIR="$PREBUILTS_DIR/androidx/internal" |
| 15 | |
| 16 | echo "Using basepath $BASE_PATH" |
| 17 | |
| 18 | echo "Starting $0 at $(date)" |
| 19 | |
Jeff Gaston | ab4bb4d | 2020-08-31 11:25:06 -0400 | [diff] [blame] | 20 | $SCRIPT_PATH/androidx_snapshot.sh |
diegoperez | c21b670 | 2020-07-15 10:23:51 +0100 | [diff] [blame] | 21 | |
| 22 | mkdir -p $M2REPO_DIR |
| 23 | # Copy internal and the output to prebuilts/tools/common/androidx-integration |
| 24 | cp -R $ANDROIDX_INTERNAL_DIR/* $M2REPO_DIR |
Diego Perez | 322e13f | 2020-08-21 12:29:27 +0100 | [diff] [blame] | 25 | unzip -quo $OUT_DIR/dist/top-of-tree-m2repository-all-*.zip -d $M2REPO_DIR/.. |
diegoperez | c21b670 | 2020-07-15 10:23:51 +0100 | [diff] [blame] | 26 | |
Diego Perez | 322e13f | 2020-08-21 12:29:27 +0100 | [diff] [blame] | 27 | $BAZEL_CMD test //tools/adt/idea/androidx-integration-tests:intellij.android.androidx-integration-tests |
diegoperez | c21b670 | 2020-07-15 10:23:51 +0100 | [diff] [blame] | 28 | |
| 29 | echo "Completing $0 at $(date)" |
| 30 | |