Add SdkUiLib tests to adt-tests.

Also fixes the create_tests_symlink for Windows.

SDK BUG 2040986

Change-Id: I7d549c265efb9dbb5936ed7c9a7798eefee52d9b
This commit is contained in:
Raphael
2009-10-07 21:57:50 -07:00
parent 7ce7a7835d
commit e3ae0fe73a
3 changed files with 21 additions and 3 deletions

View File

@@ -54,5 +54,6 @@ com.android.ide.eclipse.ddms/src/com/android/ddmuilib
com.android.ide.eclipse.tests/kxml2-2.3.0.jar
com.android.ide.eclipse.tests/unittests/com/android/ddmlib
com.android.ide.eclipse.tests/unittests/com/android/sdklib
com.android.ide.eclipse.tests/unittests/com/android/sdkuilib
com.android.ide.eclipse.tests/unittests/com/android/layoutlib

View File

@@ -5,6 +5,7 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="lib" path="/adt/sdklib.jar" sourcepath="/SdkLib"/>
<classpathentry kind="lib" path="/adt/sdkuilib.jar" sourcepath="/SdkUiLib"/>
<classpathentry kind="lib" path="/adt/layoutlib_api.jar" sourcepath="/layoutlib_api"/>
<classpathentry kind="lib" path="/adt/ninepatch.jar"/>
<classpathentry kind="lib" path="layoutlib.jar"/>

View File

@@ -15,6 +15,7 @@ HOST=`uname`
if [ "${HOST:0:6}" == "CYGWIN" ]; then
# We can't use symlinks under Cygwin
function cpdir() { # $1=dest $2=source
echo "rsync $2 => $1"
rsync -avW --delete-after $2 $1
}
@@ -32,17 +33,31 @@ BACK=`back $DEST`
HOST=`uname`
if [ "$HOST" == "Linux" ]; then
ln -svf $BACK/out/host/linux-x86/framework/kxml2-2.3.0.jar "$DEST/"
ln -svf $BACK/out/host/linux-x86/framework/layoutlib.jar "$DEST/"
ln -svf $BACK/out/host/linux-x86/framework/layoutlib.jar "$DEST/"
elif [ "$HOST" == "Darwin" ]; then
ln -svf $BACK/out/host/darwin-x86/framework/kxml2-2.3.0.jar "$DEST/"
ln -svf $BACK/out/host/darwin-x86/framework/layoutlib.jar "$DEST/"
ln -svf $BACK/out/host/darwin-x86/framework/layoutlib.jar "$DEST/"
elif [ "${HOST:0:6}" == "CYGWIN" ]; then
if [ ! -f "$DEST/kxml2-2.3.0.jar" ]; then
cp -v "prebuilt/common/kxml2/kxml2-2.3.0.jar" "$DEST/"
fi
cp -v "$BACK/out/host/windows/framework/layoutlib.jar" "$DEST/"
LIBS="layoutlib.jar sdkuilib.jar"
NEED_MAKE="yes"
for LIB in $LIBS ; do
SRCJAR="out/host/windows-x86/framework/$LIB"
DSTJAR="$DEST/$LIB"
if [[ $NEED_MAKE ]] && ! diff -q "$SRCJAR" "$DSTJAR" >/dev/null ; then
MAKE_LIBS="${LIBS//.jar/}"
echo "Make java libs: $MAKE_LIBS"
make -j3 showcommands $MAKE_LIBS || die "adt-tests: Failed to build one of $LIBS."
NEED_MAKE=""
fi
cp -v "$SRCJAR" "$DSTJAR"
done
chmod -v a+rx "$DEST"/*.jar
else
@@ -53,6 +68,7 @@ fi
DEST=$BASE/unittests/com/android
cpdir $DEST development/tools/ddms/libs/ddmlib/tests/src/com/android/ddmlib
cpdir $DEST development/tools/sdkmanager/libs/sdklib/tests/com/android/sdklib
cpdir $DEST development/tools/sdkmanager/libs/sdkuilib/tests/com/android/sdkuilib
DEST=$BASE/unittests/com/android/layoutlib
mkdir -p $DEST