How to build android cts? And how to add and run your test case?

后端 未结 2 535
心在旅途
心在旅途 2021-01-04 00:55

From 2.0 the cts is freely downloadable from android\'s repository.

But there is no documents about it.

Does anyone can tell me:

  1. how to build c
相关标签:
2条回答
  • 2021-01-04 01:07

    Before running the CTS,

    1) Make sure you have recent versions of both Android Debug Bridge (adb) and Android Asset Packaging Tool (AAPT) installed

    2) Make sure you have atleast the Android CTS version (android-cts-7.0_r13) SDK installed on your machine. Download the CTS version:-https://source.android.com/compatibility/cts/downloads

    Run CTS:-

    1) Set the SDK path:-

    export PATH=$PATH:/home/apuser/SDK_for_linux/android-sdk-linux/build-tools/24.0.3/
    

    2) Go to the tools director of CTS SDK android- cts/tools

    3) Run the tradefed script file ./cts-tradefed

    4) Execute the CTS command run cts -m <module_name>

    Build CTS source code :-

    Download cts source code :

    $ mkdir <dir_name>
    $ cd <dir_name>
    $ repo init -u https://android.googlesource.com/platform/manifest -b <tag_name> ( tag_name :-  android-cts-8.0_r2,  android-cts-7.1_r10)
    $ repo sync -d -c –q
    

    Compile complete cts package:

    $ cd <dir_name>
    $ . build/envsetup.sh
    $ make cts -j TARGET_PRODUCT=aosp_arm64 
    

    Compile particular cts :

    $  cd <dir_name>
    $  . build/envsetup.sh
    $  cd <testcase_dir_name>
    $  mm
    

    After compiling the copy test case file : /home/apuser/android-cts-8.0_r1/out/host/linux-x86/cts/android-cts/testcases/

    Replace them at below path(ubantu/linux system) /android-cts-8.0_r1/testcases/

    0 讨论(0)
  • 2021-01-04 01:18

    Not only SDK, it need Android building system, you could set it up from Android site.

    Here is another CTS introduction about building CTS.

    0 讨论(0)
提交回复
热议问题