| garciadeblas | 17edada | 2016-09-07 15:36:25 +0200 | [diff] [blame] | 1 | #!/bin/bash |
| garciadeblas | f937a8b | 2016-07-21 14:53:32 +0200 | [diff] [blame] | 2 | # |
| garciadeblas | ee04b45 | 2016-09-19 18:07:40 +0200 | [diff] [blame] | 3 | # Copyright 2016 Telefónica Investigación y Desarrollo, S.A.U. |
| 4 | # |
| garciadeblas | f937a8b | 2016-07-21 14:53:32 +0200 | [diff] [blame] | 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | # |
| garciadeblas | ee04b45 | 2016-09-19 18:07:40 +0200 | [diff] [blame] | 17 | # Authors: |
| 18 | # - Gerardo Garcia - gerardo.garciadeblas@telefonica.com |
| garciadeblas | f937a8b | 2016-07-21 14:53:32 +0200 | [diff] [blame] | 19 | # |
| 20 | |
| 21 | HERE=$(realpath $(dirname $0)) |
| 22 | OSM_JENKINS=$(dirname $HERE) |
| 23 | . $OSM_JENKINS/common/all_funcs |
| 24 | |
| 25 | # SET YOU MDG repository name here |
| 26 | export OSM_MDG=RO |
| 27 | OSM_load_config |
| garciadeblas | b9aec3e | 2017-01-20 14:28:17 +0100 | [diff] [blame] | 28 | |
| 29 | NOTEST="" |
| garciadeblas | bb3e62c | 2017-01-21 18:08:26 +0100 | [diff] [blame] | 30 | if [ "$1" = "--notest" ]; then |
| garciadeblas | b9aec3e | 2017-01-20 14:28:17 +0100 | [diff] [blame] | 31 | shift |
| 32 | NOTEST="y" |
| 33 | fi |
| 34 | |
| Jeremy Mordkoff | 35d6f24 | 2016-10-06 16:17:05 -0700 | [diff] [blame] | 35 | OSM_git_checkout "$@" |
| garciadeblas | f937a8b | 2016-07-21 14:53:32 +0200 | [diff] [blame] | 36 | |
| garciadeblas | b9aec3e | 2017-01-20 14:28:17 +0100 | [diff] [blame] | 37 | INFO "installing RO packages and dependencies from current repo (--noclone)" |
| 38 | ./scripts/install-openmano.sh --noclone --force -q |
| 39 | RC=$? |
| 40 | |
| 41 | if [ -n "$NOTEST" ]; then |
| 42 | INFO "done, RC=$RC" |
| 43 | exit $RC |
| 44 | fi |
| garciadeblas | f937a8b | 2016-07-21 14:53:32 +0200 | [diff] [blame] | 45 | |
| garciadeblas | f937a8b | 2016-07-21 14:53:32 +0200 | [diff] [blame] | 46 | INFO "starting build" |
| 47 | |
| garciadeblas | ee04b45 | 2016-09-19 18:07:40 +0200 | [diff] [blame] | 48 | INFO " cleaning .pyc" |
| garciadeblas | 3c15859 | 2016-09-20 17:11:49 +0200 | [diff] [blame] | 49 | rm -f *.pyc |
| garciadeblas | 2e9b814 | 2016-12-23 13:37:05 +0100 | [diff] [blame] | 50 | |
| garciadeblas | ee04b45 | 2016-09-19 18:07:40 +0200 | [diff] [blame] | 51 | INFO " compiling *.py" |
| garciadeblas | 2e9b814 | 2016-12-23 13:37:05 +0100 | [diff] [blame] | 52 | TEMPFILE="$(mktemp -q -p . "openmanolinker.XXXXXX.py")" |
| 53 | trap 'rm -f "$TEMPFILE"' EXIT |
| 54 | for i in `ls vimconn_*.py |sed "s/\.py//"`; do echo "import $i" >> $TEMPFILE; done |
| 55 | |
| 56 | python $TEMPFILE && |
| tierno | 0c71f00 | 2017-04-05 21:16:10 +0200 | [diff] [blame] | 57 | python -m py_compile *.py # && |
| garciadeblas | 2e9b814 | 2016-12-23 13:37:05 +0100 | [diff] [blame] | 58 | |
| tierno | 0c71f00 | 2017-04-05 21:16:10 +0200 | [diff] [blame] | 59 | #INFO " basic_test" && |
| 60 | #./test/basictest.sh --force --insert-bashrc --install-openvim --init-openvim #&& #uncomment to add new tests |
| garciadeblas | 2e9b814 | 2016-12-23 13:37:05 +0100 | [diff] [blame] | 61 | # OTHER TESTS HERE |
| tierno | a9c9efe | 2016-09-23 12:27:04 +0200 | [diff] [blame] | 62 | |
| garciadeblas | a8cbb91 | 2016-08-31 14:47:41 +0200 | [diff] [blame] | 63 | RC=$? |
| garciadeblas | f937a8b | 2016-07-21 14:53:32 +0200 | [diff] [blame] | 64 | INFO "done, RC=$RC" |
| 65 | exit $RC |
| 66 | |
| 67 | |