This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CTS for Blaze 4AI.1.4



Hi All,

I am using http://www.omappedia.org/wiki/4AI.1.4_OMAP4_Icecream_Sandwich_Release_Notes , on Blaze board.

Which version of CTS should be used with this?

  1. Should it be downloaded from http://source.android.com/compatibility/downloads.html , Android 4.0.3 ?
  2. Or it has to be built from CTS source in the Android source, and which branch to be used?
Regards,
Krt

  • Hi Krt,

    You can use the one from source.android.com, it is for Android 4.0.3 as it is 4AI.1.4 release.

  • Hi Israel Cepeda,

    Thanks for the reply.

    I executed the CTS on pre-builts of 4AI.1.4 on blaze, the android.holo (24 tests) package fails completely. 

    If I change the  ro.sf.lcd_density=240 to use the default 160, the test cases were passing.

    Is changing  ro.sf.lcd_density is a violation? is that the reason taht CTS fails?

    Regards,

    Krt

  • Hi Krt,

    I don't think it is the reason for the test cases to fail, but I would need to see which ones are failing.

    I have seen some fail one running the complete CTS, but running by packages seems to get better results.

  • Hi ICe,

    The following shows one such test case that failed in android.holo

    12-11 16:58:26 I/0123456789ABCDEF: Test package android.holo started

    12-11 16:58:26 I/0123456789ABCDEF: -----------------------------------------
    12-11 16:59:24 I/0123456789ABCDEF: android.holo.cts.HoloTest#testHolo FAIL
    junit.framework.AssertionFailedError: Failed bitmap names: [holo_button, holo_calendar_view_feb, holo_checkbox, holo_checkbox_checked, holo_chronometer, holo_edittext, holo_progressbar, holo_progressbar_small, holo_progressbar_large, holo_progressbar_horizontal_0, holo_progressbar_horizontal_50, holo_progressbar_horizontal_100, holo_radio_button, holo_radio_button_checked, holo_radiogroup_horizontal, holo_radiogroup_vertical, holo_ratingbar_0, holo_ratingbar_2point5, holo_ratingbar_5, holo_searchview, holo_searchview_query, holo_searchview_query_hint, holo_seekbar_0, holo_seekbar_50, holo_seekbar_100, holo_spinner, holo_switch, holo_switch_checked, holo_tabhost, holo_textview, holo_timepicker, holo_toggle_button, holo_toggle_button_checked, holo_color_blue_bright, holo_color_blue_dark, holo_color_blue_light, holo_color_green_dark, holo_color_green_light, holo_color_orange_dark, holo_color_orange_light, holo_color_purple, holo_color_red_dark, holo_color_red_light] Check /mnt/ext_sdcard/cts-holo-assets/failed and /mnt/ext_sdcard/cts-holo-assets/diff for details.
    at android.holo.cts.HoloTest.runThemeTest(HoloTest.java:143)
    at android.holo.cts.HoloTest.testHolo(HoloTest.java:35)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214)
    at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199)
    at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:192)
    at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
    at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
    at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:545)
    at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1551)

    This passed when I set the LCD density to default , 160.

    Regards,

    Krt

  • Krt,

    It is passing when you set 160 because the CTS you are using have images to be rendered in an LCD of 160dpi, and the LCD for Blaze is for 240dpi. so what you would need to do is to make a test with the images that fits an LCD of 240dpi without having to resize the image, because that is what is causing the image and the rendered buffer to have some differences.

    I have tested also in Blaze tablet where the density is 160dpi and test is passing.

    Also you way keep the 160 value in Blaze but it would change the size of other controls when it is an small display.

  • Krt,

    I found that the issue is because the images for the controls used are for devices with medium density (mdpi) display when Blaze has high density (hdpi) display.

    To fix that and see holo test cases passing apply the following patch:

    From c7b06f0703bfc110c87ce43dca0c50bb8575b532 Mon Sep 17 00:00:00 2001
    From: Israel Cepeda <icepeda@ti.com>
    Date: Fri, 11 Jan 2013 07:03:46 -0600
    Subject: [PATCH] Blaze: Set the dpi for images

    Sets the dpi density for the display in order to use the correct images
    to be used in Android UIs.

    Change-Id: I9d9dc84e0d29883a6f6f077727d2c22d51c91b05

    Signed-off-by: Israel Cepeda <israel4c@gmail.com>
    ---
     device.mk |    4 ++++
     1 file changed, 4 insertions(+)

    diff --git a/device.mk b/device.mk
    index f023597..f8a9967 100644
    --- a/device.mk
    +++ b/device.mk
    @@ -16,6 +16,10 @@
     
     DEVICE_PACKAGE_OVERLAYS := device/ti/blaze/overlay
     
    +# This device is hdpi.
    +PRODUCT_AAPT_CONFIG := normal hdpi
    +PRODUCT_AAPT_PREF_CONFIG := hdpi
    +
     ifeq ($(TARGET_PREBUILT_KERNEL),)
     LOCAL_KERNEL := device/ti/blaze/boot/zImage
     else
    --

    I now see correct size in Android UIs and test passing

  • Hi ICe,

    Thanks for the patch it works.

    Regards,

    Krt

  • Hi ICe,

    I have a question on the same.

    My device is based on Balze , phone build.

    For example, my phone resolution is 1280*720, , screen size is 5". So, I have to modify device config (device/.../.../device.mk) like: 
    PRODUCT_CHARACTERISTICS := phone
    ......
    PRODUCT_AAPT_CONFIG := normal hdpi xhdpi
    PRODUCT_AAPT_PREF_CONFIG := xhdpi

    PRODUCT_PROPERTY_OVERRIDES += \
    ro.sf.lcd_density=320

    I expected this to pass, but all android.holo package tests are failing.

    Any idea what is wrong with this settings ?

    Regards,

    Keerthi

    
    

  • Quick comment, the issue was that the test framework was using the incorrect resolution for reference pictures, this is when testing results are compared to existing pictures with established resolutions, using non-standard or not the correct ones in settings was making test to fail.

    It could be the same that is happening but the used resolution could not have this resolution images as reference to compare with it. By checking it xhdpi is supported in HOLO tests, this is ls to respective directory

    /mydroid/cts/tests/tests/holo/res/drawable-hdpi
    /mydroid/cts/tests/tests/holo/res/drawable-ldpi
    /mydroid/cts/tests/tests/holo/res/drawable-mdpi
    /mydroid/cts/tests/tests/holo/res/drawable-sw600dp-mdpi
    /mydroid/cts/tests/tests/holo/res/drawable-tvdpi
    /mydroid/cts/tests/tests/holo/res/drawable-xhdpi
    /mydroid/cts/tests/tests/holo/res/layout
    /mydroid/cts/tests/tests/holo/res/values

    Probably changing density to 720?

    Some links that talks about this, but not mentioning because of specific search.

    http://developer.android.com/guide/practices/screens_support.html

    http://developer.android.com/training/basics/supporting-devices/screens.html

    http://android-developers.blogspot.com/2011/07/new-tools-for-managing-screen-sizes.html

  • Hi All

    If the Holo test(24 Test cases ) are getting failed in the android CTS try to change the front size of the Display  as NORMAL  from LARGE in the setting.

    Regards

    Mukesh