diff options
author | Eugene Susla <eugenesusla@google.com> | 2019-03-13 13:16:33 -0700 |
---|---|---|
committer | Eugene Susla <eugenesusla@google.com> | 2019-07-17 17:12:37 -0700 |
commit | 574b7e11d5f6bbc7f2947999104b3667aef0916d (patch) | |
tree | 2f38301999e72e91c4c331163e695de92abce121 /tests/Codegen/runTest.sh | |
parent | 59dc6124c842503d57d279b1f0139ae1302675f2 (diff) |
Codegen for parcelable/dataclass boilerplate
This is the initial implementation of the `codegen` cli utility
for in-place java boilerplate generation
See DataClass and SampleDataClass for documentation/guide/examples.
See tools/codegen/ for implementation and tests/Codegen/ for tests.
Bug: 64221737
Test: . frameworks/base/tests/Codegen/runTest.sh
Change-Id: I75177cb770f1beabc87dbae9e77ce4b93ca08e7f
Diffstat (limited to 'tests/Codegen/runTest.sh')
-rwxr-xr-x | tests/Codegen/runTest.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/Codegen/runTest.sh b/tests/Codegen/runTest.sh new file mode 100755 index 000000000000..fe3adf9b2a70 --- /dev/null +++ b/tests/Codegen/runTest.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +if [[ "$0" = *"/Codegen/runTest.sh" ]]; then + #running in subshell - print code to eval and exit + echo "source $0" +else + function header_and_eval() { + printf "\n[ $* ]\n" 1>&2 + eval "$@" + return $? + } + + header_and_eval m -j16 codegen && \ + header_and_eval codegen $ANDROID_BUILD_TOP/frameworks/base/tests/Codegen/src/com/android/codegentest/SampleDataClass.java && \ + cd $ANDROID_BUILD_TOP && + header_and_eval mmma -j16 frameworks/base/tests/Codegen && \ + header_and_eval adb install -r -t $ANDROID_PRODUCT_OUT/testcases/CodegenTests/arm64/CodegenTests.apk && \ + # header_and_eval adb shell am set-debug-app -w com.android.codegentest && \ + header_and_eval adb shell am instrument -w -e package com.android.codegentest com.android.codegentest/androidx.test.runner.AndroidJUnitRunner + + exitCode=$? + + # header_and_eval adb shell am clear-debug-app + + return $exitCode +fi
\ No newline at end of file |