Skip to content

Commit

Permalink
Make tests could build at external location [ci build]
Browse files Browse the repository at this point in the history
  • Loading branch information
halx99 committed May 2, 2021
1 parent 4d2a754 commit 3348f10
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 6 deletions.
17 changes: 16 additions & 1 deletion tests/cpp-empty-test/proj.android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
import java.nio.file.Paths
import java.nio.file.Files

def ENGINE_ROOT=Paths.get("${System.env.ENGINEX_ROOT}")
if(Files.exists(ENGINE_ROOT)) {
println("Determine ENGINE_JAVA_LIBPATH with system env var ENGINEX_ROOT")
ENGINE_ROOT = ENGINE_ROOT.toAbsolutePath().toString()
}
else {
println("Determine ENGINE_JAVA_LIBPATH with relative to settingsDir")
ENGINE_ROOT = settingsDir.getPath() + "/../../.."
}

def ENGINE_JAVA_LIBPATH = ENGINE_ROOT + '/cocos/platform/android/libcocos2dx';

include ':libcocos2dx'
project(':libcocos2dx').projectDir = new File(settingsDir, '../../../cocos/platform/android/libcocos2dx')
project(':libcocos2dx').projectDir = new File(ENGINE_JAVA_LIBPATH)
include ':CppEmptyTest'
project(':CppEmptyTest').projectDir = new File(settingsDir, 'app')
rootProject.name = "cpp-empty-test"
17 changes: 16 additions & 1 deletion tests/cpp-tests/proj.android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
import java.nio.file.Paths
import java.nio.file.Files

def ENGINE_ROOT=Paths.get("${System.env.ENGINEX_ROOT}")
if(Files.exists(ENGINE_ROOT)) {
println("Determine ENGINE_JAVA_LIBPATH with system env var ENGINEX_ROOT")
ENGINE_ROOT = ENGINE_ROOT.toAbsolutePath().toString()
}
else {
println("Determine ENGINE_JAVA_LIBPATH with relative to settingsDir")
ENGINE_ROOT = settingsDir.getPath() + "/../../.."
}

def ENGINE_JAVA_LIBPATH = ENGINE_ROOT + '/cocos/platform/android/libcocos2dx';

include ':libcocos2dx'
project(':libcocos2dx').projectDir = new File(settingsDir, '../../../cocos/platform/android/libcocos2dx')
project(':libcocos2dx').projectDir = new File(ENGINE_JAVA_LIBPATH)
include ':CppTests'
project(':CppTests').projectDir = new File(settingsDir, 'app')
rootProject.name = "cpp-tests"
17 changes: 16 additions & 1 deletion tests/fairygui-tests/proj.android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
import java.nio.file.Paths
import java.nio.file.Files

def ENGINE_ROOT=Paths.get("${System.env.ENGINEX_ROOT}")
if(Files.exists(ENGINE_ROOT)) {
println("Determine ENGINE_JAVA_LIBPATH with system env var ENGINEX_ROOT")
ENGINE_ROOT = ENGINE_ROOT.toAbsolutePath().toString()
}
else {
println("Determine ENGINE_JAVA_LIBPATH with relative to settingsDir")
ENGINE_ROOT = settingsDir.getPath() + "/../../.."
}

def ENGINE_JAVA_LIBPATH = ENGINE_ROOT + '/cocos/platform/android/libcocos2dx';

include ':libcocos2dx'
project(':libcocos2dx').projectDir = new File(settingsDir, '../../../cocos/platform/android/libcocos2dx')
project(':libcocos2dx').projectDir = new File(ENGINE_JAVA_LIBPATH)
include ':FairyGUITests'
project(':FairyGUITests').projectDir = new File(settingsDir, 'app')
rootProject.name = "fairygui-tests"
17 changes: 16 additions & 1 deletion tests/lua-empty-test/project/proj.android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
import java.nio.file.Paths
import java.nio.file.Files

def ENGINE_ROOT=Paths.get("${System.env.ENGINEX_ROOT}")
if(Files.exists(ENGINE_ROOT)) {
println("Determine ENGINE_JAVA_LIBPATH with system env var ENGINEX_ROOT")
ENGINE_ROOT = ENGINE_ROOT.toAbsolutePath().toString()
}
else {
println("Determine ENGINE_JAVA_LIBPATH with relative to settingsDir")
ENGINE_ROOT = settingsDir.getPath() + "/../../.."
}

def ENGINE_JAVA_LIBPATH = ENGINE_ROOT + '/cocos/platform/android/libcocos2dx';

include ':libcocos2dx'
project(':libcocos2dx').projectDir = new File(settingsDir, '../../../../cocos/platform/android/libcocos2dx')
project(':libcocos2dx').projectDir = new File(ENGINE_JAVA_LIBPATH)
include ':LuaEmptyTest'
project(':LuaEmptyTest').projectDir = new File(settingsDir, 'app')
rootProject.name = "lua-empty-test"
17 changes: 16 additions & 1 deletion tests/lua-tests/project/proj.android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
import java.nio.file.Paths
import java.nio.file.Files

def ENGINE_ROOT=Paths.get("${System.env.ENGINEX_ROOT}")
if(Files.exists(ENGINE_ROOT)) {
println("Determine ENGINE_JAVA_LIBPATH with system env var ENGINEX_ROOT")
ENGINE_ROOT = ENGINE_ROOT.toAbsolutePath().toString()
}
else {
println("Determine ENGINE_JAVA_LIBPATH with relative to settingsDir")
ENGINE_ROOT = settingsDir.getPath() + "/../../.."
}

def ENGINE_JAVA_LIBPATH = ENGINE_ROOT + '/cocos/platform/android/libcocos2dx';

include ':libcocos2dx'
project(':libcocos2dx').projectDir = new File(settingsDir, '../../../../cocos/platform/android/libcocos2dx')
project(':libcocos2dx').projectDir = new File(ENGINE_JAVA_LIBPATH)
include ':LuaTests'
project(':LuaTests').projectDir = new File(settingsDir, 'app')
rootProject.name = "lua-tests"
17 changes: 16 additions & 1 deletion tests/performance-tests/proj.android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
import java.nio.file.Paths
import java.nio.file.Files

def ENGINE_ROOT=Paths.get("${System.env.ENGINEX_ROOT}")
if(Files.exists(ENGINE_ROOT)) {
println("Determine ENGINE_JAVA_LIBPATH with system env var ENGINEX_ROOT")
ENGINE_ROOT = ENGINE_ROOT.toAbsolutePath().toString()
}
else {
println("Determine ENGINE_JAVA_LIBPATH with relative to settingsDir")
ENGINE_ROOT = settingsDir.getPath() + "/../../.."
}

def ENGINE_JAVA_LIBPATH = ENGINE_ROOT + '/cocos/platform/android/libcocos2dx';

include ':libcocos2dx'
project(':libcocos2dx').projectDir = new File(settingsDir, '../../../cocos/platform/android/libcocos2dx')
project(':libcocos2dx').projectDir = new File(ENGINE_JAVA_LIBPATH)
include ':performance-tests'
project(':performance-tests').projectDir = new File(settingsDir, 'app')
rootProject.name = "performance-tests"

0 comments on commit 3348f10

Please sign in to comment.