diff options
author | Jean-Marie Henaff <jmhenaff@google.com> | 2017-06-08 15:20:13 +0200 |
---|---|---|
committer | Jean-Marie Henaff <jmhenaff@google.com> | 2017-06-08 15:20:13 +0200 |
commit | 39587a8d4dbcb86c77be33258d7b1272534cbe4c (patch) | |
tree | b4c6a89ad2499329c9d230a2499844a9459db003 /build.gradle | |
parent | 0b17c70cc42e43309a5a2c82f00fa69d42e13494 (diff) | |
download | r8-39587a8d4dbcb86c77be33258d7b1272534cbe4c.tar.gz |
Enable test without runtime to run on Windows
This is a first attempt to run R8 tests on windows
until support is fully implemented to use
device and emulators in place of host runtimes.
Tests which require ART are skipped (about 300 out of 2000).
As for today, some smali tests fail (11) due to the
lack of port of the dexmerger script, which prevents
from generating the dex files the tests rely on.
Bug:
Change-Id: Ia558189605f677cd6ce7ab71c24155f4a7e15ea8
Diffstat (limited to 'build.gradle')
-rw-r--r-- | build.gradle | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/build.gradle b/build.gradle index eb09333f2..f85dd6b83 100644 --- a/build.gradle +++ b/build.gradle @@ -98,7 +98,8 @@ dependencies { examplesAndroidOCompile group: 'org.ow2.asm', name: 'asm', version: '5.1' } -def osString = OperatingSystem.current().isLinux() ? "linux" : "mac" +def osString = OperatingSystem.current().isLinux() ? "linux" : + OperatingSystem.current().isMacOsX() ? "mac" : "windows" def cloudDependencies = [ "tests" : [ @@ -370,7 +371,11 @@ task buildDebugInfoExamplesDex { } task "dex_debuginfo_examples"(type: Exec, dependsOn: ["jar_debuginfo_examples", "downloadDeps"]) { - executable file("tools/linux/dx/bin/dx"); + if (OperatingSystem.current().isWindows()) { + executable file("tools/windows/dx/bin/dx.bat") + } else { + executable file("tools/linux/dx/bin/dx"); + } args "--dex" args "--output=build/test/${hostDexJar}" args "build/test/${hostJar}" @@ -560,11 +565,12 @@ task buildExampleAndroidOJars { } task buildExamples { - if (OperatingSystem.current().isMacOsX()) { - logger.lifecycle("WARNING: Testing (including building examples) is only partially supported on Mac OS.") + if (OperatingSystem.current().isMacOsX() || OperatingSystem.current().isWindows()) { + logger.lifecycle("WARNING: Testing (including building examples) is only partially supported on your " + + "platform (" + OperatingSystem.current().getName() + ").") } else if (!OperatingSystem.current().isLinux()) { logger.lifecycle("WARNING: Testing (including building examples) is not supported on your platform. " + - "It is fully supported on Linux and partially supported on Mac OS") + "It is fully supported on Linux and partially supported on Mac OS and Windows") return; } dependsOn buildDebugTestResourcesJars @@ -725,12 +731,18 @@ test { systemProperty 'jctf_compile_only', '1' } - if (OperatingSystem.current().isLinux() || OperatingSystem.current().isMacOsX()) { + if (OperatingSystem.current().isLinux() + || OperatingSystem.current().isMacOsX() + || OperatingSystem.current().isWindows()) { if (OperatingSystem.current().isMacOsX()) { logger.lifecycle("WARNING: Testing in only partially supported on Mac OS. " + "Art only runs on Linux and tests requiring Art runs in a Docker container, which must be present. " + "See tools/docker/README.md for details.") } + if (OperatingSystem.current().isWindows()) { + logger.lifecycle("WARNING: Testing in only partially supported on Windows. " + + "Art only runs on Linux and tests requiring Art will be skipped") + } dependsOn downloadDeps dependsOn buildExamples dependsOn buildSmali @@ -740,7 +752,7 @@ test { dependsOn buildPreNJdwpTestsJar } else { logger.lifecycle("WARNING: Testing in not supported on your platform. Testing is only fully supported on " + - "Linux and partially supported on Mac OS. Art does not run on other platforms.") + "Linux and partially supported on Mac OS and Windows. Art does not run on other platforms.") } } |