blob: 2867cd37feeefe3b4d7784f2f1e3c7bf328061e5 [file] [log] [blame]
diegoperezc21b6702020-07-15 10:23:51 +01001#!/bin/bash
2
3# Script that builds androidx SNAPSHOT and runs the androidx integration
4# tests from the Studio branch.
5
6set -e
7
8readonly SCRIPT_PATH="$(dirname $(realpath "$0"))"
9readonly BASE_PATH="$(realpath "$SCRIPT_PATH/../../..")"
10readonly PREBUILTS_DIR="$BASE_PATH/prebuilts"
11readonly OUT_DIR="$BASE_PATH/out"
12readonly BAZEL_CMD="$BASE_PATH/tools/base/bazel/bazel"
13readonly M2REPO_DIR="$PREBUILTS_DIR/tools/common/androidx-integration/m2repository"
14readonly ANDROIDX_INTERNAL_DIR="$PREBUILTS_DIR/androidx/internal"
15
16echo "Using basepath $BASE_PATH"
17
18echo "Starting $0 at $(date)"
19
Jeff Gastonab4bb4d2020-08-31 11:25:06 -040020$SCRIPT_PATH/androidx_snapshot.sh
diegoperezc21b6702020-07-15 10:23:51 +010021
22mkdir -p $M2REPO_DIR
23# Copy internal and the output to prebuilts/tools/common/androidx-integration
24cp -R $ANDROIDX_INTERNAL_DIR/* $M2REPO_DIR
Diego Perez322e13f2020-08-21 12:29:27 +010025unzip -quo $OUT_DIR/dist/top-of-tree-m2repository-all-*.zip -d $M2REPO_DIR/..
diegoperezc21b6702020-07-15 10:23:51 +010026
Diego Perez322e13f2020-08-21 12:29:27 +010027$BAZEL_CMD test //tools/adt/idea/androidx-integration-tests:intellij.android.androidx-integration-tests
diegoperezc21b6702020-07-15 10:23:51 +010028
29echo "Completing $0 at $(date)"
30