Merge changes from topics 'add_factor_testcase_tx_pkt_size', 'add_posca_test_suite_fr...
[bottlenecks.git] / testsuites / posca / run_posca.py
1 #!/usr/bin/env python\r
2 ##############################################################################\r
3 # Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.\r
4 #\r
5 # All rights reserved. This program and the accompanying materials\r
6 # are made available under the terms of the Apache License, Version 2.0\r
7 # which accompanies this distribution, and is available at\r
8 # http://www.apache.org/licenses/LICENSE-2.0\r
9 ##############################################################################\r
10 \r
11 import os\r
12 import sys\r
13 import subprocess\r
14 \r
15 INTERPRETER = "/usr/bin/python"\r
16 #------------------------------------------------------\r
17 # run posca testcase\r
18 # ------------------------------------------------------\r
19 def posca_run(arg):\r
20     print "========== run posca ==========="\r
21     if(arg == "factor_system_bandwidth"):\r
22         print "========== run posca_system_bandwidth ==========="\r
23         cmd = '/home/opnfv/bottlenecks/testsuites/posca/testcase_script/posca_factor_system_bandwidth.py'\r
24         pargs = [INTERPRETER,cmd]\r
25         sub_result = subprocess.Popen(pargs)\r
26         sub_result.wait()\r
27 \r
28 def posca_env_check():\r
29     print "========== posca env check ==========="\r
30 \r
31 def main():\r
32     para_testname = sys.argv[0]\r
33     para_test_arg = sys.argv[1]\r
34     posca_env_check()\r
35     posca_run(para_test_arg)\r
36     sys.exit(0)\r
37 \r
38 if __name__=='__main__':\r
39     main()\r