aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Android.mk16
-rw-r--r--apps/sample_app/src/cpp/main.cpp2
-rw-r--r--functional_tests/hostside/Android.bp5
-rw-r--r--functional_tests/hostside/src/com/android/game/qualification/test/MemoryTests.java6
-rw-r--r--functional_tests/java/src/cpp/native_choreo_activity.cpp4
-rw-r--r--performance_tests/hostside/Android.bp4
6 files changed, 20 insertions, 17 deletions
diff --git a/Android.mk b/Android.mk
index 693b971..159eede 100644
--- a/Android.mk
+++ b/Android.mk
@@ -52,17 +52,19 @@ config_files :=
bit_suffix :=
gamecore_dist_intermediates := $(call intermediates-dir-for,PACKAGING,gamecore_dist,HOST,COMMON)
+gamecore_dist_staging := $(gamecore_dist_intermediates)/staging
gamecore_dist_zip := $(gamecore_dist_intermediates)/gamecore.zip
$(gamecore_dist_zip) : PRIVATE_COPY_PAIRS := $(gamecore_dist_copy_pairs)
+$(gamecore_dist_zip) : PRIVATE_STAGING_DIR := $(gamecore_dist_staging)
$(gamecore_dist_zip) : $(SOONG_ZIP) $(foreach p,$(gamecore_dist_copy_pairs),$(call word-colon,1,$(p)))
- rm -rf $(dir $@) && mkdir -p $(dir $@)/gamecore
- mkdir -p $(dir $@)/gamecore/bin
- mkdir -p $(dir $@)/gamecore/testcases/$(TARGET_ARCH)
+ rm -rf $(PRIVATE_STAGING_DIR) && mkdir -p $(PRIVATE_STAGING_DIR)/gamecore
+ mkdir -p $(PRIVATE_STAGING_DIR)/gamecore/bin
+ mkdir -p $(PRIVATE_STAGING_DIR)/gamecore/testcases/$(TARGET_ARCH)
$(foreach p,$(PRIVATE_COPY_PAIRS), \
- cp -f $(call word-colon,1,$(p)) $(dir $@)/$(call word-colon,2,$(p)) &&) true
- echo $(BUILD_NUMBER_FROM_FILE) > $(dir $@)/gamecore/version.txt
- $(SOONG_ZIP) -o $@ -C $(dir $@) -f $(dir $@)/gamecore/version.txt \
- $(foreach p,$(PRIVATE_COPY_PAIRS),-f $(dir $@)/$(call word-colon,2,$(p)))
+ cp -f $(call word-colon,1,$(p)) $(PRIVATE_STAGING_DIR)/$(call word-colon,2,$(p)) &&) true
+ echo $(BUILD_NUMBER_FROM_FILE) > $(PRIVATE_STAGING_DIR)/gamecore/version.txt
+ $(SOONG_ZIP) -o $@ -C $(PRIVATE_STAGING_DIR) -f $(PRIVATE_STAGING_DIR)/gamecore/version.txt \
+ $(foreach p,$(PRIVATE_COPY_PAIRS),-f $(PRIVATE_STAGING_DIR)/$(call word-colon,2,$(p)))
$(call declare-1p-container,$(gamecore_dist_zip),tools/test)
$(call declare-container-license-deps,$(gamecore_dist_zip),$(filter $(OUT_DIR)/%,$(foreach p,$(gamecore_dist_copy_pairs), $(call word-colon,1,$(p)))),$(gamecore_dist_zip):)
diff --git a/apps/sample_app/src/cpp/main.cpp b/apps/sample_app/src/cpp/main.cpp
index 22773e0..e73dd88 100644
--- a/apps/sample_app/src/cpp/main.cpp
+++ b/apps/sample_app/src/cpp/main.cpp
@@ -118,7 +118,7 @@ void android_main(struct android_app* state) {
// If not animating, we will block forever waiting for events.
// If animating, we loop until all events are read, then continue
// to draw the next frame of animation.
- while (ALooper_pollAll(animating ? 0 : -1, NULL, &events, (void**)&source) >= 0) {
+ while (ALooper_pollOnce(animating ? 0 : -1, NULL, &events, (void**)&source) >= 0) {
// Process this event.
if (source != NULL) {
diff --git a/functional_tests/hostside/Android.bp b/functional_tests/hostside/Android.bp
index 77171bc..48396f0 100644
--- a/functional_tests/hostside/Android.bp
+++ b/functional_tests/hostside/Android.bp
@@ -25,9 +25,12 @@ java_test_host {
"GameCoreHelperHost",
],
static_libs: [
- "truth-prebuilt-host-jar",
+ "truth",
],
test_suites: [
"general-tests",
],
+ data: [
+ ":GameCoreAllocStress",
+ ],
}
diff --git a/functional_tests/hostside/src/com/android/game/qualification/test/MemoryTests.java b/functional_tests/hostside/src/com/android/game/qualification/test/MemoryTests.java
index 10e8cb6..d2eef8d 100644
--- a/functional_tests/hostside/src/com/android/game/qualification/test/MemoryTests.java
+++ b/functional_tests/hostside/src/com/android/game/qualification/test/MemoryTests.java
@@ -26,6 +26,7 @@ import com.android.tradefed.result.InputStreamSource;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner.TestMetrics;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import com.android.tradefed.testtype.junit4.BaseHostJUnit4Test;
+import com.android.tradefed.util.RunUtil;
import java.io.BufferedReader;
import java.io.IOException;
@@ -61,10 +62,7 @@ public class MemoryTests extends BaseHostJUnit4Test {
throws DeviceNotAvailableException, IOException {
getDevice().startLogcat();
// Wait until starting logcat for the device.
- try {
- Thread.sleep(LOG_START_DELAY);
- } catch (InterruptedException e) {
- }
+ RunUtil.getDefault().sleep(LOG_START_DELAY);
getDevice().clearLogcat();
String pkgname = "com.android.game.qualification.allocstress";
diff --git a/functional_tests/java/src/cpp/native_choreo_activity.cpp b/functional_tests/java/src/cpp/native_choreo_activity.cpp
index 2ecfb94..d09a075 100644
--- a/functional_tests/java/src/cpp/native_choreo_activity.cpp
+++ b/functional_tests/java/src/cpp/native_choreo_activity.cpp
@@ -158,7 +158,7 @@ Java_com_android_game_qualification_tests_ChoreoTestActivity_runTheTest(JNIEnv*
AChoreographer_postFrameCallback(choreographer, frameCallback, nullptr);
- while (doRender && ALooper_pollAll(-1, nullptr, nullptr, nullptr));
+ while (doRender && ALooper_pollOnce(-1, nullptr, nullptr, nullptr));
shutdownEGL();
@@ -198,4 +198,4 @@ Java_com_android_game_qualification_tests_ChoreoTestActivity_getFrameIntervals(J
}
return list;
-} \ No newline at end of file
+}
diff --git a/performance_tests/hostside/Android.bp b/performance_tests/hostside/Android.bp
index d02805d..e99a80b 100644
--- a/performance_tests/hostside/Android.bp
+++ b/performance_tests/hostside/Android.bp
@@ -27,7 +27,7 @@ java_test_host {
],
static_libs: [
"GameCoreHelperHost",
- "truth-prebuilt-host-jar",
- "gson-prebuilt-jar",
+ "truth",
+ "gson",
],
}