testr 14.0.1 → 14.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1,26 @@
1
+ ------------------------------------------------------------------------------
2
+ Version 14.0.2 (2011-10-11)
3
+ ------------------------------------------------------------------------------
4
+
5
+ Bug fixes:
6
+
7
+ * Fix updating passed/failed test files bookkeeping. Once a test file failed,
8
+ it was (incorrectly) always considered failed -- even if it passed later on.
9
+
10
+ * Do not requeue test files that are waiting to run.
11
+
12
+ Housekeeping:
13
+
14
+ * Rename `*.md` files to `*.markdown` to avoid ambiguity.
15
+
1
16
  ------------------------------------------------------------------------------
2
17
  Version 14.0.1 (2011-10-10)
3
18
  ------------------------------------------------------------------------------
4
19
 
5
20
  Bug fixes:
6
21
 
7
- * Use blue/red (not red/green) for pass/fail to accomodate the color blind.
22
+ * Use blue/red for pass/fail instead of green/red to accommodate the color
23
+ blind.
8
24
 
9
25
  * Incorrect test name regexp was passed down to Test::Unit. This broke
10
26
  focused testing, where only changed tests in a changed test file are run.
@@ -13,7 +29,6 @@ Housekeeping:
13
29
 
14
30
  * Make `testr-master` wait for killed worker processes before exiting.
15
31
 
16
-
17
32
  ------------------------------------------------------------------------------
18
33
  Version 14.0.0 (2011-10-09)
19
34
  ------------------------------------------------------------------------------
@@ -55,7 +55,6 @@ Prerequisites
55
55
 
56
56
  Process.respond_to? :fork # must be true
57
57
  Signal.list.key? 'TERM' # must be true
58
- Signal.list.key? 'KILL' # must be true
59
58
 
60
59
  ------------------------------------------------------------------------------
61
60
  Installation
data/lib/testr/client.rb CHANGED
@@ -8,10 +8,10 @@ module Client
8
8
  end
9
9
 
10
10
  def quit
11
- kill # stop the receive loop
11
+ kill # stop receive loop
12
12
  Process.kill :SIGTERM, @io.pid
13
13
  Process.wait @io.pid # reap zombie
14
- @io.close # prevent subsequent I/O
14
+ @io.close # prevent further I/O
15
15
  end
16
16
  end
17
17
 
data/lib/testr/driver.rb CHANGED
@@ -35,15 +35,18 @@ module Driver
35
35
 
36
36
  case event.to_sym
37
37
  when :test
38
+ @waiting_test_files.delete file
38
39
  @running_test_files.push file
39
40
 
40
41
  when :pass
41
- @passed_test_files.push file unless @passed_test_files.include? file
42
42
  @running_test_files.delete file
43
+ @failed_test_files.delete file
44
+ @passed_test_files.push file unless @passed_test_files.include? file
43
45
 
44
46
  when :fail
45
- @failed_test_files.push file unless @failed_test_files.include? file
46
47
  @running_test_files.delete file
48
+ @passed_test_files.delete file
49
+ @failed_test_files.push file unless @failed_test_files.include? file
47
50
  end
48
51
 
49
52
  @upstream.print line
@@ -57,9 +60,9 @@ module Driver
57
60
  warn "testr-driver: herald: #{changed_file}" if $DEBUG
58
61
 
59
62
  # find and run the tests that correspond to the changed file
60
- Config.test_file_globbers.each do |source_regexp, test_globber|
61
- if source_regexp =~ changed_file
62
- run_test_files Dir[test_globber.call(changed_file).to_s]
63
+ Config.test_file_globbers.each do |regexp, globber|
64
+ if regexp =~ changed_file and glob = globber.call(changed_file)
65
+ run_test_files Dir[glob]
63
66
  end
64
67
  end
65
68
 
@@ -87,6 +90,7 @@ private
87
90
  @master.quit
88
91
  end
89
92
 
93
+ @waiting_test_files = []
90
94
  @running_test_files = []
91
95
  @passed_test_files = []
92
96
  @failed_test_files = []
@@ -100,7 +104,10 @@ private
100
104
  end
101
105
 
102
106
  def run_test_file file
103
- @master.send [:test, file, find_changed_test_names(file)]
107
+ unless @waiting_test_files.include? file
108
+ @waiting_test_files.push file
109
+ @master.send [:test, file, find_changed_test_names(file)]
110
+ end
104
111
  end
105
112
 
106
113
  @lines_by_file = {}
data/lib/testr/master.rb CHANGED
@@ -53,7 +53,7 @@ module Master
53
53
  # after loading the user's test file, the at_exit() hook of the user's
54
54
  # testing framework will take care of running the tests and reflecting
55
55
  # any failures in the worker process' exit status, which will then be
56
- # handled by the SIGCHLD trap registered in the master process (above)
56
+ # handled by the SIGCHLD trap registered in the master process (below)
57
57
  Kernel.load test_file
58
58
  end
59
59
 
data/lib/testr/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module TestR
2
- VERSION = "14.0.1"
2
+ VERSION = "14.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testr
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.0.1
4
+ version: 14.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,11 +13,11 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2011-10-10 00:00:00.000000000 Z
16
+ date: 2011-10-11 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: json
20
- requirement: &12830300 !ruby/object:Gem::Requirement
20
+ requirement: &11673440 !ruby/object:Gem::Requirement
21
21
  none: false
22
22
  requirements:
23
23
  - - ! '>='
@@ -25,10 +25,10 @@ dependencies:
25
25
  version: 1.6.1
26
26
  type: :runtime
27
27
  prerelease: false
28
- version_requirements: *12830300
28
+ version_requirements: *11673440
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: guard
31
- requirement: &12829360 !ruby/object:Gem::Requirement
31
+ requirement: &11672900 !ruby/object:Gem::Requirement
32
32
  none: false
33
33
  requirements:
34
34
  - - ! '>='
@@ -36,10 +36,10 @@ dependencies:
36
36
  version: 0.8.4
37
37
  type: :runtime
38
38
  prerelease: false
39
- version_requirements: *12829360
39
+ version_requirements: *11672900
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: diff-lcs
42
- requirement: &12827820 !ruby/object:Gem::Requirement
42
+ requirement: &11670160 !ruby/object:Gem::Requirement
43
43
  none: false
44
44
  requirements:
45
45
  - - ! '>='
@@ -47,7 +47,7 @@ dependencies:
47
47
  version: 1.1.2
48
48
  type: :runtime
49
49
  prerelease: false
50
- version_requirements: *12827820
50
+ version_requirements: *11670160
51
51
  description: ''
52
52
  email:
53
53
  - sunaku@gmail.com
@@ -65,9 +65,9 @@ extra_rdoc_files: []
65
65
  files:
66
66
  - .gitignore
67
67
  - Gemfile
68
- - HISTORY.md
68
+ - HISTORY.markdown
69
69
  - LICENSE
70
- - README.md
70
+ - README.markdown
71
71
  - Rakefile
72
72
  - bin/testr
73
73
  - bin/testr-driver