diff options
author | Tim Murray <timmurray@google.com> | 2015-05-06 11:37:37 -0700 |
---|---|---|
committer | Tim Murray <timmurray@google.com> | 2015-05-06 12:22:35 -0700 |
commit | 1a0f1c7c1652df4f00c2a4e47f5c9a9c897bbcb2 (patch) | |
tree | 2adc20e85bfb528b3c189b399d5da6c519503c09 /libs/hwui/tests/main.cpp | |
parent | e74007ded3a34d6aaf7dc4fe7f2c18b04b47de3b (diff) | |
download | frameworks_base-1a0f1c7c1652df4f00c2a4e47f5c9a9c897bbcb2.zip frameworks_base-1a0f1c7c1652df4f00c2a4e47f5c9a9c897bbcb2.tar.gz frameworks_base-1a0f1c7c1652df4f00c2a4e47f5c9a9c897bbcb2.tar.bz2 |
Add loop option to hwuitest.
Change-Id: I15b6b121bd6bd963e5b433bdd93d6dc3e83645b8
Diffstat (limited to 'libs/hwui/tests/main.cpp')
-rw-r--r-- | libs/hwui/tests/main.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/libs/hwui/tests/main.cpp b/libs/hwui/tests/main.cpp index aca7c52..9468d96 100644 --- a/libs/hwui/tests/main.cpp +++ b/libs/hwui/tests/main.cpp @@ -263,7 +263,20 @@ int main(int argc, char* argv[]) { printf("Error: couldn't find test %s\n", testName); return 1; } - proc(); + int loopCount = 1; + if (argc > 2) { + loopCount = atoi(argv[2]); + if (!loopCount) { + printf("Invalid loop count!\n"); + return 1; + } + } + if (loopCount < 0) { + loopCount = INT_MAX; + } + for (int i = 0; i < loopCount; i++) { + proc(); + } printf("Success!\n"); return 0; } |