diff options
author | Xavier Ducrohet <xav@android.com> | 2011-02-24 12:48:51 -0800 |
---|---|---|
committer | Android Code Review <code-review@android.com> | 2011-02-24 12:48:51 -0800 |
commit | 17b311c5d405cfa264a52514ba0d38c12e482042 (patch) | |
tree | a63bd2bf5706860ca48e610ddc509127d2491cff | |
parent | fb9ceb6c7a924598169ccb093a684c91777c4361 (diff) | |
parent | c0f6d8a9f0fdcdb9bbd4ce6ea90bb0014154c9bc (diff) | |
download | sdk-17b311c5d405cfa264a52514ba0d38c12e482042.zip sdk-17b311c5d405cfa264a52514ba0d38c12e482042.tar.gz sdk-17b311c5d405cfa264a52514ba0d38c12e482042.tar.bz2 |
Merge "Make the sdklib/sdkuilib tests built by the build system."
8 files changed, 83 insertions, 11 deletions
diff --git a/sdkmanager/libs/sdklib/.classpath b/sdkmanager/libs/sdklib/.classpath index 174a804..f8b23a9 100644 --- a/sdkmanager/libs/sdklib/.classpath +++ b/sdkmanager/libs/sdklib/.classpath @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> - <classpathentry kind="src" path="src"/> - <classpathentry kind="src" path="tests"/> + <classpathentry excluding="**/Android.mk" kind="src" path="src"/> + <classpathentry excluding="**/Android.mk" kind="src" path="tests"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry combineaccessrules="false" kind="src" path="/AndroidPrefs"/> <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/> diff --git a/sdkmanager/libs/sdklib/Android.mk b/sdkmanager/libs/sdklib/Android.mk index 509c573..99284bf 100644 --- a/sdkmanager/libs/sdklib/Android.mk +++ b/sdkmanager/libs/sdklib/Android.mk @@ -14,4 +14,6 @@ # limitations under the License. # SDKLIB_LOCAL_DIR := $(call my-dir) -include $(SDKLIB_LOCAL_DIR)/src/Android.mk + +# Build all sub-directories +include $(call all-makefiles-under,$(SDKLIB_LOCAL_DIR)) diff --git a/sdkmanager/libs/sdklib/tests/Android.mk b/sdkmanager/libs/sdklib/tests/Android.mk new file mode 100644 index 0000000..3b26bc0 --- /dev/null +++ b/sdkmanager/libs/sdklib/tests/Android.mk @@ -0,0 +1,27 @@ +# Copyright (C) 2011 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +# Only compile source java files in this lib. +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_MODULE := sdklib-tests +LOCAL_MODULE_TAGS := optional + +LOCAL_JAVA_LIBRARIES := sdklib junit + +include $(BUILD_HOST_JAVA_LIBRARY) diff --git a/sdkmanager/libs/sdkuilib/.classpath b/sdkmanager/libs/sdkuilib/.classpath index b62b292..5a0e83d 100644 --- a/sdkmanager/libs/sdkuilib/.classpath +++ b/sdkmanager/libs/sdkuilib/.classpath @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> - <classpathentry kind="src" path="src"/> - <classpathentry kind="src" path="tests"/> + <classpathentry excluding="**/Android.mk" kind="src" path="src"/> + <classpathentry excluding="**/Android.mk" kind="src" path="tests"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry exported="true" kind="con" path="org.eclipse.jdt.USER_LIBRARY/ANDROID_SWT"/> <classpathentry combineaccessrules="false" kind="src" path="/SdkLib"/> diff --git a/sdkmanager/libs/sdkuilib/Android.mk b/sdkmanager/libs/sdkuilib/Android.mk index 8e0bc23..33f8a9d 100644 --- a/sdkmanager/libs/sdkuilib/Android.mk +++ b/sdkmanager/libs/sdkuilib/Android.mk @@ -1,4 +1,19 @@ -# Copyright 2008 The Android Open Source Project +# +# Copyright (C) 2008 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # SDKUILIB_LOCAL_DIR := $(call my-dir) -include $(SDKUILIB_LOCAL_DIR)/src/Android.mk + +# Build all sub-directories +include $(call all-makefiles-under,$(SDKUILIB_LOCAL_DIR)) diff --git a/sdkmanager/libs/sdkuilib/tests/Android.mk b/sdkmanager/libs/sdkuilib/tests/Android.mk new file mode 100644 index 0000000..a7ba9a7 --- /dev/null +++ b/sdkmanager/libs/sdkuilib/tests/Android.mk @@ -0,0 +1,32 @@ +# Copyright (C) 2011 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +# Only compile source java files in this lib. +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_MODULE := sdkuilib-tests +LOCAL_MODULE_TAGS := optional + +LOCAL_JAVA_LIBRARIES := \ + sdklib \ + sdklib-tests \ + sdkuilib \ + junit \ + swt \ + +include $(BUILD_HOST_JAVA_LIBRARY) diff --git a/sdkmanager/libs/sdkuilib/tests/com/android/sdkuilib/internal/repository/UpdaterDataTest.java b/sdkmanager/libs/sdkuilib/tests/com/android/sdkuilib/internal/repository/UpdaterDataTest.java index 185589f..abc63d0 100755 --- a/sdkmanager/libs/sdkuilib/tests/com/android/sdkuilib/internal/repository/UpdaterDataTest.java +++ b/sdkmanager/libs/sdkuilib/tests/com/android/sdkuilib/internal/repository/UpdaterDataTest.java @@ -31,7 +31,6 @@ import com.android.sdklib.mock.MockLog; import java.io.File; import java.util.ArrayList; import java.util.Arrays; -import java.util.Collection; import java.util.List; import java.util.Properties; diff --git a/sdkmanager/libs/sdkuilib/tests/com/android/sdkuilib/internal/repository/UpdaterLogicTest.java b/sdkmanager/libs/sdkuilib/tests/com/android/sdkuilib/internal/repository/UpdaterLogicTest.java index 72229ff..84241d4 100755 --- a/sdkmanager/libs/sdkuilib/tests/com/android/sdkuilib/internal/repository/UpdaterLogicTest.java +++ b/sdkmanager/libs/sdkuilib/tests/com/android/sdkuilib/internal/repository/UpdaterLogicTest.java @@ -21,16 +21,13 @@ import com.android.sdklib.SdkManager; import com.android.sdklib.internal.avd.AvdManager;
import com.android.sdklib.internal.repository.Archive;
import com.android.sdklib.internal.repository.ITaskFactory;
-import com.android.sdklib.internal.repository.ITaskMonitor;
import com.android.sdklib.internal.repository.MockAddonPackage;
import com.android.sdklib.internal.repository.MockBrokenPackage;
import com.android.sdklib.internal.repository.MockPlatformPackage;
import com.android.sdklib.internal.repository.MockPlatformToolPackage;
import com.android.sdklib.internal.repository.MockToolPackage;
import com.android.sdklib.internal.repository.Package;
-import com.android.sdklib.internal.repository.SdkRepoSource;
import com.android.sdklib.internal.repository.SdkSource;
-import com.android.sdklib.internal.repository.SdkSourceCategory;
import com.android.sdklib.internal.repository.SdkSources;
import com.android.sdkuilib.internal.repository.icons.ImageFactory;
|