Martin Cosyns | 0efdc87 | 2021-09-27 16:24:30 +0000 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # Copyright 2020-present Open Networking Foundation |
| 3 | # Original copyright 2020-present ADTRAN, Inc. |
| 4 | # |
| 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 | |
| 16 | python3 -m pip install device-management-interface |
| 17 | |
| 18 | # start the fake device manager and catch its pid for terminating |
| 19 | cd ./tests/servers/dmi |
| 20 | python3 dmi_server.py & |
| 21 | dmi_pid=$! |
| 22 | |
| 23 | cd ../../.. |
| 24 | |
| 25 | # run tests ... |
| 26 | python3 -m robot -N "test" -d $OUTPUT_DIR --nostatusrc tests/test.robot |
| 27 | |
| 28 | # terminate the service |
| 29 | kill -9 $dmi_pid |