-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_qos.py
More file actions
executable file
·58 lines (54 loc) · 1.93 KB
/
Copy pathtest_qos.py
File metadata and controls
executable file
·58 lines (54 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/python
import subprocess, time
import jsonrpclib
import fileinput
import sys
if __name__ == '__main__':
args = sys.argv[1].split(" ")
#args[0] --- radio_ip
#args[1] --- browser
#
#
#write current time into output file
#
f = open('outputfile', 'a')
f.write("------------------------" + time.asctime() + "------------------------\n")
f.write("----- Start of qos test -----\n")
ip = args[0]
browser = args[1]
qos_options = [2000,4000-5000,9000-7000]
#
#test low priority
#
for ports in qos_options:
print "testing low_tcp " + ports_ip
callString = "./textfield.py '" + ip + " " + browser + " webinterface3.sh port_spec0T " + ports + "'"
proc = subprocess.Popen(callString, shell=True)
proc.wait()
print "testing low_udp " + ports_ip
callString = "./textfield.py '" + ip + " " + browser + " webinterface3.sh port_spec0U " + ports + "'"
proc = subprocess.Popen(callString, shell=True)
proc.wait()
print "testing low_both " + ports_ip
callString = "./textfield.py '" + ip + " " + browser + " webinterface3.sh port_spec0B " + ports + "'"
proc = subprocess.Popen(callString, shell=True)
proc.wait()
print "testing high_tcp " + ports_ip
callString = "./textfield.py '" + ip + " " + browser + " webinterface3.sh port_spec1T " + ports + "'"
proc = subprocess.Popen(callString, shell=True)
proc.wait()
print "testing high_udp " + ports_ip
callString = "./textfield.py '" + ip + " " + browser + " webinterface3.sh port_spec1U " + ports + "'"
proc = subprocess.Popen(callString, shell=True)
proc.wait()
print "testing high_both " + ports_ip
callString = "./textfield.py '" + ip + " " + browser + " webinterface3.sh port_spec1B " + ports + "'"
proc = subprocess.Popen(callString, shell=True)
proc.wait()
#
#end of serial test
#
print "----- End of qos test -----"
f.write("------------------------" + time.asctime() + "------------------------\n")
f.write("----- End of qos test -----\n\n")
f.close()