author | timkelly |
Mon, 11 Oct 2010 11:13:57 -0500 | |
changeset 2145 | e374d23468f5 |
parent 1900 | 346e4625dacb |
permissions | -rw-r--r-- |
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; |
2145
e374d23468f5
Make ssbv2 query tests work against public Symbian^3 beta
timkelly
parents:
1900
diff
changeset
|
27 |
import com.nokia.carbide.cpp.internal.sdk.core.model.AbstractSDKManager; |
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 | 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 |
|
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
|
36 |
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
|
37 |
|
2145
e374d23468f5
Make ssbv2 query tests work against public Symbian^3 beta
timkelly
parents:
1900
diff
changeset
|
38 |
/** Test SDK - Note that this SDK does not have /epoc32/sbs_config/variant_configs.xml |
e374d23468f5
Make ssbv2 query tests work against public Symbian^3 beta
timkelly
parents:
1900
diff
changeset
|
39 |
* to test the products. Any working variant_configs.xml can be insterted to get the tests working |
e374d23468f5
Make ssbv2 query tests work against public Symbian^3 beta
timkelly
parents:
1900
diff
changeset
|
40 |
*/ |
e374d23468f5
Make ssbv2 query tests work against public Symbian^3 beta
timkelly
parents:
1900
diff
changeset
|
41 |
private final String SDK_ID1 = "Nokia_Symbian3_SDK_v0.9"; |
1379 | 42 |
|
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
|
43 |
@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
|
44 |
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
|
45 |
super.setUp(); |
1843
4d6f0ee23e9b
Fix several issues for Linux around casting SDKManager to concrete class:
timkelly
parents:
1776
diff
changeset
|
46 |
Version sbsVersion = SDKCorePlugin.getSDKManager().getSBSv2Version(true); |
2145
e374d23468f5
Make ssbv2 query tests work against public Symbian^3 beta
timkelly
parents:
1900
diff
changeset
|
47 |
if (sbsVersion.compareTo(AbstractSDKManager.MINIMUM_RAPTOR_VERSION) < 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
|
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 | 59 |
/** |
60 |
* Query data for a single configuration |
|
61 |
* @throws Exception |
|
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 | 64 |
|
1719 | 65 |
SBSv2QueryUtils.removeAllCachedQueries(); // ensure sbs needs to build an entirely new cache |
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 | 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(); |
1895 | 74 |
// WINSCW UREL is filtered out from default b/c it does not exist for current test SDK |
75 |
assertEquals(5, buildContexts.size()); |
|
1379 | 76 |
|
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
|
77 |
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
|
78 |
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
|
79 |
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
|
80 |
|
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
|
81 |
assertTrue(sbsv2Context.getVariantHRHDefines().size() > 0); |
1568
508bfdb3a934
Added caching of Raptor query data for aliases, products and configs.
stechong
parents:
1522
diff
changeset
|
82 |
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
|
83 |
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
|
84 |
} else { |
1568
508bfdb3a934
Added caching of Raptor query data for aliases, products and configs.
stechong
parents:
1522
diff
changeset
|
85 |
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
|
86 |
} |
1737 | 87 |
|
1900
346e4625dacb
adjust sbsv2 tests for configs that have errors (and hence no build data)
timkelly
parents:
1895
diff
changeset
|
88 |
if (sbsv2Context.getConfigQueryData().getConfigurationErrorMessage() == null || |
346e4625dacb
adjust sbsv2 tests for configs that have errors (and hence no build data)
timkelly
parents:
1895
diff
changeset
|
89 |
sbsv2Context.getConfigQueryData().getConfigurationErrorMessage().length() == 0 ){ |
346e4625dacb
adjust sbsv2 tests for configs that have errors (and hence no build data)
timkelly
parents:
1895
diff
changeset
|
90 |
// If there is an error in a configuration we know there won't be any target types |
346e4625dacb
adjust sbsv2 tests for configs that have errors (and hence no build data)
timkelly
parents:
1895
diff
changeset
|
91 |
assertTrue(sbsv2Context.getConfigQueryData().getTargettypes().size() > 0); |
346e4625dacb
adjust sbsv2 tests for configs that have errors (and hence no build data)
timkelly
parents:
1895
diff
changeset
|
92 |
} else { |
346e4625dacb
adjust sbsv2 tests for configs that have errors (and hence no build data)
timkelly
parents:
1895
diff
changeset
|
93 |
assertFalse(sbsv2Context.getConfigQueryData().getTargettypes() == null); |
346e4625dacb
adjust sbsv2 tests for configs that have errors (and hence no build data)
timkelly
parents:
1895
diff
changeset
|
94 |
} |
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
|
95 |
} |
1379 | 96 |
} |
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
|
97 |
|
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
|
98 |
/** |
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
|
99 |
* 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
|
100 |
* 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
|
101 |
* @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
|
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 void testQueryProductsFromSDKs() throws Exception { |
1379 | 104 |
ISymbianSDK sdk = SDKCorePlugin.getSDKManager().getSDK(SDK_ID1, false); |
105 |
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
|
106 |
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
|
107 |
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
|
108 |
} |
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 |
|
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 |
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
|
111 |
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
|
112 |
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
|
113 |
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
|
114 |
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
|
115 |
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
|
116 |
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
|
117 |
} else { |
1379 | 118 |
if (seconds == 1){ |
119 |
return "\nTotal Time: " + millisec + " msec\n"; |
|
120 |
} else { |
|
121 |
return "\nTotal Time: " + seconds + " sec\n"; |
|
122 |
} |
|
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
|
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 |
|
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
|
125 |
} 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
|
126 |
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
|
127 |
} |
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
|
128 |
|
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
|
129 |
} |
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
|
130 |
|
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
|
131 |
} |