release.sh 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. #!/bin/sh
  2. # Copyright 2019 Google LLC.
  3. # Use of this source code is governed by a BSD-style license that can be
  4. # found in the LICENSE file.
  5. cd "$(dirname "$0")/../.."
  6. set -e -x
  7. [ -f platform_tools/android/apps/skqp/src/main/assets/files.checksum ] || exit 1
  8. [ -f platform_tools/android/apps/skqp/src/main/assets/skqp/rendertests.txt ] || exit 1
  9. [ -f platform_tools/android/apps/skqp/src/main/assets/skqp/unittests.txt ] || exit 1
  10. python tools/skqp/gn_to_bp.py
  11. python tools/skqp/download_model
  12. python tools/skqp/setup_resources
  13. touch MODULE_LICENSE_BSD
  14. cat > platform_tools/android/apps/skqp/src/main/Android.mk <<- "EOM"
  15. # Copyright 2019 Google LLC.
  16. # Use of this source code is governed by a BSD-style license that can be
  17. # found in the LICENSE file.
  18. LOCAL_PATH:= $(call my-dir)
  19. include $(CLEAR_VARS)
  20. LOCAL_MODULE_TAGS := tests optional
  21. LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
  22. LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
  23. LOCAL_JAVA_LIBRARIES := android.test.runner.stubs
  24. LOCAL_JNI_SHARED_LIBRARIES := libskqp_app
  25. LOCAL_MULTILIB := both
  26. LOCAL_USE_AAPT2 := true
  27. LOCAL_STATIC_ANDROID_LIBRARIES := android-support-design
  28. LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner-axt
  29. LOCAL_SRC_FILES := $(call all-java-files-under, java)
  30. LOCAL_PACKAGE_NAME := CtsSkQPTestCases
  31. LOCAL_SDK_VERSION := test_current
  32. include $(BUILD_CTS_PACKAGE)
  33. EOM
  34. cat > include/config/SkUserConfigManual.h <<- "EOM"
  35. // Copyright 2019 Google LLC.
  36. // Use of this source code is governed by a BSD-style license that can be
  37. // found in the LICENSE file.
  38. #ifndef SkUserConfigManual_DEFINED
  39. #define SkUserConfigManual_DEFINED
  40. // DON'T DEFINE THINGS HERE AS IT WILL RESULT IN DIFFERENCES WITH
  41. // THE VERSION OF SKQP PUBLISHED ON SKIA.ORG
  42. #endif // SkUserConfigManual_DEFINED
  43. EOM
  44. cat > platform_tools/android/apps/skqp/src/main/AndroidTest.xml <<- "EOM"
  45. <?xml version="1.0" encoding="utf-8"?>
  46. <!--
  47. Copyright 2019 Google LLC.
  48. Use of this source code is governed by a BSD-style license that can be
  49. found in the LICENSE file.
  50. -->
  51. <configuration description="Config for CTS SkQP test cases">
  52. <option name="test-suite-tag" value="cts" />
  53. <option name="not-shardable" value="true" />
  54. <option name="config-descriptor:metadata" key="component" value="uitoolkit" />
  55. <option name="config-descriptor:metadata" key="parameter" value="not_instant_app" />
  56. <option name="config-descriptor:metadata" key="parameter" value="multi_abi" />
  57. <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
  58. <option name="cleanup-apks" value="true" />
  59. <option name="test-file-name" value="CtsSkQPTestCases.apk" />
  60. </target_preparer>
  61. <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
  62. <option name="package" value="org.skia.skqp" />
  63. <option name="runtime-hint" value="7m" />
  64. </test>
  65. </configuration>
  66. EOM
  67. [ -f platform_tools/android/apps/skqp/src/main/assets/.gitignore ] && \
  68. git rm platform_tools/android/apps/skqp/src/main/assets/.gitignore
  69. git add \
  70. Android.bp \
  71. MODULE_LICENSE_BSD \
  72. include/config/SkUserConfig.h \
  73. include/config/SkUserConfigManual.h \
  74. platform_tools/android/apps/skqp/src/main/Android.mk \
  75. platform_tools/android/apps/skqp/src/main/AndroidTest.xml \
  76. platform_tools/android/apps/skqp/src/main/assets