flaky_stats 0.2.0 → 0.3.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e1d9907d8e94b4251659df7cc93b064b0619c54e
4
- data.tar.gz: 1328f215192ff1f1032ceebd4d6caf2622dec1e0
3
+ metadata.gz: b5e61e91e706c4babca18d0907877b0e32b8a042
4
+ data.tar.gz: ee8e2e161fae45170830775bec3f68dcebde95f3
5
5
  SHA512:
6
- metadata.gz: 60136e0c87ce993272b475a8efc5f7571c436cd2e3fe103347da93d6d8aed3192c5f22861902c766f88e700bd60a232b0fc982ffb3d3ec2beaa7809f2df7cff1
7
- data.tar.gz: a02d3fdc30f4395976e6e254aba34a9ca785f38a99994d4dc8bbd1547a810b60bc1c526e8438d258aff72cfc931d1c79c4899efd30b240e759ef3f0900c77507
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
- # Run all failing tests separately with '--format doc' on the end.
21
- failed_files.each do |failed_file|
22
- status = system("rspec --format doc #{failed_file[:filename]}")
19
+ if ENV['NO_FLAKY'] == "true"
20
+ heading("Skipping flaky tests")
21
+ else
22
+ heading("Rerunning failing tests in single thread!")
23
23
 
24
- # This is a flaky test only, so record it
25
- real_flaky_tests << form_data(failed_file) if status == true
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
@@ -1,3 +1,3 @@
1
1
  module FlakyStats
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
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.2.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: 2017-08-10 00:00:00.000000000 Z
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.5.2
128
+ rubygems_version: 2.6.14.1
129
129
  signing_key:
130
130
  specification_version: 4
131
131
  summary: Records flaky tests