oats 0.0.7 → 0.0.8

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.
data/bin/agent CHANGED
@@ -23,7 +23,6 @@ Parameters: (also can be passed in via environment variables
23
23
  -u OATS_USER who started the agent. Used for logging purposes only.
24
24
  -r OATS_TESTS_REPOSITORY_VERSION Required to update the agent.
25
25
  -k kill the agent, or set OATS_KILL_AGENT
26
- -d DISPLAY_NUM Number of the VNC Display, for Linux only
27
26
 
28
27
  Example:
29
28
  /home/occadmin/oats/bin/agent -p 3011 -n occ_1 -r 403cc620c265db84dbd3fb7d7cce4d57416bff09
@@ -164,16 +163,6 @@ function fkill {
164
163
  [ "$OATS_TESTS_CODE_VERSION" ] && agent_echo "Setting OATS code version to the requested version: $OATS_TESTS_CODE_VERSION]" # This is not set for development/debug
165
164
  fi
166
165
  export OATS_TESTS_CODE_VERSION
167
- # echo "$OATS_AGENT_NICKNAME $OATS_AGENT_PORT" >| $config_agent_file
168
- if [ "$OS" == "Linux" ]; then # Do this with VNC displays
169
- # Allocate 2x as display. VNC takes 592x, vino takes next available from 59++
170
- # vnc_num="2$(echo $OATS_AGENT_PORT | cut -c 4)"
171
- vnc_num="$DISPLAY_NUM"
172
- [ "$vnc_num" ] || vnc_num="1"
173
- pgrep -fl "Xvnc4 :$vnc_num" >/dev/null || vncserver :$vnc_num -SecurityTypes=None -geometry 1900x1060
174
- export DISPLAY=":$vnc_num.0"
175
- agent_echo "Setting DISPLAY to $DISPLAY"
176
- fi
177
166
  cd $OATS_HOME # Needed for bundler
178
167
  agent_echo "Starting agent $OATS_AGENT_NICKNAME on port $OATS_AGENT_PORT"
179
168
  $ruby_com
data/doc/oats_httpd.conf CHANGED
@@ -1,7 +1,11 @@
1
1
  # Drop in this HTTP CONF in the proper folder to be included in each Agent's
2
2
  # Apache configuration.
3
- # - MacOS location: /etc/apache2/other, restart: sudo /usr/sbin/apachectl restart
4
-
3
+ # - MacOS
4
+ # location: /etc/apache2/other,
5
+ # command: sudo /usr/sbin/apachectl restart
6
+ # - Ubuntu
7
+ # location: /etc/apache2/conf.d
8
+ # command: sudo /etc/init.d/apache2 restart
5
9
  # The following assumes oats and occ are placed under /home/occadmin. You may
6
10
  # need to adjust these folders (or create soft-links) if they are placed
7
11
  # elsewhere.
data/lib/oats/driver.rb CHANGED
@@ -192,7 +192,7 @@ module Oats
192
192
  when /\.xls$/
193
193
  suite = id
194
194
  require 'spreadsheet' unless defined?(Spreadsheet)
195
- book = Spreadsheet.open test_yaml
195
+ book = Spreadsheet.open test_yaml, 'rb'
196
196
  tests = $oats_global['xl']
197
197
  unless tests and tests[id]
198
198
  xl_id = File.dirname(id)
@@ -254,6 +254,7 @@ module Oats
254
254
  cur_list.variations.last.end_time = Time.now.to_i if cur_list and cur_list.variations.last.end_time.nil?
255
255
  new_list = TestList.new(id,test_yaml)
256
256
  if variations.nil? or variations.empty?
257
+
257
258
  Driver.process_oats_data(oats_data)
258
259
  new_list.variations.last.end_time = Time.now.to_i
259
260
  else
@@ -446,7 +447,7 @@ module Oats
446
447
  # their test arrays in $oats_global['xl']
447
448
  def Driver.parse_xl(path,id)
448
449
  require 'spreadsheet' unless defined?(Spreadsheet)
449
- book = Spreadsheet.open path
450
+ book = Spreadsheet.open path, 'rb'
450
451
  sheet = book.worksheet 'Main'
451
452
  Oats.assert sheet, "Could not locate worksheet 'Main' in: " + path
452
453
  list = Driver.xl_sheet_tests(sheet, id, 'Main', 'Test_Scenarios')
@@ -149,6 +149,7 @@ module Oats
149
149
  # break
150
150
  # end
151
151
  processes.each do |process|
152
+ # puts [process.Commandline, process.ProcessId, process.name].inspect
152
153
  if process.Commandline =~ proc_names
153
154
  matched.push [process.ProcessId,process.Name,nil, process.CommandLine]
154
155
  end
@@ -179,7 +180,9 @@ module Oats
179
180
  end
180
181
 
181
182
  def OatsLock.kill_webdriver_browsers
182
- match = "ruby.*oats/lib/oats_main.rb"
183
+
184
+ # match = "ruby.*oats/lib/oats_main.rb"
185
+ match = 'ruby.*oats(\\\\|\/)bin(\\\\|\/)oats'
183
186
  # Not tested on agents on Windows_NT
184
187
  if $oats_execution['agent']
185
188
  nickname = $oats_execution['agent']['execution:occ:agent_nickname']
@@ -211,7 +214,11 @@ module Oats
211
214
  end
212
215
  # If parent ruby dies, ppid reverts to "1"
213
216
  (chromedriver_procs + webdriver_procs).each do |pid,proc_name,ppid|
214
- OatsLock.kill_pid pid if ppid == "1" and proc_name !~ /defunct/
217
+ if RUBY_PLATFORM =~ /(mswin|mingw)/
218
+ OatsLock.kill_pid pid
219
+ else
220
+ OatsLock.kill_pid pid if ppid == "1" and proc_name !~ /defunct/
221
+ end
215
222
  end
216
223
  end
217
224
 
data/lib/oats/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Oats
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
data/oats.gemspec CHANGED
@@ -12,8 +12,10 @@ Gem::Specification.new do |s|
12
12
  s.description = %q{A flexible automated system integration regression test framework.}
13
13
 
14
14
  s.rubyforge_project = "oats"
15
- s.files = File.directory?('.git') ? `git ls-files`.split("\n") : []
16
- s.test_files = File.directory?('.git') ? `git ls-files -- {test,spec,features}/*`.split("\n") : []
15
+ if RUBY_PLATFORM !~ /(mswin|mingw)/ # Does not like git ls-files
16
+ s.files = File.directory?('.git') ? `git ls-files`.split("\n") : []
17
+ s.test_files = File.directory?('.git') ? `git ls-files -- {test,spec,features}/*`.split("\n") : []
18
+ end
17
19
  # s.test_files = ["test/test_cgi_wrapper.rb" ]
18
20
  s.executables = %w{oats occ}
19
21
  s.require_paths = ["lib"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oats
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 7
10
- version: 0.0.7
9
+ - 8
10
+ version: 0.0.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Levent Atasoy