Brought back the Standalone and Linker tests into backend.native:tests:run.
This commit is contained in:
committed by
alexander-gorshenev
parent
8c72f0a629
commit
33d895fcf7
@@ -146,7 +146,7 @@ def tasksOf(Closure<Task> filter) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
run {
|
run {
|
||||||
def tasks = tasksOf { it instanceof RunKonanTest && !(it instanceof RunStdlibTest) }
|
def tasks = tasksOf { it instanceof KonanTest && it.inDevelopersRun }
|
||||||
dependsOn(tasks)
|
dependsOn(tasks)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2419,10 +2419,13 @@ if (isMac()) {
|
|||||||
|
|
||||||
task jsinterop_math(type: RunStandaloneKonanTest) {
|
task jsinterop_math(type: RunStandaloneKonanTest) {
|
||||||
doFirst {
|
doFirst {
|
||||||
|
def jsinteropScript = isWindows() ? "jsinterop.bat" : "jsinterop"
|
||||||
|
def jsinterop = "$distDir/bin/$jsinteropScript"
|
||||||
// TODO: We probably need a NativeInteropPlugin for jsinterop?
|
// TODO: We probably need a NativeInteropPlugin for jsinterop?
|
||||||
"jsinterop -pkg kotlinx.interop.wasm.math -o $buildDir/jsmath -target wasm32".execute()
|
"$jsinterop -pkg kotlinx.interop.wasm.math -o $buildDir/jsmath -target wasm32".execute().waitFor()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
dependsOn ':wasm32PlatformLibs'
|
||||||
disabled = (project.testTarget != 'wasm32')
|
disabled = (project.testTarget != 'wasm32')
|
||||||
goldValue = "e = 2.718281828459045, pi = 3.141592653589793, sin(pi) = 1.2246467991473532E-16, sin(pi/2) = 1.0, ln(1) = 0.0, ln(e) = 1.0\n"
|
goldValue = "e = 2.718281828459045, pi = 3.141592653589793, sin(pi) = 1.2246467991473532E-16, sin(pi/2) = 1.0, ln(1) = 0.0, ln(e) = 1.0\n"
|
||||||
source = "jsinterop/math.kt"
|
source = "jsinterop/math.kt"
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ import javax.inject.Inject
|
|||||||
import java.util.regex.Pattern
|
import java.util.regex.Pattern
|
||||||
|
|
||||||
abstract class KonanTest extends JavaExec {
|
abstract class KonanTest extends JavaExec {
|
||||||
|
public boolean inDevelopersRun = false
|
||||||
|
|
||||||
public String source
|
public String source
|
||||||
def targetManager = new TargetManager(project.testTarget)
|
def targetManager = new TargetManager(project.testTarget)
|
||||||
def target = targetManager.target
|
def target = targetManager.target
|
||||||
@@ -390,6 +392,8 @@ class BuildKonanTest extends ExtKonanTest {
|
|||||||
* Runs test built with Konan's TestRunner
|
* Runs test built with Konan's TestRunner
|
||||||
*/
|
*/
|
||||||
class RunKonanTest extends ExtKonanTest {
|
class RunKonanTest extends ExtKonanTest {
|
||||||
|
public def inDevelopersRun = true
|
||||||
|
|
||||||
public def buildTaskName = 'buildKonanTests'
|
public def buildTaskName = 'buildKonanTests'
|
||||||
public def runnerLogger = Logger.SILENT
|
public def runnerLogger = Logger.SILENT
|
||||||
public def useFilter = true
|
public def useFilter = true
|
||||||
@@ -437,6 +441,7 @@ class RunKonanTest extends ExtKonanTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class RunStdlibTest extends RunKonanTest {
|
class RunStdlibTest extends RunKonanTest {
|
||||||
|
public def inDevelopersRun = false
|
||||||
|
|
||||||
RunStdlibTest() {
|
RunStdlibTest() {
|
||||||
super('buildKonanStdlibTests')
|
super('buildKonanStdlibTests')
|
||||||
@@ -447,6 +452,8 @@ class RunStdlibTest extends RunKonanTest {
|
|||||||
* Compiles and executes test as a standalone binary
|
* Compiles and executes test as a standalone binary
|
||||||
*/
|
*/
|
||||||
class RunStandaloneKonanTest extends KonanTest {
|
class RunStandaloneKonanTest extends KonanTest {
|
||||||
|
public def inDevelopersRun = true
|
||||||
|
|
||||||
void compileTest(List<String> filesToCompile, String exe) {
|
void compileTest(List<String> filesToCompile, String exe) {
|
||||||
runCompiler(filesToCompile, exe, flags?:[])
|
runCompiler(filesToCompile, exe, flags?:[])
|
||||||
}
|
}
|
||||||
@@ -521,6 +528,8 @@ class RunInteropKonanTest extends KonanTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class LinkKonanTest extends KonanTest {
|
class LinkKonanTest extends KonanTest {
|
||||||
|
public def inDevelopersRun = true
|
||||||
|
|
||||||
protected String lib
|
protected String lib
|
||||||
|
|
||||||
void compileTest(List<String> filesToCompile, String exe) {
|
void compileTest(List<String> filesToCompile, String exe) {
|
||||||
@@ -564,6 +573,7 @@ class DynamicKonanTest extends KonanTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
class RunExternalTestGroup extends RunStandaloneKonanTest {
|
class RunExternalTestGroup extends RunStandaloneKonanTest {
|
||||||
|
def inDevelopersRun = false
|
||||||
|
|
||||||
def groupDirectory = "."
|
def groupDirectory = "."
|
||||||
def outputSourceSetName = "testOutputExternal"
|
def outputSourceSetName = "testOutputExternal"
|
||||||
|
|||||||
@@ -25,10 +25,12 @@ THREAD_LOCAL_VARIABLE long long storage;
|
|||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
||||||
|
RUNTIME_USED
|
||||||
KDouble ReturnSlot_getDouble() {
|
KDouble ReturnSlot_getDouble() {
|
||||||
return *reinterpret_cast<KDouble*>(&::storage);
|
return *reinterpret_cast<KDouble*>(&::storage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RUNTIME_USED
|
||||||
void ReturnSlot_setDouble(KInt upper, KInt lower) {
|
void ReturnSlot_setDouble(KInt upper, KInt lower) {
|
||||||
reinterpret_cast<KInt*>(&::storage)[0] = lower;
|
reinterpret_cast<KInt*>(&::storage)[0] = lower;
|
||||||
reinterpret_cast<KInt*>(&::storage)[1] = upper;
|
reinterpret_cast<KInt*>(&::storage)[1] = upper;
|
||||||
|
|||||||
Reference in New Issue
Block a user