1 2# This utility generates .json files in 3# /tmp that match current AOSP build environment for testing. 4# These configs are used for cvd multi-vd testing. 5 6# Usage: 7# - First ensure you are within the same shell / 8# environment as a successful AOSP build.(or init 9# the environment via `lunch` in new shell) 10# - Then navigate to the folder: 11# cd /device/google/cuttlefish/host/cvd_test_configs/local_tests 12# - Run this script 13# ../../../tools/testing/gen_local_configs.sh 14 15if [[ -z "${ANDROID_PRODUCT_OUT}" ]] || [[ -z "${ANDROID_HOST_OUT}" ]]; then 16 echo "ANDROID_PRODUCT_OUT and ANDROID_HOST_OUT must be defined for this script to work. Did you run lunch?" 17 exit 1 18fi 19 20for fname in local_*.json 21do 22 sed -e "s=/tmp/vsoc_x86_64=$ANDROID_PRODUCT_OUT=;" -e "s=/tmp/linux-x86=$ANDROID_HOST_OUT=;" $fname > /tmp/$fname 23done 24