CTS Framework Parsing (2)-cts setup of debugging environment

Source: Internet
Author: User

The previous article described how to build CTS in Windows and run CTS for testing. This article is about how to configure the source code in Eclipse for debug debugging.


Download


CTS Source Address: https://android.googlesource.com/platform/cts

You can use git to download it locally.


directory Structure



There is a project under the Tools folder: Tradefed-host



Put this project into eclipse.



The exclamation point occurs because of a problem with the jar package reference.




So we're going to refer to the local jar package. Search the following jar on the Internet, I have also uploaded my local.

Ddmlib-prebuilt.jar,tradefed-prebuilt.jar,hosttestlib.jar,javalib-deviceinfo.jar,javalib-deviceutil.jar


After importing, the exclamation point disappears.



For Deviceinforesult.java's error



Delete it or change it to deviceinfoconstants.open_gl_es_version, without affecting it.


Source Run


Find the entry class for the project Ctsconsole.java, right-click




Click Debug Configurations ... to find the Java application, select the parameter Arguments column.




The configuration is as follows:



Program arguments is configured to represent you in the previous CTS command line under the input run CTS--plan signature is a meaning.



This time we chose signature this plan, the last article with Java Plan waited 3 hours to execute. This time for a simple one.


This time right-click Ctsconsole.java run. The console will appear as follows:



As shown on the command line, the difference is that we are running with the source code.


Debug


Above already can use the source code to run, below starts to debug the source code using debug mode.


Make a breakpoint on the main method of the Ctsconsole.java.



Right-click Debug mode to start.



Click Yes to enter debug mode.




At this point we have started debug debugging. The following article is a step-by-step approach to understanding the mechanism of the CTS framework with the debug mode.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.