flaky 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0f9ff093338f06bfed3fa22d003f989fab204700
4
- data.tar.gz: 688ede60f2d512a8178c2ab01afddb582c80e598
3
+ metadata.gz: e7bf49cdc404dc8ebcfbb87cfa847214c2b72ef8
4
+ data.tar.gz: 6430385f049b8ec4d445517e69e8c0cc7e76c2eb
5
5
  SHA512:
6
- metadata.gz: 6267bde8b466674dcc2fa27d37012a24de5b243a19c29c0f66f87096ba8429cb1378132a83d963722e5ba9c1ccc9dce71fc830fb615b532e80ea335235f64301
7
- data.tar.gz: f12d59ff098bb2bacf1fc13c8cfbd6766e8acdd0936dc35375a1677f6cd61631aac41a9dd48329121dbbe0ec221cf0e05ab2a38462e73dad35e41cc04e8b0c8c
6
+ metadata.gz: fdbb065bfa4f671b4aa6c8667215b02ee84619839e88c07e96fa9c4509e6658667a2d90054a8205051ca407b07bbf67b8766602010c7b8ab8d2b8e1d8358c120
7
+ data.tar.gz: 7e427af15ac21b289282dd5e7832b7e85f9fa3b52ddc240e090311d7de373412ba9ffcfd23885d95ff822c2e0406cae7432a9a8ea4e7e67c3d80b9cc456c0921
data/bin/flake CHANGED
@@ -12,7 +12,10 @@ flaky 3 ios
12
12
  If one run passes or 3 runs fail, then we move onto the next test.
13
13
  MSG
14
14
 
15
- raise usage_string unless ARGV && ARGV.length === 2
15
+ unless ARGV && ARGV.length === 2
16
+ puts usage_string
17
+ exit
18
+ end
16
19
 
17
20
  require File.expand_path '../../lib/flaky', __FILE__
18
21
 
@@ -9,8 +9,8 @@ require 'posix/spawn' # http://rubygems.org/gems/posix-spawn
9
9
  require 'digest/md5'
10
10
 
11
11
  module Flaky
12
- VERSION = '0.0.8' unless defined? ::Flaky::VERSION
13
- DATE = '2013-10-17' unless defined? ::Flaky::DATE
12
+ VERSION = '0.0.9' unless defined? ::Flaky::VERSION
13
+ DATE = '2013-10-21' unless defined? ::Flaky::DATE
14
14
 
15
15
  # https://github.com/appium/ruby_lib/blob/0e203d76610abd519ba9d2fe9c14b50c94df5bbd/lib/appium_lib.rb#L24
16
16
  def self.add_to_path file, path=false
@@ -18,10 +18,17 @@ module Flaky
18
18
  def initialize opts={}
19
19
  @result_dir = opts.fetch :result_dir, ''
20
20
  @pass_str = opts.fetch :pass_str, ''
21
+ @test_name = opts.fetch :test_name, ''
21
22
  end
22
23
 
23
24
  def name str
24
- File.join @result_dir, @pass_str, str
25
+ file_name = File.basename(str)
26
+
27
+ str = str[0..-1-file_name.length].gsub('/', '_')
28
+ str = str + '_' if str[-1] != '_'
29
+ str += @test_name.split('/').last
30
+
31
+ File.join @result_dir, @pass_str, str, file_name
25
32
  end
26
33
  end
27
34
 
@@ -53,7 +60,7 @@ module Flaky
53
60
  fail = stats[:fail]
54
61
  line = "#{name}, runs: #{runs}, pass: #{pass}," +
55
62
  " fail: #{fail}\n"
56
- if fail > 0
63
+ if fail > 0 && pass <= 0
57
64
  failure += line
58
65
  else
59
66
  success += line
@@ -113,8 +120,7 @@ module Flaky
113
120
  postfix = "#{runs}_#{test_name}_" + postfix
114
121
  postfix = '0' + postfix if runs <= 9
115
122
 
116
-
117
- log_file = LogArtifact.new result_dir: result_dir, pass_str: pass_str
123
+ log_file = LogArtifact.new result_dir: result_dir, pass_str: pass_str, test_name: test_name
118
124
 
119
125
  # html Ruby test log
120
126
  Flaky.write log_file.name("#{postfix}.html"), log
@@ -20,7 +20,9 @@ module Flaky
20
20
  name = File.basename file, '.*'
21
21
 
22
22
  raise "#{test_file} does not exist." if file.empty?
23
- test_name = file.sub(current_dir + '/appium/', '').gsub('/', '_')
23
+
24
+ test_name = file.sub(current_dir + '/appium/', '')
25
+ test_name = File.join(File.dirname(test_name), File.basename(test_name, '.*'))
24
26
 
25
27
  count.times do
26
28
  appium.start
@@ -27,7 +27,9 @@ module Flaky
27
27
  end
28
28
 
29
29
  raise "#{test_file} does not exist." if file.empty?
30
- test_name = file.sub(current_dir + '/appium/', '').gsub('/', '_')
30
+
31
+ test_name = file.sub(current_dir + '/appium/', '')
32
+ test_name = File.join(File.dirname(test_name), File.basename(test_name, '.*'))
31
33
 
32
34
  count.times do
33
35
  appium.start
@@ -1,3 +1,14 @@
1
+ #### v0.0.8 2013-10-17
2
+
3
+ - [ed116e9](https://github.com/appium/flaky/commit/ed116e92698360e9e587b27df054888efdcda3d1) Release 0.0.8
4
+ - [9baf904](https://github.com/appium/flaky/commit/9baf9045e8947beb403285e481e05e0bc6b815ee) Update to work on Appium master
5
+ - [f4d5cb9](https://github.com/appium/flaky/commit/f4d5cb9253efb89a11efdcec09c45380987b665c) Enable Android
6
+ - [7482640](https://github.com/appium/flaky/commit/748264071f5486118e0a0cbd5dda44b616ffac0a) Add logcat class
7
+ - [d40eace](https://github.com/appium/flaky/commit/d40eace48b498328e59095a3dc7d99da2fb0a904) Start of reset for Android
8
+ - [6bc2ce8](https://github.com/appium/flaky/commit/6bc2ce83672eb4cdb837985a6c120c964e479db9) End instruments process
9
+ - [92bc979](https://github.com/appium/flaky/commit/92bc97968916dbba6fbe8c256a7c6c9020f76c81) Add run all tests documentation
10
+
11
+
1
12
  #### v0.0.7 2013-10-11
2
13
 
3
14
  - [26bc5cc](https://github.com/appium/flaky/commit/26bc5cc6b43e3de7398e6d9e8c9bb615353020eb) Release 0.0.7
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flaky
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - code@bootstraponline.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-17 00:00:00.000000000 Z
11
+ date: 2013-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chronic_duration