You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/05/14 18:48:30 UTC

[GitHub] csantanapr closed pull request #3613: Split test jobs in Travis

csantanapr closed pull request #3613: Split test jobs in Travis
URL: https://github.com/apache/incubator-openwhisk/pull/3613
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.travis.yml b/.travis.yml
index 395d04eeef..e37432e21a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -48,7 +48,6 @@ notifications:
 before_install:
   - pip install --upgrade pip setuptools six
   - pip3 install --upgrade pip setuptools six
-  - ./tools/travis/flake8.sh  # Check Python files for style and stop the build on syntax errors
 
 install:
   - ./tools/travis/setup.sh
@@ -56,10 +55,13 @@ install:
 jobs:
   include:
     - script:
-        - ./tools/travis/build.sh
-        - ansible-playbook -i ansible/environments/local ansible/logs.yml # collect logs regardless of build exit
-        - ./tools/travis/box-upload.py "$TRAVIS_BUILD_DIR/logs" "$TRAVIS_BUILD_ID-$TRAVIS_BRANCH.tar.gz"
-      env: DESCRIPTION="Execute test suite."
+        - ./tools/travis/runUnitTests.sh
+        - ./tools/travis/checkAndUploadLogs.sh unit db
+      env: DESCRIPTION="Unit Tests"
+    - script:
+       - ./tools/travis/runSystemTests.sh
+       - ./tools/travis/checkAndUploadLogs.sh system
+      env: DESCRIPTION="System Tests"
     - script:
         - ./performance/preparation/deploy.sh
         - TERM=dumb ./performance/wrk_tests/latency.sh "https://172.17.0.1:10001" "$(cat ansible/files/auth.guest)" 2m
diff --git a/ansible/logs.yml b/ansible/logs.yml
index 3182199e24..30c7bd3d53 100644
--- a/ansible/logs.yml
+++ b/ansible/logs.yml
@@ -72,3 +72,4 @@
   - name: fetch logs from all machines
     synchronize: src="{{ whisk_logs_dir }}/" dest="{{ openwhisk_home }}/logs" mode=pull
     when: "'machine' not in exclude_logs_from"
