env.sh (1543B)
1 # Source this before driving the POS simulator. 2 # 3 # Everything volatile lives under POS_SIM_ROOT: the AVDs, the emulator's own 4 # state, the episode artifacts and the coverage dumps. On tripwire that is a 5 # tmpfs, because the root filesystem is shared with several other projects and 6 # is full; an AVD's data partition is sparse, so a worker costs a few GB of 7 # the box's 251 GB of RAM and nothing on disk. Nothing here needs to survive a 8 # reboot: the code is in git and the findings are copied out as they are made. 9 export POS_SIM_ROOT=${POS_SIM_ROOT:-/tmp/taler-pos-sim} 10 export ANDROID_SDK_ROOT=${ANDROID_SDK_ROOT:-/opt/android-sdk} 11 export ANDROID_HOME=$ANDROID_SDK_ROOT 12 export ANDROID_AVD_HOME=$POS_SIM_ROOT/avd 13 # The emulator otherwise scatters snapshots and crash reports through $HOME. 14 export ANDROID_EMULATOR_HOME=$POS_SIM_ROOT/emulator-home 15 export ANDROID_PREFS_ROOT=$POS_SIM_ROOT/emulator-home 16 # The emulator console ports this harness owns. The wallet simulator uses 17 # 5554 upwards; sharing them means whichever harness starts second attaches to 18 # the other's emulators instead of booting its own. 19 export POS_PORT_BASE=${POS_PORT_BASE:-5584} 20 export POS_ADB=$ANDROID_SDK_ROOT/platform-tools/adb 21 export POS_WALLET_CLI=${POS_WALLET_CLI:-$(command -v taler-wallet-cli || echo /root/.local/bin/taler-wallet-cli)} 22 export POS_WALLET_DIR=$POS_SIM_ROOT/run/wallets 23 export PATH=$ANDROID_SDK_ROOT/platform-tools:$PATH 24 mkdir -p "$ANDROID_AVD_HOME" "$ANDROID_EMULATOR_HOME" "$POS_SIM_ROOT/run" \ 25 "$POS_SIM_ROOT/out" "$POS_WALLET_DIR"