A.R Karthick | 2e99c47 | 2017-03-22 19:13:51 -0700 | [diff] [blame] | 1 | # |
Chetan Gaonker | 5241883 | 2017-01-26 23:03:13 +0000 | [diff] [blame] | 2 | # Copyright 2016-present Ciena Corporation |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
A.R Karthick | 2e99c47 | 2017-03-22 19:13:51 -0700 | [diff] [blame] | 7 | # |
Chetan Gaonker | 5241883 | 2017-01-26 23:03:13 +0000 | [diff] [blame] | 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
A.R Karthick | 2e99c47 | 2017-03-22 19:13:51 -0700 | [diff] [blame] | 9 | # |
Chetan Gaonker | 5241883 | 2017-01-26 23:03:13 +0000 | [diff] [blame] | 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | import os,sys |
A.R Karthick | 2e99c47 | 2017-03-22 19:13:51 -0700 | [diff] [blame] | 17 | import logging |
A.R Karthick | 8f7f1b6 | 2017-04-06 18:25:07 -0700 | [diff] [blame] | 18 | from nose import main as nosetest_main |
A.R Karthick | 2e99c47 | 2017-03-22 19:13:51 -0700 | [diff] [blame] | 19 | logging.getLogger('scapy.runtime').setLevel(logging.ERROR) |
Chetan Gaonker | 5241883 | 2017-01-26 23:03:13 +0000 | [diff] [blame] | 20 | ##add the python path to lookup the utils |
| 21 | working_dir = os.path.dirname(os.path.realpath(sys.argv[-1])) |
| 22 | utils_dir = os.path.join(working_dir, '../utils') |
| 23 | fsm_dir = os.path.join(working_dir, '../fsm') |
| 24 | subscriber_dir = os.path.join(working_dir, '../subscriber') |
| 25 | __path__.append(utils_dir) |
| 26 | __path__.append(fsm_dir) |
| 27 | __path__.append(subscriber_dir) |
| 28 | cli_dir = os.path.join(working_dir, '../cli') |
| 29 | __path__.append(cli_dir) |
A.R Karthick | 8f7f1b6 | 2017-04-06 18:25:07 -0700 | [diff] [blame] | 30 | from CordTestConfig import CordTestConfigRestore |
| 31 | nosetest_main(addplugins = [ CordTestConfigRestore() ]) |