builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/SBSv2QueryTests.java
author timkelly
Tue, 17 Aug 2010 10:53:02 -0700
branchC3_BUILDER_WORK
changeset 1843 4d6f0ee23e9b
parent 1776 ad19bba5eef8
child 1890 467f946a6cd1
permissions -rw-r--r--
Fix several issues for Linux around casting SDKManager to concrete class: mostly with reading devices.xml which Unix does not support. Migrated ISDKManager#getMinimumSupportedSBSv2Version() to API. Can now import and create Symbian projects.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1347
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
     1
/*
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
     2
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
     3
* All rights reserved.
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
     4
* This component and the accompanying materials are made available
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
     5
* under the terms of the License "Eclipse Public License v1.0"
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
     6
* which accompanies this distribution, and is available
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
     8
*
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
     9
* Initial Contributors:
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    11
*
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    12
* Contributors:
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    13
*
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    14
* Description: 
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    15
* Test the BldInfViewPathHelper class.
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    16
*
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    17
*/
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    18
package com.nokia.carbide.cdt.builder.test;
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    19
1522
58667ad9656d Clean up APIs/Tests around SBSv2 query mechanism (got rid of most all the original test API now that it's been moved into BuildContextSBSv2.
timkelly
parents: 1482
diff changeset
    20
import java.io.File;
1347
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    21
import java.util.List;
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    22
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    23
import org.osgi.framework.Version;
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    24
1739
5f659a59d04a refactoring ISBSv2BuildContext, ISBSv1BuildContext, ISBSv2ConfigQueryData from public to internal package.
timkelly
parents: 1737
diff changeset
    25
import com.nokia.carbide.cpp.internal.api.sdk.ISBSv2BuildContext;
1471
62024a5fa81d Refactor out BSF/SBV support from SBSv2 Builder data. Create new package for SBSv2Query APIs (moved from builder tests).
timkelly
parents: 1412
diff changeset
    26
import com.nokia.carbide.cpp.internal.api.sdk.sbsv2.SBSv2QueryUtils;
1776
ad19bba5eef8 refactoring ISDKManager - removing unnecessary API
timkelly
parents: 1739
diff changeset
    27
import com.nokia.carbide.cpp.internal.sdk.core.model.SDKManager;
1522
58667ad9656d Clean up APIs/Tests around SBSv2 query mechanism (got rid of most all the original test API now that it's been moved into BuildContextSBSv2.
timkelly
parents: 1482
diff changeset
    28
import com.nokia.carbide.cpp.sdk.core.ISDKBuildInfo;
58667ad9656d Clean up APIs/Tests around SBSv2 query mechanism (got rid of most all the original test API now that it's been moved into BuildContextSBSv2.
timkelly
parents: 1482
diff changeset
    29
import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
58667ad9656d Clean up APIs/Tests around SBSv2 query mechanism (got rid of most all the original test API now that it's been moved into BuildContextSBSv2.
timkelly
parents: 1482
diff changeset
    30
import com.nokia.carbide.cpp.sdk.core.ISymbianBuilderID;
1379
1fd5209125b8 first cut of APIs for Raptor config query
timkelly
parents: 1348
diff changeset
    31
import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
1347
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    32
import com.nokia.carbide.cpp.sdk.core.SDKCorePlugin;
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    33
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    34
public class SBSv2QueryTests extends BaseTest {
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    35
	
1412
fe4fc7e3771f misc test tweaks to get running on hudson.
timkelly
parents: 1386
diff changeset
    36
	private boolean printTimingStats = true;
fe4fc7e3771f misc test tweaks to get running on hudson.
timkelly
parents: 1386
diff changeset
    37
	
1347
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    38
	private long startTime;
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    39
	
1379
1fd5209125b8 first cut of APIs for Raptor config query
timkelly
parents: 1348
diff changeset
    40
	private final String SDK_ID1 = "K_92_WK12"; // SDK with additional aliases and products
1fd5209125b8 first cut of APIs for Raptor config query
timkelly
parents: 1348
diff changeset
    41
	
1347
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    42
	@Override
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    43
	protected void setUp() throws Exception {
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    44
		super.setUp();
1843
4d6f0ee23e9b Fix several issues for Linux around casting SDKManager to concrete class:
timkelly
parents: 1776
diff changeset
    45
		Version sbsVersion = SDKCorePlugin.getSDKManager().getSBSv2Version(true);
1522
58667ad9656d Clean up APIs/Tests around SBSv2 query mechanism (got rid of most all the original test API now that it's been moved into BuildContextSBSv2.
timkelly
parents: 1482
diff changeset
    46
		if ((sbsVersion.getMajor() == 2 && sbsVersion.getMinor() < 15) ||
1347
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    47
			 sbsVersion.getMajor() < 2){
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    48
			
1522
58667ad9656d Clean up APIs/Tests around SBSv2 query mechanism (got rid of most all the original test API now that it's been moved into BuildContextSBSv2.
timkelly
parents: 1482
diff changeset
    49
			fail("SBS Query tests require Raptor 2.15 or greater. Raptor version found is: " + sbsVersion);
1347
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    50
		}
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    51
	}
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    52
	
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    53
	@Override
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    54
	protected void tearDown() throws Exception {
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    55
		super.tearDown();
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    56
	}
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    57
	
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    58
	
1380
c70ff7f19887 more api changes for sbs query config design
timkelly
parents: 1379
diff changeset
    59
	/**
c70ff7f19887 more api changes for sbs query config design
timkelly
parents: 1379
diff changeset
    60
	 * Query data for a single configuration
c70ff7f19887 more api changes for sbs query config design
timkelly
parents: 1379
diff changeset
    61
	 * @throws Exception
c70ff7f19887 more api changes for sbs query config design
timkelly
parents: 1379
diff changeset
    62
	 */
1522
58667ad9656d Clean up APIs/Tests around SBSv2 query mechanism (got rid of most all the original test API now that it's been moved into BuildContextSBSv2.
timkelly
parents: 1482
diff changeset
    63
	public void testQueryBuildConfigsFromSDK() throws Exception {
1379
1fd5209125b8 first cut of APIs for Raptor config query
timkelly
parents: 1348
diff changeset
    64
		
1719
c55d4b8f7373 fixing SBSv2QueryTests.
timkelly
parents: 1568
diff changeset
    65
		SBSv2QueryUtils.removeAllCachedQueries();  // ensure sbs needs to build an entirely new cache
c55d4b8f7373 fixing SBSv2QueryTests.
timkelly
parents: 1568
diff changeset
    66
		
1522
58667ad9656d Clean up APIs/Tests around SBSv2 query mechanism (got rid of most all the original test API now that it's been moved into BuildContextSBSv2.
timkelly
parents: 1482
diff changeset
    67
		ISymbianSDK sdk = SDKCorePlugin.getSDKManager().getSDK(SDK_ID1, true);
58667ad9656d Clean up APIs/Tests around SBSv2 query mechanism (got rid of most all the original test API now that it's been moved into BuildContextSBSv2.
timkelly
parents: 1482
diff changeset
    68
		assertNotNull(sdk);
1379
1fd5209125b8 first cut of APIs for Raptor config query
timkelly
parents: 1348
diff changeset
    69
		
1522
58667ad9656d Clean up APIs/Tests around SBSv2 query mechanism (got rid of most all the original test API now that it's been moved into BuildContextSBSv2.
timkelly
parents: 1482
diff changeset
    70
		ISDKBuildInfo sbsv2BuildInfo = sdk.getBuildInfo(ISymbianBuilderID.SBSV2_BUILDER);
58667ad9656d Clean up APIs/Tests around SBSv2 query mechanism (got rid of most all the original test API now that it's been moved into BuildContextSBSv2.
timkelly
parents: 1482
diff changeset
    71
		assertNotNull(sbsv2BuildInfo);
58667ad9656d Clean up APIs/Tests around SBSv2 query mechanism (got rid of most all the original test API now that it's been moved into BuildContextSBSv2.
timkelly
parents: 1482
diff changeset
    72
		
58667ad9656d Clean up APIs/Tests around SBSv2 query mechanism (got rid of most all the original test API now that it's been moved into BuildContextSBSv2.
timkelly
parents: 1482
diff changeset
    73
		List<ISymbianBuildContext> buildContexts = sbsv2BuildInfo.getFilteredBuildConfigurations();
58667ad9656d Clean up APIs/Tests around SBSv2 query mechanism (got rid of most all the original test API now that it's been moved into BuildContextSBSv2.
timkelly
parents: 1482
diff changeset
    74
		assertEquals(6, buildContexts.size());
1379
1fd5209125b8 first cut of APIs for Raptor config query
timkelly
parents: 1348
diff changeset
    75
		
1522
58667ad9656d Clean up APIs/Tests around SBSv2 query mechanism (got rid of most all the original test API now that it's been moved into BuildContextSBSv2.
timkelly
parents: 1482
diff changeset
    76
		for (ISymbianBuildContext context : buildContexts){
58667ad9656d Clean up APIs/Tests around SBSv2 query mechanism (got rid of most all the original test API now that it's been moved into BuildContextSBSv2.
timkelly
parents: 1482
diff changeset
    77
			assertTrue(context instanceof ISBSv2BuildContext);
58667ad9656d Clean up APIs/Tests around SBSv2 query mechanism (got rid of most all the original test API now that it's been moved into BuildContextSBSv2.
timkelly
parents: 1482
diff changeset
    78
			ISBSv2BuildContext sbsv2Context = (ISBSv2BuildContext)context;
58667ad9656d Clean up APIs/Tests around SBSv2 query mechanism (got rid of most all the original test API now that it's been moved into BuildContextSBSv2.
timkelly
parents: 1482
diff changeset
    79
			
58667ad9656d Clean up APIs/Tests around SBSv2 query mechanism (got rid of most all the original test API now that it's been moved into BuildContextSBSv2.
timkelly
parents: 1482
diff changeset
    80
			assertTrue(sbsv2Context.getVariantHRHDefines().size() > 0);
1568
508bfdb3a934 Added caching of Raptor query data for aliases, products and configs.
stechong
parents: 1522
diff changeset
    81
			if (sbsv2Context.getConfigQueryData().getConfigurationErrorMessage() == null || sbsv2Context.getConfigQueryData().getConfigurationErrorMessage().length() == 0){
508bfdb3a934 Added caching of Raptor query data for aliases, products and configs.
stechong
parents: 1522
diff changeset
    82
				assertTrue((new File(sbsv2Context.getConfigQueryData().getMetaDataVariantHRH())).exists());
1522
58667ad9656d Clean up APIs/Tests around SBSv2 query mechanism (got rid of most all the original test API now that it's been moved into BuildContextSBSv2.
timkelly
parents: 1482
diff changeset
    83
			} else {
1568
508bfdb3a934 Added caching of Raptor query data for aliases, products and configs.
stechong
parents: 1522
diff changeset
    84
				System.out.println("Config " + sbsv2Context.getSBSv2Alias() + " had error, cannot fully test: " + sbsv2Context.getConfigQueryData().getConfigurationErrorMessage());
1522
58667ad9656d Clean up APIs/Tests around SBSv2 query mechanism (got rid of most all the original test API now that it's been moved into BuildContextSBSv2.
timkelly
parents: 1482
diff changeset
    85
			}
1737
ba17d4654040 add sbsv2 targettypes test check
timkelly
parents: 1719
diff changeset
    86
			
ba17d4654040 add sbsv2 targettypes test check
timkelly
parents: 1719
diff changeset
    87
			assertTrue(sbsv2Context.getConfigQueryData().getTargettypes().size() > 0);
1522
58667ad9656d Clean up APIs/Tests around SBSv2 query mechanism (got rid of most all the original test API now that it's been moved into BuildContextSBSv2.
timkelly
parents: 1482
diff changeset
    88
		}
1379
1fd5209125b8 first cut of APIs for Raptor config query
timkelly
parents: 1348
diff changeset
    89
	}
1347
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    90
		
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    91
	/**
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    92
	 * This test should be run on individual %EPOCROOT% values
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    93
	 * Products are defined in the SDK
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    94
	 * @throws Exception
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    95
	 */
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
    96
	public void testQueryProductsFromSDKs() throws Exception {
1379
1fd5209125b8 first cut of APIs for Raptor config query
timkelly
parents: 1348
diff changeset
    97
		ISymbianSDK sdk = SDKCorePlugin.getSDKManager().getSDK(SDK_ID1, false);
1fd5209125b8 first cut of APIs for Raptor config query
timkelly
parents: 1348
diff changeset
    98
		assertNotNull("Missing SDK on your system: " + SDK_ID1, sdk);
1522
58667ad9656d Clean up APIs/Tests around SBSv2 query mechanism (got rid of most all the original test API now that it's been moved into BuildContextSBSv2.
timkelly
parents: 1482
diff changeset
    99
		List<String> productList = SBSv2QueryUtils.getProductVariantsForSDK(sdk);
58667ad9656d Clean up APIs/Tests around SBSv2 query mechanism (got rid of most all the original test API now that it's been moved into BuildContextSBSv2.
timkelly
parents: 1482
diff changeset
   100
		assertTrue(productList.size() > 0);
1347
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
   101
	}
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
   102
	
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
   103
	public String getTimingStats(){
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
   104
		if (startTime != 0){
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
   105
			long millisec = (System.currentTimeMillis() - startTime);
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
   106
			long minutes = millisec / 1000 / 60;
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
   107
			long seconds = (millisec / 1000) % 60;
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
   108
			if (minutes > 0){
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
   109
				return "\nTotal Time: " + minutes + " min, " + seconds + " sec\n";
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
   110
			} else {
1379
1fd5209125b8 first cut of APIs for Raptor config query
timkelly
parents: 1348
diff changeset
   111
				if (seconds == 1){
1fd5209125b8 first cut of APIs for Raptor config query
timkelly
parents: 1348
diff changeset
   112
					return "\nTotal Time: " + millisec + " msec\n";
1fd5209125b8 first cut of APIs for Raptor config query
timkelly
parents: 1348
diff changeset
   113
				} else {
1fd5209125b8 first cut of APIs for Raptor config query
timkelly
parents: 1348
diff changeset
   114
					return "\nTotal Time: " + seconds + " sec\n";
1fd5209125b8 first cut of APIs for Raptor config query
timkelly
parents: 1348
diff changeset
   115
				}
1347
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
   116
			}
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
   117
			
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
   118
		} else {
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
   119
			return "";
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
   120
		}
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
   121
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
   122
	}
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
   123
	
22abc3a66090 Add first pass of experimental Raptor --query API tests. Some are hard-coded for specific SDK drives. Also use new CommandLuancher.exec (over deprecated one)
timkelly
parents:
diff changeset
   124
}