+    ignore_errors: true
diff --git a/common/scala/src/main/scala/whisk/core/database/memory/MemoryArtifactStore.scala b/common/scala/src/main/scala/whisk/core/database/memory/MemoryArtifactStore.scala
index 0b96d06a6a..e22865266a 100644
--- a/common/scala/src/main/scala/whisk/core/database/memory/MemoryArtifactStore.scala
+++ b/common/scala/src/main/scala/whisk/core/database/memory/MemoryArtifactStore.scala
@@ -240,10 +240,16 @@ class MemoryArtifactStore[DocumentAbstraction <: DocumentSerializer](dbName: Str
   override protected[core] def readAttachment[T](doc: DocInfo, name: String, sink: Sink[ByteString, Future[T]])(
     implicit transid: TransactionId): Future[(ContentType, T)] = {
     //TODO Temporary implementation till MemoryAttachmentStore PR is merged
+    val start = transid.started(
+      this,
+      LoggingMarkers.DATABASE_ATT_GET,
+      s"[ATT_GET] '$dbName' finding attachment '$name' of document '$doc'")
+
     artifacts.get(doc.id.id) match {
       case Some(a: Artifact) if a.attachments.contains(name) =>
         val attachment = a.attachments(name)
         val r = Source.single(attachment.bytes).toMat(sink)(Keep.right).run
+        transid.finished(this, start, s"[ATT_GET] '$dbName' completed: found attachment '$name' of document '$doc'")
         r.map(t => (attachment.contentType, t))
       case None =>
         Future.failed(NoDocumentException("Not found on 'readAttachment'."))
@@ -260,6 +266,11 @@ class MemoryArtifactStore[DocumentAbstraction <: DocumentSerializer](dbName: Str
     contentType: ContentType,
     docStream: Source[ByteString, _])(implicit transid: TransactionId): Future[DocInfo] = {
 
+    val start = transid.started(
+      this,
+      LoggingMarkers.DATABASE_ATT_SAVE,
+      s"[ATT_PUT] '$dbName' uploading attachment '$name' of document '$doc'")
+
     //TODO Temporary implementation till MemoryAttachmentStore PR is merged
     val f = docStream.runFold(new ByteStringBuilder)((builder, b) => builder ++= b)
     val g = f
@@ -269,6 +280,8 @@ class MemoryArtifactStore[DocumentAbstraction <: DocumentSerializer](dbName: Str
             val existing = Artifact(doc, a.doc, a.computed)
             val updated = existing.attach(name, Attachment(b.result().compact, contentType))
             if (artifacts.replace(doc.id.id, existing, updated)) {
+              transid
+                .finished(this, start, s"[ATT_PUT] '$dbName' completed uploading attachment '$name' of document '$doc'")
               updated.docInfo
             } else {
               throw DocumentConflictException("conflict on 'put'")
diff --git a/tests/README.md b/tests/README.md
new file mode 100644
index 0000000000..e2c37eb9a4
--- /dev/null
+++ b/tests/README.md
@@ -0,0 +1,36 @@
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+# Running Tests
+
+This module hosts all the unit and integration test for this repo. Command examples given below are meant to be executed
+from project root.
+
+To run all tests
+
+    $ ./gradlew tests:test
+
+This requires the OpenWhisk system to be setup and running locally.
+
+## Running Unit Tests
+
+To just run the unit tests
+
+    $ ansible-playbook -i ansible/environments/local ansible/properties.yml
+    $ ./gradlew tests:testUnit
diff --git a/tests/build.gradle b/tests/build.gradle
index e50751b2c0..c1c435660b 100644
--- a/tests/build.gradle
+++ b/tests/build.gradle
@@ -1,4 +1,5 @@
 import org.scoverage.ScoverageReport
+import static groovy.json.JsonOutput.*
 
 apply plugin: 'scala'
 apply plugin: 'eclipse'
@@ -29,12 +30,91 @@ def leanExcludes = [
     '**/*Java*',
     '**/*ThrottleTests*',
     '**/MaxActionDurationTests*',
-    '**/*ApiGwRestBasicTests*',
-    '**/*WskCli*'
 ]
 
+ext.testSets = [
+    "REQUIRE_ONLY_DB" : [
+        "includes" : [
+            "actionContainers/**",
+            "ha/**",
+            "whisk/**"
+        ],
+        "excludes" : [
+            "whisk/core/admin/**",
+            "whisk/core/apigw/actions/test/**",
+            "whisk/core/cli/test/**",
+            "whisk/core/limits/**",
+            "**/*CacheConcurrencyTests*",
+            "**/*ControllerApiTests*",
+        ]
+    ],
+    "REQUIRE_SYSTEM" : [
+        "includes" : [
+            "apigw/healthtests/**",
+            "services/**",
+            "system/basic/**",
+            "system/rest/**",
+            "whisk/core/admin/**",
+            "whisk/core/cli/test/**",
+            "whisk/core/apigw/actions/test/**",
+            "whisk/core/limits/**",
+            "whisk/core/database/test/*CacheConcurrencyTests*",
+            "whisk/core/controller/test/*ControllerApiTests*",
+        ]
+    ],
+    "LEAN" : [
+        "excludes" : leanExcludes
+    ]
+]
+
+testSets.each {setName, patterns ->
+    def excludes = patterns["excludes"] ?: new HashSet<>()
+    excludes.addAll(leanExcludes)
+    patterns["excludes"] = excludes
+}
+
+//The value can be specified either via env variable
+// ORG_GRADLE_PROJECT_testSetName
+//Or via property -PtestSetName
+if (!project.hasProperty("testSetName")) {
+    ext.testSetName = "LEAN"
+}
+
+def getPattern(String name, String type) {
+    def patterns = testSets[name]
+    assert patterns : "No pattern found for $name"
+    return patterns[type] ?: []
+}
+
+def logTestSetInfo(){
+    println "Using testSet $testSetName - ${prettyPrint(toJson(testSets[testSetName]))}"
+}
+
 task testLean(type: Test) {
-    exclude leanExcludes
+    doFirst {
+        logTestSetInfo()
+    }
+    exclude getPattern(testSetName, "excludes")
+    include getPattern(testSetName, "includes")
+}
+
+task testUnit(type: Test) {
+    systemProperty("whisk.spi.ArtifactStoreProvider", "whisk.core.database.memory.MemoryArtifactStoreProvider")
+    exclude getPattern("REQUIRE_ONLY_DB", "excludes")
+    include getPattern("REQUIRE_ONLY_DB", "includes")
+
+    //Test below have direct dependency on CouchDB running
+    def couchDbExcludes = [
+        "**/*NamespaceBlacklistTests*",
+        "**/*CleanUpActivationsTest*",
+        "**/*CouchDbRestClientTests*",
+        "**/*RemoveLogsTests*",
+        "**/*ReplicatorTest*",
+        "**/*CouchDBArtifactStoreTests*",
+    ]
+
+    exclude couchDbExcludes
+    exclude "actionContainers/**"
 }
 
 task testLeanCli(type: Test) {
@@ -102,8 +182,12 @@ task createKeystore(dependsOn: deleteKeystore) {
 
 afterEvaluate {
     task testCoverageLean(type:Test) {
+        doFirst {
+            logTestSetInfo()
+        }
         classpath = getScoverageClasspath(project)
-        exclude leanExcludes
+        exclude getPattern(testSetName, "excludes")
+        include getPattern(testSetName, "includes")
     }
 
     task testCoverage(type:Test) {
diff --git a/tools/build/checkLogs.py b/tools/build/checkLogs.py
index cf315b75c0..b436042a3c 100755
--- a/tools/build/checkLogs.py
+++ b/tools/build/checkLogs.py
@@ -76,32 +76,37 @@ def colorize(code, string):
 
 # Script entrypoint.
 if __name__ == "__main__":
-    if len(sys.argv) != 2:
+    if len(sys.argv) > 3:
         sys.stderr.write("Usage: %s logs_directory.\n" % sys.argv[0])
         sys.exit(1)
 
     root_dir = sys.argv[1]
 
+    tags_to_check = []
+    if len(sys.argv) == 3:
+        tags_to_check = {x.strip() for x in sys.argv[2].split(',')}
+
     col = colors()
 
     if not os.path.isdir(root_dir):
         sys.stderr.write("%s: %s is not a directory.\n" % (sys.argv[0], root_dir))
 
     file_checks = [
-        ("db-rules.log", [ partial(database_has_at_most_x_entries, 0) ]),
-        ("db-triggers.log", [ partial(database_has_at_most_x_entries, 0) ]),
+        ("db-rules.log", {"db"}, [ partial(database_has_at_most_x_entries, 0) ]),
+        ("db-triggers.log", {"db"}, [ partial(database_has_at_most_x_entries, 0) ]),
         # Assert that stdout of the container is correctly piped and empty
-        ("controller0.log", [ partial(file_has_at_most_x_bytes, 0) ]),
-        ("invoker0.log", [ partial(file_has_at_most_x_bytes, 0) ])
+        ("controller0.log", {"system"}, [ partial(file_has_at_most_x_bytes, 0) ]),
+        ("invoker0.log", {"system"}, [ partial(file_has_at_most_x_bytes, 0) ])
     ]
 
     all_errors = []
 
     # Runs all relevant checks on all relevant files.
-    for file_name, checks in file_checks:
-        file_path = root_dir + "/" + file_name
-        errors = run_file_checks(file_path, checks)
-        all_errors += map(lambda p: (file_path, p[0], p[1]), errors)
+    for file_name, tags, checks in file_checks:
+        if not tags_to_check or any(t in tags for t in tags_to_check):
+            file_path = root_dir + "/" + file_name
+            errors = run_file_checks(file_path, checks)
+            all_errors += map(lambda p: (file_path, p[0], p[1]), errors)
 
     sort_key = lambda p: p[0]
 
diff --git a/tools/build/redo b/tools/build/redo
index 6dc3cd8283..de0d300b33 100755
--- a/tools/build/redo
+++ b/tools/build/redo
@@ -324,7 +324,13 @@ Components = [
                   'run all tests',
                   yaml = False,
                   gradle = True,
-                  tasks = 'test')
+                  tasks = 'test'),
+
+    makeComponent('unit-tests',
+                  'run units tests',
+                  yaml = False,
+                  tasks = 'testUnit',
+                  gradle = 'tests')
 ]
 
 def getComponent(component):
diff --git a/tools/travis/README.md b/tools/travis/README.md
new file mode 100644
index 0000000000..fd5e5544f6
--- /dev/null
+++ b/tools/travis/README.md
@@ -0,0 +1,36 @@
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+# Travis Setup
+
+Travis build is configured to perform build of this repo in multiple parallel jobs as listed below.
+
+1. Unit Tests - Runs the test which only need database service.
+2. System Tests - Runs those tests which need complete OpenWhisk system up and running.
+3. Performance test suite - Run basic performance tests with the objective to check if tests are working or not.
+
+These jobs make use of following scripts
+
+1. `scan.sh` - Performs various code scan task like python flake scan, scala formatting etc.
+2. `setupPrereq.sh` - Performs setup if basis prerequisites like database setup and property file generation.
+3. `distDocker.sh` - Builds the various docker containers.
+4. `setupSystem.sh` - Runs the various containers which are part of an OpenWhisk setup like Controller, Invoker etc.
+5. `runTests.sh` - Runs the tests. It make use of `ORG_GRADLE_PROJECT_testSetName` env setting to determine which test
+   suite to run.
+6. `checkAndUploadLogs.sh` -  Collect the logs, check them and then upload them https://app.box.com/v/openwhisk-travis-logs
diff --git a/tools/travis/checkAndUploadLogs.sh b/tools/travis/checkAndUploadLogs.sh
new file mode 100755
index 0000000000..781c4a1d96
--- /dev/null
+++ b/tools/travis/checkAndUploadLogs.sh
@@ -0,0 +1,41 @@
+#!/usr/bin/env bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Disable abort script at first error as we require the logs to be uploaded
+# even if check and log collection fails
+# set -e
+
+SECONDS=0
+SCRIPTDIR=$(cd $(dirname "$0") && pwd)
+ROOTDIR="$SCRIPTDIR/../.."
+
+cd $ROOTDIR
+
+LOG_NAME=$1
+TAGS=${2-""}
+LOG_TAR_NAME="${LOG_NAME}_${TRAVIS_BUILD_ID}-$TRAVIS_BRANCH.tar.gz"
+
+ansible-playbook -i ansible/environments/local ansible/logs.yml
+
+./tools/build/checkLogs.py logs "$TAGS"
+
+./tools/travis/box-upload.py "$TRAVIS_BUILD_DIR/logs" "$LOG_TAR_NAME"
+
+echo "Uploaded Logs with name $LOG_TAR_NAME"
+echo "Time taken for ${0##*/} is $SECONDS secs"
diff --git a/tools/travis/distDocker.sh b/tools/travis/distDocker.sh
new file mode 100755
index 0000000000..4415fc3e6b
--- /dev/null
+++ b/tools/travis/distDocker.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+set -e
+
+# Build script for Travis-CI.
+
+SECONDS=0
+SCRIPTDIR=$(cd $(dirname "$0") && pwd)
+ROOTDIR="$SCRIPTDIR/../.."
+
+cd $ROOTDIR
+TERM=dumb ./gradlew distDocker -PdockerImagePrefix=testing $GRADLE_PROJS_SKIP
+
+echo "Time taken for ${0##*/} is $SECONDS secs"
diff --git a/tools/travis/runSystemTests.sh b/tools/travis/runSystemTests.sh
new file mode 100755
index 0000000000..7d1619b558
--- /dev/null
+++ b/tools/travis/runSystemTests.sh
@@ -0,0 +1,35 @@
+#!/usr/bin/env bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# 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_SYSTEM"
+
+./setupPrereq.sh
+
+./distDocker.sh
+
+./setupSystem.sh
+
+./runTests.sh
diff --git a/tools/travis/runTests.sh b/tools/travis/runTests.sh
new file mode 100755
index 0000000000..9f53284bc7
--- /dev/null
+++ b/tools/travis/runTests.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+set -e
+
+# Build script for Travis-CI.
+
+SECONDS=0
+SCRIPTDIR=$(cd $(dirname "$0") && pwd)
+ROOTDIR="$SCRIPTDIR/../.."
+
+cd $ROOTDIR
+cat whisk.properties
+TERM=dumb ./gradlew :tests:testCoverageLean :tests:reportCoverage
+
+bash <(curl -s https://codecov.io/bash)
+echo "Time taken for ${0##*/} is $SECONDS secs"
diff --git a/tools/travis/runUnitTests.sh b/tools/travis/runUnitTests.sh
new file mode 100755
index 0000000000..886c7b25c6
--- /dev/null
+++ b/tools/travis/runUnitTests.sh
@@ -0,0 +1,35 @@
+#!/usr/bin/env bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# 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
+
+./distDocker.sh
+
+./runTests.sh
+
diff --git a/tools/travis/scan.sh b/tools/travis/scan.sh
new file mode 100755
index 0000000000..a8b6e4cd97
--- /dev/null
+++ b/tools/travis/scan.sh
@@ -0,0 +1,52 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+set -e
+
+# Build script for Travis-CI.
+SECONDS=0
+SCRIPTDIR=$(cd $(dirname "$0") && pwd)
+ROOTDIR="$SCRIPTDIR/../.."
+HOMEDIR="$SCRIPTDIR/../../../"
+UTILDIR="$HOMEDIR/incubator-openwhisk-utilities/"
+
+cd $ROOTDIR
+./tools/travis/flake8.sh  # Check Python files for style and stop the build on syntax errors
+
+# clone the openwhisk utilities repo.
+cd $HOMEDIR
+git clone https://github.com/apache/incubator-openwhisk-utilities.git
+
+# run the scancode util. against project source code starting at its root
+cd $UTILDIR
+scancode/scanCode.py --config scancode/ASF-Release-v2.cfg $ROOTDIR
+
+# run scalafmt checks
+cd $ROOTDIR
+TERM=dumb ./gradlew checkScalafmtAll
+
+# lint tests to all be actually runnable
+MISSING_TESTS=$(grep -rL "RunWith" --include="*Tests.scala" tests)
+if [ -n "$MISSING_TESTS" ]
+then
+  echo "The following tests are missing the 'RunWith' annotation"
+  echo $MISSING_TESTS
+  exit 1
+fi
+
+echo "Time taken for ${0##*/} is $SECONDS secs"
diff --git a/tools/travis/setupPrereq.sh b/tools/travis/setupPrereq.sh
new file mode 100755
index 0000000000..e53daec834
--- /dev/null
+++ b/tools/travis/setupPrereq.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+set -e
+
+# Build script for Travis-CI.
+SECONDS=0
+SCRIPTDIR=$(cd $(dirname "$0") && pwd)
+ROOTDIR="$SCRIPTDIR/../.."
+
+cd $ROOTDIR/ansible
+
+$ANSIBLE_CMD setup.yml -e mode=HA
+$ANSIBLE_CMD prereq.yml
+$ANSIBLE_CMD couchdb.yml
+$ANSIBLE_CMD initdb.yml
+$ANSIBLE_CMD wipe.yml
+
+$ANSIBLE_CMD properties.yml
+echo "Time taken for ${0##*/} is $SECONDS secs"
diff --git a/tools/travis/setupSystem.sh b/tools/travis/setupSystem.sh
new file mode 100755
index 0000000000..557e0e041f
--- /dev/null
+++ b/tools/travis/setupSystem.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+set -e
+
+# Build script for Travis-CI.
+SECONDS=0
+SCRIPTDIR=$(cd $(dirname "$0") && pwd)
+ROOTDIR="$SCRIPTDIR/../.."
+
+cd $ROOTDIR/ansible
+
+$ANSIBLE_CMD apigateway.yml
+$ANSIBLE_CMD openwhisk.yml
+
+echo "Time taken for ${0##*/} is $SECONDS secs"


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services