soda 1.3.1 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/lib/Soda.rb +6 -1
  2. data/lib/SodaFireFox.rb +13 -0
  3. data/lib/sodainfo.rb +1 -1
  4. metadata +4 -4
data/lib/Soda.rb CHANGED
@@ -825,15 +825,20 @@ class Soda
825
825
  RestartGlobalTime()
826
826
 
827
827
  if (@params['browser'] =~ /firefox/i)
828
+ print "Calling: SodaFireFox.KillProcesses().\n"
828
829
  SodaFireFox.KillProcesses()
830
+ print "Finished: Calling SodaFireFox.KillProcesses().\n"
829
831
  end
830
832
 
833
+ print "Calling: NewBrowser().\n"
831
834
  err = NewBrowser()
832
835
  if (err != 0)
833
836
  print "(!)Failed to restart browser!\n"
834
837
  end
838
+ print "Finished: Calling NewBrowser().\n"
835
839
 
836
840
  if (!@restart_test.empty?)
841
+ print "Starting Restart Test: #{@restart_test}.\n"
837
842
  resultdir = "#{@resultsDir}/#{suitename}"
838
843
  @rep = SodaReporter.new(@restart_test, @saveHtml, resultdir,
839
844
  0, nil, false);
@@ -842,6 +847,7 @@ class Soda
842
847
  handleEvents(restart_script)
843
848
  @rep.log("Finished: Browser restart.\n")
844
849
  @rep.EndTestReport()
850
+ print "Finished Restart Test.\n"
845
851
  end
846
852
 
847
853
  RestartGlobalTime()
@@ -2920,7 +2926,6 @@ JSCode
2920
2926
 
2921
2927
  tests.each do |test|
2922
2928
  if ((@restart_count > 0) && (test_since_restart >= @restart_count))
2923
- SodaUtils.PrintSoda("Restarting browser...\n")
2924
2929
  RestartBrowserTest(suite_name)
2925
2930
  test_since_restart = 0
2926
2931
  SodaUtils.PrintSoda("(*)Browser restart finished.\n")
data/lib/SodaFireFox.rb CHANGED
@@ -133,12 +133,17 @@ def SodaFireFox.KillProcessWindows()
133
133
  tmp = nil
134
134
  result = 0
135
135
 
136
+ print "Calling: Kernel.open(| tasklist /NH).\n"
136
137
  tmp = Kernel.open("| tasklist /NH")
138
+ print "Readling Lines...\n"
137
139
  lines = tmp.readlines()
140
+ print "Lines Read.\n"
138
141
  tmp.close()
142
+ print "Closing process IO handle.\n"
139
143
 
140
144
  lines.each do |l|
141
145
  l = l.chomp()
146
+ print "Process Line: '#{l}'\n"
142
147
  if (l =~ /firefox/i)
143
148
  hash = {
144
149
  'pid' => nil,
@@ -151,6 +156,9 @@ def SodaFireFox.KillProcessWindows()
151
156
  end
152
157
  end
153
158
 
159
+ len = firefox.length()
160
+ print "Processes found length: #{len}\n"
161
+
154
162
  if (firefox.length < 1)
155
163
  print "(*)No firefox processes to kill, browser closed clean.\n"
156
164
  end
@@ -160,7 +168,10 @@ def SodaFireFox.KillProcessWindows()
160
168
  print "Killing Process ID: #{hash['pid']}, Name:"+
161
169
  "#{hash['name']}\n"
162
170
  cmd = "taskkill /F /T /PID #{hash['pid']}"
171
+ print "Calling Command: '#{cmd}'\n"
163
172
  res = Kernel.system(cmd)
173
+ print "Commnd Result: #{res}\n"
174
+ print "Console Results: #{$?}\n"
164
175
  rescue Exception => e
165
176
  print "(!)Exception : #{e.message}\n"
166
177
  result = -1
@@ -244,10 +255,12 @@ def SodaFireFox.KillProcesses()
244
255
  err = 0
245
256
 
246
257
  os = SodaUtils.GetOsType()
258
+ print "Kill Process OS: #{os}\n"
247
259
  case (os)
248
260
  when /linux/i
249
261
  err = KillProcessUnix()
250
262
  when /windows/i
263
+ print "Calling KillProcessWindows().\n"
251
264
  err = KillProcessWindows()
252
265
  end
253
266
 
data/lib/sodainfo.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  require 'Soda'
2
2
 
3
- SODA_GEM_VERSION = "1.3.1"
3
+ SODA_GEM_VERSION = "1.3.2"
4
4
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soda
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 3
9
- - 1
10
- version: 1.3.1
9
+ - 2
10
+ version: 1.3.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Trampus Richmond
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-25 00:00:00 -07:00
18
+ date: 2011-03-28 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency