F #2816: Set rubocop linting in smoke tests

Add README.md for travis
This commit is contained in:
Tino Vazquez committed 2019-01-24 19:24:51 +01:00
1 parent c98177de8b
commit bd2c429876
6 files changed
+49 -1

No files matched your search

-1
View File
@@ -8,5 +8,4 @@ before_install:
- sudo npm install -g grunt-cli
- (cd src/sunstone/public && npm install && bower install)
script:
- rubocop -c share/linters/.rubocop.yml src/cli
- set -o errexit; source .travis/smoke_tests.sh
+10
View File
@@ -0,0 +1,10 @@
## Travis smoke tests
The `.travis/tests` directory contains scripts for each smoke test.
The smoke_test.sh script is called which iterates on each script, and it exits and logs on any failure. To add more tests, simply create a new file on `.travis/tests`.
Each test should:
- have a number as prefix to define the order. Renaming is allowed, the rule is to execute the less costly tests (in time) first
- return 0 on success, other number on error
+1
View File
@@ -31,6 +31,7 @@ check_test() {
echo "Executing test $TEST" >> ${LOG_FILE}
eval $TEST >> ${LOG_FILE} 2>&1
RC=$?
echo "RC for $TEST is $RC"
return $RC
}
+19
View File
@@ -0,0 +1,19 @@
# -------------------------------------------------------------------------- #
# Copyright 2002-2019, OpenNebula Project, OpenNebula Systems #
# #
# Licensed 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. #
#--------------------------------------------------------------------------- #
# lint ruby code
ln -s share/linters/.rubocop.yml . && rubocop
@@ -14,4 +14,6 @@
# limitations under the License. #
#--------------------------------------------------------------------------- #
# check that OpenNebula compiles
scons sunstone=yes mysql=yes systemd=yes new_xmlrpc=yes
+17
View File
@@ -1,3 +1,19 @@
# -------------------------------------------------------------------------- #
# Copyright 2002-2019, OpenNebula Project, OpenNebula Systems #
# #
# Licensed 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. #
#--------------------------------------------------------------------------- #
#
# Configuration file for rubocop linter
# Applies to every ruby file on the OpenNebula repository
@@ -5,6 +21,7 @@
AllCops:
Exclude:
- src/sunstone/public/node_modules/**/*
- src/tm_mad
- share/onegate/onegate
- share/scons/get_xmlrpc_config