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 +4 -4
- data/bin/flake +4 -1
- data/lib/flaky.rb +2 -2
- data/lib/flaky/run.rb +10 -4
- data/lib/flaky/run/all_tests.rb +3 -1
- data/lib/flaky/run/one_test.rb +3 -1
- data/release_notes.md +11 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7bf49cdc404dc8ebcfbb87cfa847214c2b72ef8
|
4
|
+
data.tar.gz: 6430385f049b8ec4d445517e69e8c0cc7e76c2eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
|
data/lib/flaky.rb
CHANGED
@@ -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.
|
13
|
-
DATE = '2013-10-
|
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
|
data/lib/flaky/run.rb
CHANGED
@@ -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.
|
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
|
data/lib/flaky/run/all_tests.rb
CHANGED
@@ -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
|
-
|
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
|
data/lib/flaky/run/one_test.rb
CHANGED
@@ -27,7 +27,9 @@ module Flaky
|
|
27
27
|
end
|
28
28
|
|
29
29
|
raise "#{test_file} does not exist." if file.empty?
|
30
|
-
|
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
|
data/release_notes.md
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2013-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chronic_duration
|