openwhisk-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rab...@apache.org
Subject [openwhisk] branch master updated: Move out standalone server tests to a new Travis profile (#4657)
Date Thu, 03 Oct 2019 01:38:29 GMT
This is an automated email from the ASF dual-hosted git repository.

rabbah pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk.git


The following commit(s) were added to refs/heads/master by this push:
     new 41d74c1  Move out standalone server tests to a new Travis profile (#4657)
41d74c1 is described below

commit 41d74c188acfee134fb09c9b5fbe15cd932fe769
Author: Chetan Mehrotra <chetanm@apache.org>
AuthorDate: Thu Oct 3 07:08:14 2019 +0530

    Move out standalone server tests to a new Travis profile (#4657)
---
 .travis.yml                                        |  4 +++
 .../downloadcli-github.yml                         | 39 +++++++++-------------
 tests/build.gradle                                 |  9 +++--
 .../{runUnitTests.sh => runStandaloneTests.sh}     | 19 ++++++-----
 tools/travis/runUnitTests.sh                       |  4 ---
 5 files changed, 35 insertions(+), 40 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index d6a33f6..968028b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -79,6 +79,10 @@ jobs:
       - ./tools/travis/checkAndUploadLogs.sh multi-runtime
       name: "Multi-Runtime Tests"
     - script:
+        - ./tools/travis/runStandaloneTests.sh
+        - ./tools/travis/checkAndUploadLogs.sh standalone
+      name: "Standalone Tests"
+    - script:
         - ./tests/performance/preparation/deploy.sh
         - TERM=dumb ./tests/performance/wrk_tests/latency.sh "https://172.17.0.1:10001" "$(cat
ansible/files/auth.guest)" ./tests/performance/preparation/actions/noop.js 2m
         - TERM=dumb ./tests/performance/wrk_tests/latency.sh "https://172.17.0.1:10001" "$(cat
ansible/files/auth.guest)" ./tests/performance/preparation/actions/async.js 2m
diff --git a/tools/travis/runUnitTests.sh b/ansible/downloadcli-github.yml
old mode 100755
new mode 100644
similarity index 56%
copy from tools/travis/runUnitTests.sh
copy to ansible/downloadcli-github.yml
index c6fc63e..967b910
--- a/tools/travis/runUnitTests.sh
+++ b/ansible/downloadcli-github.yml
@@ -1,5 +1,3 @@
-#!/usr/bin/env bash
-
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -16,25 +14,18 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-
-set -e
-
-SCRIPTDIR=$(cd $(dirname "$0") && pwd)
-ROOTDIR="$SCRIPTDIR/../.."
-
-cd $ROOTDIR/tools/travis
-export ORG_GRADLE_PROJECT_testSetName="REQUIRE_ONLY_DB"
-
-./scan.sh
-
-./setupPrereq.sh
-
-cat "$ROOTDIR/tests/src/test/resources/application.conf"
-
-./distDocker.sh
-
-./runTests.sh
-
-cd $ROOTDIR
-TERM=dumb ./gradlew :core:standalone:cleanTest :core:standalone:test
-
+---
+# This playbook is used to download cli from Github and copy directly to bin
+
+- hosts: ansible
+  tasks:
+  - name: grab the local CLI from the Github
+    unarchive:
+      src: "{{ openwhisk_cli.remote.location }}/{{ openwhisk_cli.archive_name}}-{{ openwhisk_cli_tag
}}-{{os}}-{{arch}}.{{ext}}"
+      dest: "{{ openwhisk_home }}/bin"
+      mode: "0755"
+      remote_src: yes
+    vars:
+      arch: "{{ ansible_machine | replace ('x86_64', 'amd64') }}"
+      os: "{{ ansible_system | lower | replace('darwin', 'mac') }}"
+      ext: "{{ ( ansible_system in ['Windows', 'Darwin']) | ternary('zip', 'tgz') }}"
diff --git a/tests/build.gradle b/tests/build.gradle
index 5def20f..0894958 100644
--- a/tests/build.gradle
+++ b/tests/build.gradle
@@ -81,9 +81,7 @@ ext.testSets = [
         ]
     ],
     "REQUIRE_SYSTEM" : [
-        "includes" : systemIncludes + [
-            "org/apache/openwhisk/standalone/**"
-        ],
+        "includes" : systemIncludes,
         "excludes": [
             "system/basic/WskMultiRuntimeTests*",
             'invokerShoot/**'
@@ -113,6 +111,11 @@ ext.testSets = [
             "system/basic/WskMultiRuntimeTests*",
             "invokerShoot/**"
         ]
+    ],
+    "REQUIRE_STANDALONE" : [
+        "includes" : [
+            "org/apache/openwhisk/standalone/**"
+        ]
     ]
 ]
 
diff --git a/tools/travis/runUnitTests.sh b/tools/travis/runStandaloneTests.sh
similarity index 73%
copy from tools/travis/runUnitTests.sh
copy to tools/travis/runStandaloneTests.sh
index c6fc63e..737c70d 100755
--- a/tools/travis/runUnitTests.sh
+++ b/tools/travis/runStandaloneTests.sh
@@ -22,19 +22,20 @@ set -e
 SCRIPTDIR=$(cd $(dirname "$0") && pwd)
 ROOTDIR="$SCRIPTDIR/../.."
 
-cd $ROOTDIR/tools/travis
-export ORG_GRADLE_PROJECT_testSetName="REQUIRE_ONLY_DB"
-
-./scan.sh
-
-./setupPrereq.sh
+export ORG_GRADLE_PROJECT_testSetName="REQUIRE_STANDALONE"
+export GRADLE_COVERAGE=true
 
-cat "$ROOTDIR/tests/src/test/resources/application.conf"
+cd $ROOTDIR/ansible
+$ANSIBLE_CMD setup.yml
+$ANSIBLE_CMD properties.yml -e manifest_file="/ansible/files/runtimes-nodeonly.json"
+$ANSIBLE_CMD downloadcli-github.yml
 
-./distDocker.sh
+cd $ROOTDIR
+TERM=dumb ./gradlew :core:standalone:build
+TERM=dumb ./gradlew :core:monitoring:user-events:distDocker
 
+cd $ROOTDIR/tools/travis
 ./runTests.sh
 
 cd $ROOTDIR
 TERM=dumb ./gradlew :core:standalone:cleanTest :core:standalone:test
-
diff --git a/tools/travis/runUnitTests.sh b/tools/travis/runUnitTests.sh
index c6fc63e..762aea6 100755
--- a/tools/travis/runUnitTests.sh
+++ b/tools/travis/runUnitTests.sh
@@ -34,7 +34,3 @@ cat "$ROOTDIR/tests/src/test/resources/application.conf"
 ./distDocker.sh
 
 ./runTests.sh
-
-cd $ROOTDIR
-TERM=dumb ./gradlew :core:standalone:cleanTest :core:standalone:test
-


Mime
View raw message