Android.mk 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # Copyright (C) 2018 The Android Open Source Project
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. #############################################
  15. # Launcher Robolectric test target. #
  16. #############################################
  17. LOCAL_PATH := $(call my-dir)
  18. include $(CLEAR_VARS)
  19. LOCAL_MODULE := LauncherRoboTests
  20. LOCAL_MODULE_CLASS := JAVA_LIBRARIES
  21. LOCAL_SDK_VERSION := system_current
  22. LOCAL_SRC_FILES := \
  23. $(call all-java-files-under, src) \
  24. $(call all-java-files-under, ../tests/src_common)
  25. LOCAL_STATIC_JAVA_LIBRARIES := \
  26. androidx.test.runner \
  27. androidx.test.rules \
  28. mockito-robolectric-prebuilt \
  29. truth-prebuilt
  30. LOCAL_JAVA_LIBRARIES := \
  31. platform-robolectric-4.3.1-prebuilt
  32. LOCAL_JAVA_RESOURCE_DIRS := resources config
  33. LOCAL_INSTRUMENTATION_FOR := Launcher3
  34. LOCAL_MODULE_TAGS := optional
  35. # Generate test_config.properties
  36. include external/robolectric-shadows/gen_test_config.mk
  37. include $(BUILD_STATIC_JAVA_LIBRARY)
  38. ############################################
  39. # Target to run the previous target. #
  40. ############################################
  41. include $(CLEAR_VARS)
  42. LOCAL_MODULE := RunLauncherRoboTests
  43. LOCAL_SDK_VERSION := system_current
  44. LOCAL_JAVA_LIBRARIES := LauncherRoboTests
  45. LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
  46. LOCAL_TEST_PACKAGE := Launcher3
  47. LOCAL_INSTRUMENT_SOURCE_DIRS := packages/apps/Launcher3/src
  48. LOCAL_ROBOTEST_TIMEOUT := 36000
  49. include prebuilts/misc/common/robolectric/4.3.1/run_robotests.mk