flaky_stats 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/lib/flaky_stats/flaky_tests.rb +14 -6
- data/lib/flaky_stats/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5e61e91e706c4babca18d0907877b0e32b8a042
|
4
|
+
data.tar.gz: ee8e2e161fae45170830775bec3f68dcebde95f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08b8a6f9c24163d6088bed2d7c8c3ae4bab6ede3c649c685b3c591149db3618a9982149e26f4bb036b696f7c4bf1cb1fa670a0ec23f955fdd6430ab7cabf803a'
|
7
|
+
data.tar.gz: dc908cea3df88643b566f1a36d0aef12cb208a2969a6847914d17191de62fd7b3b4b60106836e42d4760f057ac91110d5c18934c704fd81f2f2adee521321dfc
|
data/README.md
CHANGED
@@ -24,6 +24,12 @@ Or install it yourself as:
|
|
24
24
|
|
25
25
|
$ rake parallel:rerun
|
26
26
|
|
27
|
+
## Environment variables
|
28
|
+
|
29
|
+
Use the following to skip running flaky tests after parallel
|
30
|
+
|
31
|
+
NO_FLAKY=true rake parallel:all
|
32
|
+
|
27
33
|
## Development
|
28
34
|
|
29
35
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -15,14 +15,22 @@ module FlakyStats
|
|
15
15
|
# Run each failing test singularly and return a list of flaky tests.
|
16
16
|
def run(failed_files = [])
|
17
17
|
real_flaky_tests = []
|
18
|
-
heading("Rerunning failing tests in single thread")
|
19
18
|
|
20
|
-
|
21
|
-
|
22
|
-
|
19
|
+
if ENV['NO_FLAKY'] == "true"
|
20
|
+
heading("Skipping flaky tests")
|
21
|
+
else
|
22
|
+
heading("Rerunning failing tests in single thread!")
|
23
23
|
|
24
|
-
|
25
|
-
|
24
|
+
sleep 2
|
25
|
+
system("sync")
|
26
|
+
|
27
|
+
# Run all failing tests separately with '--format doc' on the end.
|
28
|
+
failed_files.each do |failed_file|
|
29
|
+
status = system("rspec --format doc #{failed_file[:filename]}")
|
30
|
+
|
31
|
+
# This is a flaky test only, so record it
|
32
|
+
real_flaky_tests << form_data(failed_file) if status == true
|
33
|
+
end
|
26
34
|
end
|
27
35
|
|
28
36
|
return real_flaky_tests
|
data/lib/flaky_stats/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flaky_stats
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Pope
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
version: '0'
|
126
126
|
requirements: []
|
127
127
|
rubyforge_project:
|
128
|
-
rubygems_version: 2.
|
128
|
+
rubygems_version: 2.6.14.1
|
129
129
|
signing_key:
|
130
130
|
specification_version: 4
|
131
131
|
summary: Records flaky tests
|