runtests.sh 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 by
  22. # build/envsetup.sh to the bash shell environment.
  23. echo "+ mmma -j32 $ANDROID_BUILD_TOP/system/connectivity/wificond"
  24. make -j32 -C $ANDROID_BUILD_TOP -f build/core/main.mk \
  25. MODULES-IN-system-connectivity-wificond \
  26. MODULES-IN-frameworks-opt-net-wifi-libwifi_system
  27. set -x # print commands
  28. adb wait-for-device
  29. adb root
  30. adb wait-for-device
  31. # 'disable-verity' will appear in 'adb remount' output if
  32. # dm-verity is enabled and needs to be disabled.
  33. if adb remount | grep 'disable-verity'; then
  34. adb disable-verity
  35. adb reboot
  36. adb wait-for-device
  37. adb root
  38. adb wait-for-device
  39. adb remount
  40. fi
  41. adb sync
  42. adb shell /data/nativetest/wificond_unit_test/wificond_unit_test
  43. adb shell /data/nativetest64/wificond_unit_test/wificond_unit_test
  44. # NOTE Integration tests are temporarily disabled until we hook up vendor
  45. # HAL to wificond for reloading driver/firmware.
  46. #adb shell /data/nativetest/wificond_integration_test/wificond_integration_test
  47. #adb shell /data/nativetest64/wificond_integration_test/wificond_integration_test