deqp_dir := $(LOCAL_PATH)/
LOCAL_MODULE_TAGS := tests
-LOCAL_MODULE := libtestercore
+LOCAL_MODULE := libdeqp
LOCAL_SRC_FILES := \
execserver/xsDefs.cpp \
execserver/xsExecutionServer.cpp \
include_directories(framework/platform/android)
include_directories(executor)
- add_library(testercore SHARED framework/platform/android/tcuAndroidMain.cpp framework/platform/android/tcuAndroidJNI.cpp framework/platform/android/tcuTestLogParserJNI.cpp ${DEQP_MODULE_ENTRY_POINTS})
- target_link_libraries(testercore tcutil-platform xecore ${DEQP_MODULE_LIBRARIES})
+ add_library(deqp SHARED framework/platform/android/tcuAndroidMain.cpp framework/platform/android/tcuAndroidJNI.cpp framework/platform/android/tcuTestLogParserJNI.cpp ${DEQP_MODULE_ENTRY_POINTS})
+ target_link_libraries(deqp tcutil-platform xecore ${DEQP_MODULE_LIBRARIES})
elseif (DE_OS_IS_IOS)
# Code sign identity
LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := $(call all-java-files-under,src)
-LOCAL_JNI_SHARED_LIBRARIES := libtestercore
+LOCAL_JNI_SHARED_LIBRARIES := libdeqp
LOCAL_ASSET_DIR := $(LOCAL_PATH)/../../data
LOCAL_PACKAGE_NAME := com.drawelements.deqp
android:exported="true"
android:process=":testercore">
<meta-data android:name="android.app.lib_name"
- android:value="testercore" />
+ android:value="deqp" />
<meta-data android:name="android.app.func_name"
android:value="createTestActivity" />
</activity>
public class ExecService extends Service {
static {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {
- System.loadLibrary("testercore");
- } else {
- // Pre-gingerbread version without EGL tests.
- System.loadLibrary("testercore_legacy");
- }
+ System.loadLibrary("deqp");
}
long m_server = 0; //!< Server pointer.
public class TestLogParser
{
static {
- System.loadLibrary("testercore");
+ System.loadLibrary("deqp");
}
private long m_nativePointer;
def getAssetsDir (nativeLib, buildType):
return os.path.join(getNativeBuildDir(nativeLib, buildType), "assets")
+def getPrebuiltsDirName (abiName):
+ PREBUILT_DIRS = {
+ 'x86': 'android-x86',
+ 'armeabi-v7a': 'android-arm',
+ 'arm64-v8a': 'android-arm64'
+ }
+
+ if not abiName in PREBUILT_DIRS:
+ raise Exception("Unknown ABI %s, don't know where prebuilts are" % abiName)
+
+ return PREBUILT_DIRS[abiName]
+
def buildNative (nativeLib, buildType):
deqpDir = os.path.normpath(os.path.join(common.ANDROID_DIR, ".."))
buildDir = getNativeBuildDir(nativeLib, buildType)
libsDir = os.path.join(BASE_LIBS_DIR, nativeLib.abiVersion)
- srcLibFile = os.path.join(buildDir, "libtestercore.so")
- dstLibFile = os.path.join(libsDir, "lib%s.so" % nativeLib.libName)
+ srcLibFile = os.path.join(buildDir, common.NATIVE_LIB_NAME)
+ dstLibFile = os.path.join(libsDir, common.NATIVE_LIB_NAME)
# Make build directory if necessary
if not os.path.exists(buildDir):
if not os.path.exists(libsDir):
os.makedirs(libsDir)
- # Copy libtestercore.so
shutil.copyfile(srcLibFile, dstLibFile)
# Copy gdbserver for debugging
if buildType.lower() == "debug":
- if nativeLib.abiVersion == "x86":
- shutil.copyfile(os.path.join(common.ANDROID_NDK_PATH, "prebuilt/android-x86/gdbserver/gdbserver"), os.path.join(libsDir, "gdbserver"))
- elif nativeLib.abiVersion == "armeabi-v7a":
- shutil.copyfile(os.path.join(common.ANDROID_NDK_PATH, "prebuilt/android-arm/gdbserver/gdbserver"), os.path.join(libsDir, "gdbserver"))
- else:
- print("Unknown ABI. Won't copy gdbserver to package")
- elif os.path.exists(os.path.join(libsDir, "gdbserver")):
- # Make sure there is no gdbserver if build is not debug build
- os.unlink(os.path.join(libsDir, "gdbserver"))
+ srcGdbserverPath = os.path.join(common.ANDROID_NDK_PATH, 'prebuilt', getPrebuiltsDirName(nativeLib.abiVersion), 'gdbserver', 'gdbserver')
+ dstGdbserverPath = os.path.join(libsDir, 'gdbserver')
+ shutil.copyfile(srcGdbserverPath, dstGdbserverPath)
+ else:
+ assert not os.path.exists(os.path.join(libsDir, "gdbserver"))
def buildApp (isRelease):
appDir = os.path.join(common.ANDROID_DIR, "package")
import multiprocessing
class NativeLib:
- def __init__ (self, libName, apiVersion, abiVersion):
- self.libName = libName
- self.apiVersion = apiVersion
- self.abiVersion = abiVersion
+ def __init__ (self, apiVersion, abiVersion):
+ self.apiVersion = apiVersion
+ self.abiVersion = abiVersion
def getPlatform ():
if sys.platform.startswith('linux'):
# Build configuration
NATIVE_LIBS = [
- # library name API ABI
- NativeLib("testercore", 13, "armeabi-v7a"), # ARM v7a ABI
- NativeLib("testercore", 13, "x86"), # x86
- NativeLib("testercore", 21, "arm64-v8a"), # ARM64 v8a ABI
+ # API ABI
+ NativeLib(13, "armeabi-v7a"), # ARM v7a ABI
+ NativeLib(13, "x86"), # x86
+ NativeLib(21, "arm64-v8a"), # ARM64 v8a ABI
]
ANDROID_JAVA_API = "android-13"
+NATIVE_LIB_NAME = "libdeqp.so"
# NDK paths
ANDROID_NDK_PATH = selectFirstExistingDir([
print("Pull library %s from device" % lib)
common.execute("%s pull %s" % (adbCmd, lib))
- print("Copy libtestercore.so from build dir")
- shutil.copyfile(os.path.join(buildDir, "libtestercore.so"), "libtestercore.so")
+ print("Copy %s from build dir" % common.NATIVE_LIB_NAME)
+ shutil.copyfile(os.path.join(buildDir, common.NATIVE_LIB_NAME), common.NATIVE_LIB_NAME)
# Forward local port for jdb
print("Forward local port to jdb port")