You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ky...@apache.org on 2017/09/07 08:18:24 UTC
[07/14] incubator-weex git commit: * [test] android jacoco build ops
* [test] android jacoco build ops
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/a17c00f5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/a17c00f5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/a17c00f5
Branch: refs/heads/0.16-dev
Commit: a17c00f5240f68df5c742442be93281eb0ba199e
Parents: 419a1b2
Author: atomtong <to...@qq.com>
Authored: Tue Sep 5 17:33:22 2017 +0800
Committer: atomtong <to...@qq.com>
Committed: Tue Sep 5 17:33:22 2017 +0800
----------------------------------------------------------------------
android/playground/app/build.gradle | 2 +-
test/run.sh | 18 +++++++++++++++---
2 files changed, 16 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a17c00f5/android/playground/app/build.gradle
----------------------------------------------------------------------
diff --git a/android/playground/app/build.gradle b/android/playground/app/build.gradle
index d023e84..145cbd7 100755
--- a/android/playground/app/build.gradle
+++ b/android/playground/app/build.gradle
@@ -42,7 +42,7 @@ android {
}
buildTypes {
debug {
- testCoverageEnabled true
+ testCoverageEnabled false
}
}
sourceSets {
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a17c00f5/test/run.sh
----------------------------------------------------------------------
diff --git a/test/run.sh b/test/run.sh
index bc343a6..c7909cf 100755
--- a/test/run.sh
+++ b/test/run.sh
@@ -17,12 +17,24 @@ function buildAndroid {
builddir=$dir'/android'
current_dir=$PWD;
cd $builddir;
- ./gradlew assembleDebug;
+ if [ $needCoverage = "cover" ]; then
+ ./gradlew clean assembleDebug -Dmtl.jaCoCoConfig.whitePkgs=com.taobao.weex -Dmtl.jaCoCoConfig.blackPkgs=com.google.zxing.*;
+ fi
+ ./gradlew clean assembleDebug
cd $current_dir;
pwd
}
function runAndroid {
- buildAndroid
+ echo 'Run in Android...'
+ echo $1
+ echo $2
+
+ dir=$(pwd)
+ builddir=$dir'/android'
+ codeCoveragedir=$builddir'/plarground'
+ current_dir=$PWD;
+
+ buildAndroid $2
startMacacaServer
startWeexServer
platform=android ./node_modules/mocha/bin/mocha $1 --reporter mocha-simple-html-reporter --reporter-options output=report.html -f '@ignore-android' -i --recursive --bail --verbose --retries 3
@@ -80,7 +92,7 @@ needCoverage=${2:-$coverage_status}
killserver
#run tests
if [ $platform = $platform_android ]; then
- runAndroid ./test/scripts/
+ runAndroid ./test/scripts/ "$needCoverage"
elif [ $platform = 'web' ];
then
runWeb ./test/scripts/