summaryrefslogtreecommitdiff
path: root/cleopatre/devkit/tests/validation/scripts/automate_SmartBits_latency_test/1-1/unidirectional/frame_size__512/start_latency_test_1-1_uni_512_600sX1.vbs
blob: cd7d418f91d0e9ad097986fc533f2de98e921fea (plain)
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
Set objShell = CreateObject("WScript.Shell")

Set fso = CreateObject("Scripting.FileSystemObject")

fso.CopyFile "..\..\..\..\..\SmartBits_test_scripts\latency\1-1\unidirectional\frame_size__512\latency_1-1_uni_512_600sX1.sig", "..\..\..\..\..\SmartBits_test_scripts\start.sig",TRUE


objShell.Run "Smartapp.exe"


Set oATO = WScript.CreateObject("wshAPIToolkitObject.ucATO")

Set args = WScript.Arguments
If WScript.Arguments.Count <> 1 Then
 Wscript.Echo "Usage: start_latency_test mail<no_mail>"
 Wscript.Quit
End If

If args.Item(0) = "mail" Then
	WScript.Echo "If test fails email will be sent to zoran.milosavljevic@spidcom.com"
End If

WScript.Sleep 5000

Do While 1
	'Exit the test if test was successfull
	objShell.Sendkeys "%a"
	objShell.Sendkeys "%n"
	objShell.Sendkeys "%{f4}"   'Press Alt+F4 to close first window 
	objShell.Sendkeys "%{F4}"   'Press Alt+F4 to close first window 
	objShell.Sendkeys "%{f4}"   'Press Alt+F4 to close second window
	
	Success = objShell.AppActivate("SmartApplications")
	If Success = False Then
		objShell.Sendkeys "%{TAB}"
		If args.Item(0) = "mail" Then		 
			objShell.Run ("%comspec% /c bmail -s smtp.spidcom.com -t zoran.milosavljevic@spidcom.com -f test@spidcom.com -a ""throughput test failed"" -b ""Throughput test failed. Reason: Error in packet learning."" "), 1, TRUE
		End If
		WScript.Quit(2)
	End If

	WScript.Sleep 1000
Loop