Friday, September 23, 2016

Android CTS 7.0_r1 : Running modules list through automated script

Hello Guys,
How are you doing? hope all is well. Its been while, lets get started!

So whats new? Yeah Android 7 is new! Android 7 has been out now for a while and everybody (device vendors) wants it up and running as soon as possible. So here I am trying to get Android 7 up for some super secrete project, just kidding, yes I (and my team) had just completed bring up of the device with Android N (i.e. Android 7, called Nougat) yeeeh! but that's just the half battle, still need to run Android Compatibility Test Suite (CTS) to win the rest.



So, here is the issue, The device I have has some serious battery problem, it cant charge through USB if its connected to computer, it needs to be connect to charger to do so. So every time I kick CTS plan device goes down before it completes. The solution is instead of running whole plan run module by module and get result but its heck lot of manual work and I have to keep eye on it. Also in CTS 7 google has changed structure a bit lot.

So here I am going to give you scripts which helps you run CTS modules one-by-one and also saves results location in log file. So if device goes down while running some module you can continue from where you left. You just need to follow some steps as bellow:


1. Download CTS 7  

You can download CTS package from : CTS download   and extract it.

 

2. Get list of modules

After extracting CTS package go to android-cts/tools directory and execute following command to get available modules list,
Then copy list of modules to a file e.g. modules.lst or you can get it here 

3. Script to run modules one-by-one from the list

Now what you need is a script that runs modules from above list one-by-one, here it is, 

Running the CTS modules using script,

If device dies while running some module using the script, you can press 'ctrl+c' to stop script in between and remove modules from 'modules.lst' file which ran to completion successfully, then run the script again as before to continue from where you left.

4. Collecting logs of CTS

Result of each module ran using above script can be found in android-cts/results/ directory in separate sub-directories with sub-directory name as time-stamp when respective module has started. Above script collects all modules time-stamp in log file, modules.lst.log, which you can use latter to correlate time-stamps recorded to find each modules result/log directory. See snap-shot bellow,

That's it guys, have a nice day!!
Cheers!!!

2 comments:

  1. Thanks for one's marvelous posting! I truly enjoyed reading it, you may be a great author.I will remember to bookmark
    your blog and will come back sometime soon. I want to encourage yourself to continue
    your great work, have a nice afternoon!

    ReplyDelete
  2. Is there an easy way to view all the failed test from all the different modules? If I have over 100 modules running, it's very time consuming to go in and look at each file.

    ReplyDelete