private List<TestPackage> buildTestsToRun(){
  List<TestPackage> testPkgList=new LinkedList<TestPackage>();
  try {
    ITestPackageRepo testRepo=createTestCaseRepo();
    Collection<ITestPackageDef> testPkgDefs=getTestPackagesToRun(testRepo);
    for (    ITestPackageDef testPkgDef : testPkgDefs) {
      addTestPackage(testPkgList,testPkgDef);
    }
    if (testPkgList.isEmpty()) {
      Log.logAndDisplay(LogLevel.WARN,LOG_TAG,"No tests to run");
    }
  }
 catch (  FileNotFoundException e) {
    throw new IllegalArgumentException("failed to find CTS plan file",e);
  }
catch (  ParseException e) {
    throw new IllegalArgumentException("failed to parse CTS plan file",e);
  }
catch (  ConfigurationException e) {
    throw new IllegalArgumentException("failed to process arguments",e);
  }
  return testPkgList;
}

private List < TestPackage > buildTestsToRun ( ) { List < TestPackage > testPkgList = new LinkedList < TestPackage > ( ) ; try { ITestPackageRepo testRepo = createTestCaseRepo ( ) ; Collection < ITestPackageDef > testPkgDefs = getTestPackagesToRun ( testRepo ) ; for ( ITestPackageDef testPkgDef : testPkgDefs ) { addTestPackage ( testPkgList , testPkgDef ) ; } if ( testPkgList . isEmpty ( ) ) { Log . logAndDisplay ( LogLevel . WARN , LOG_TAG , "No tests to run" ) ; } } catch ( FileNotFoundException e ) { throw new IllegalArgumentException ( "failed to find CTS plan file" , e ) ; } catch ( ParseException e ) { throw new IllegalArgumentException ( "failed to parse CTS plan file" , e ) ; } catch ( ConfigurationException e ) { throw new IllegalArgumentException ( "failed to process arguments" , e ) ; } return testPkgList ; }
build the list of test packages to run
