runtests.sh 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/usr/bin/env bash
  2. # Copyright (C) 2016 The Android Open Source Project
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. if [ -z $ANDROID_BUILD_TOP ]; then
  16. echo "You need to source and lunch before you can use this script"
  17. exit 1
  18. fi
  19. echo "Running tests"
  20. set -e # fail early
  21. # NOTE We can't actually run these commands, since they rely on functions added
  22. # by build/envsetup.sh to the bash shell environment.
  23. echo "+ mmma $ANDROID_BUILD_TOP/system/tools/aidl"
  24. $ANDROID_BUILD_TOP/build/soong/soong_ui.bash --make-mode \
  25. MODULES-IN-system-tools-aidl
  26. set -x # print commands
  27. ${ANDROID_HOST_OUT}/nativetest64/aidl_unittests/aidl_unittests
  28. adb root
  29. adb wait-for-device
  30. adb remount
  31. adb sync
  32. adb install -r \
  33. ${ANDROID_PRODUCT_OUT}/system/app/aidl_test_services/aidl_test_services.apk
  34. ${ANDROID_BUILD_TOP}/system/tools/aidl/tests/integration-test.py