Use latest SDK version for current in PDK builds
PDK builds need to use the latest SDK version instead of "current" to match the behavior of Make. Bug: 118634643 Test: sdk_test.go Change-Id: Ice10d0ccb4066f27ce5839fc96a4026510057121
This commit is contained in:
@@ -27,6 +27,7 @@ import (
|
||||
var classpathTestcases = []struct {
|
||||
name string
|
||||
unbundled bool
|
||||
pdk bool
|
||||
moduleType string
|
||||
host android.OsClass
|
||||
properties string
|
||||
@@ -155,6 +156,30 @@ var classpathTestcases = []struct {
|
||||
system: "bootclasspath", // special value to tell 1.9 test to expect bootclasspath
|
||||
classpath: []string{"prebuilts/sdk/current/public/android.jar", "prebuilts/sdk/tools/core-lambda-stubs.jar"},
|
||||
},
|
||||
|
||||
{
|
||||
name: "pdk default",
|
||||
pdk: true,
|
||||
bootclasspath: []string{`""`},
|
||||
system: "bootclasspath", // special value to tell 1.9 test to expect bootclasspath
|
||||
classpath: []string{"prebuilts/sdk/17/public/android.jar", "prebuilts/sdk/tools/core-lambda-stubs.jar"},
|
||||
},
|
||||
{
|
||||
name: "pdk current",
|
||||
pdk: true,
|
||||
properties: `sdk_version: "current",`,
|
||||
bootclasspath: []string{`""`},
|
||||
system: "bootclasspath", // special value to tell 1.9 test to expect bootclasspath
|
||||
classpath: []string{"prebuilts/sdk/17/public/android.jar", "prebuilts/sdk/tools/core-lambda-stubs.jar"},
|
||||
},
|
||||
{
|
||||
name: "pdk 14",
|
||||
pdk: true,
|
||||
properties: `sdk_version: "14",`,
|
||||
bootclasspath: []string{`""`},
|
||||
system: "bootclasspath", // special value to tell 1.9 test to expect bootclasspath
|
||||
classpath: []string{"prebuilts/sdk/14/public/android.jar", "prebuilts/sdk/tools/core-lambda-stubs.jar"},
|
||||
},
|
||||
}
|
||||
|
||||
func TestClasspath(t *testing.T) {
|
||||
@@ -209,6 +234,9 @@ func TestClasspath(t *testing.T) {
|
||||
if testcase.unbundled {
|
||||
config.TestProductVariables.Unbundled_build = proptools.BoolPtr(true)
|
||||
}
|
||||
if testcase.pdk {
|
||||
config.TestProductVariables.Pdk = proptools.BoolPtr(true)
|
||||
}
|
||||
ctx := testContext(config, bp, nil)
|
||||
run(t, ctx, config)
|
||||
|
||||
@@ -241,6 +269,9 @@ func TestClasspath(t *testing.T) {
|
||||
if testcase.unbundled {
|
||||
config.TestProductVariables.Unbundled_build = proptools.BoolPtr(true)
|
||||
}
|
||||
if testcase.pdk {
|
||||
config.TestProductVariables.Pdk = proptools.BoolPtr(true)
|
||||
}
|
||||
ctx := testContext(config, bp, nil)
|
||||
run(t, ctx, config)
|
||||
|
||||
|
Reference in New Issue
Block a user