You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by so...@apache.org on 2017/06/12 04:28:51 UTC

incubator-weex git commit: * [test] parameter test serve port

Repository: incubator-weex
Updated Branches:
  refs/heads/0.14-dev 2f748ac8d -> 202c180bb


* [test] parameter test serve port


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/202c180b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/202c180b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/202c180b

Branch: refs/heads/0.14-dev
Commit: 202c180bb79b31bf8ead8378f60967d048c868a0
Parents: 2f748ac
Author: sospartan <so...@apache.org>
Authored: Mon Jun 12 12:28:36 2017 +0800
Committer: sospartan <so...@apache.org>
Committed: Mon Jun 12 12:28:36 2017 +0800

----------------------------------------------------------------------
 test/run.sh          | 4 +++-
 test/scripts/util.js | 5 +++--
 test/serve.sh        | 3 ++-
 3 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/202c180b/test/run.sh
----------------------------------------------------------------------
diff --git a/test/run.sh b/test/run.sh
index 7589af8..edeb4a2 100755
--- a/test/run.sh
+++ b/test/run.sh
@@ -1,5 +1,6 @@
 #!/bin/bash -eu
 set -e
+port="${serport:-12581}"
 
 function startMacacaServer {
     macaca server --verbose &
@@ -7,7 +8,8 @@ function startMacacaServer {
 }
 
 function startWeexServer {
-    while ! nc -z 127.0.0.1 12581; do sleep 5; done
+    echo "local serve at port:$port"
+    while ! nc -z 127.0.0.1 $port; do sleep 5; done
 }
 
 function buildAndroid {

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/202c180b/test/scripts/util.js
----------------------------------------------------------------------
diff --git a/test/scripts/util.js b/test/scripts/util.js
index 23c2cae..50bf9ee 100644
--- a/test/scripts/util.js
+++ b/test/scripts/util.js
@@ -24,6 +24,7 @@ var fs = require('fs')
 const BlinkDiff = require('blink-diff');
 
 var platform = process.env.platform || 'android';
+const servePort = process.env.serport || 12581
 platform = platform.toLowerCase();
 var browser = process.env.browser || '';
 
@@ -113,9 +114,9 @@ module.exports = {
     getPage:function(name){
         let url
         if(browser){
-             url = 'http://'+ getIpAddress()+':12581/vue.html?page=/test/build-web'+name
+             url = 'http://'+ getIpAddress()+':'+servePort+'/vue.html?page=/test/build-web'+name
         }else{
-            url = 'wxpage://' + getIpAddress()+":12581/test/build"+name;
+            url = 'wxpage://' + getIpAddress()+":"+servePort+"/test/build"+name;
         }
         console.log(url)
         return url

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/202c180b/test/serve.sh
----------------------------------------------------------------------
diff --git a/test/serve.sh b/test/serve.sh
index 1b3f18a..83babf9 100755
--- a/test/serve.sh
+++ b/test/serve.sh
@@ -1,4 +1,5 @@
 #!/bin/bash -eu
 npm run build:vue
 npm run build:ci &
-npm run serve:ui-test 
\ No newline at end of file
+port="${serport:-12581}"
+npm run serve ./ -p $port
\ No newline at end of file