run_cuj_tests.sh 524 B

12345678910111213141516171819202122232425262728
  1. #!/bin/bash -e
  2. readonly UNAME="$(uname)"
  3. case "$UNAME" in
  4. Linux)
  5. readonly OS='linux'
  6. ;;
  7. Darwin)
  8. readonly OS='darwin'
  9. ;;
  10. *)
  11. echo "Unsupported OS '$UNAME'"
  12. exit 1
  13. ;;
  14. esac
  15. readonly ANDROID_TOP="$(cd $(dirname $0)/../../..; pwd)"
  16. cd "$ANDROID_TOP"
  17. export OUT_DIR="${OUT_DIR:-out}"
  18. build/soong/soong_ui.bash --make-mode "${OUT_DIR}/host/${OS}-x86/bin/cuj_tests"
  19. "${OUT_DIR}/host/${OS}-x86/bin/cuj_tests" || true
  20. if [ -n "${DIST_DIR}" ]; then
  21. cp -r "${OUT_DIR}/cuj_tests/logs" "${DIST_DIR}"
  22. fi