test-loop 8.0.0 → 9.0.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.
- data/README.md +1 -3
- data/bin/test-loop +12 -9
- metadata +3 -3
data/README.md
CHANGED
@@ -80,8 +80,6 @@ Operation
|
|
80
80
|
|
81
81
|
* Press Control-C or send the SIGINT signal to quit the test loop.
|
82
82
|
|
83
|
-
* Send the SIGUSR1 signal to terminate workers and their subprocesses.
|
84
|
-
|
85
83
|
|
86
84
|
Configuration
|
87
85
|
-------------
|
@@ -176,8 +174,8 @@ you can query and modify the `Test::Loop` OpenStruct configuration as follows:
|
|
176
174
|
puts title, message
|
177
175
|
|
178
176
|
unless success # show failure log
|
179
|
-
system 'xdg-open', log_file or
|
180
177
|
system 'open', log_file or
|
178
|
+
system 'xdg-open', log_file or
|
181
179
|
system 'xmessage', '-title', log_file, '-file', log_file or
|
182
180
|
puts log_file, File.read(log_file)
|
183
181
|
end
|
data/bin/test-loop
CHANGED
@@ -75,6 +75,7 @@ module Test
|
|
75
75
|
|
76
76
|
class << Loop
|
77
77
|
def run
|
78
|
+
init_test_loop
|
78
79
|
register_signals
|
79
80
|
load_user_config
|
80
81
|
absorb_overhead
|
@@ -96,20 +97,17 @@ module Test
|
|
96
97
|
end
|
97
98
|
|
98
99
|
def register_signals
|
99
|
-
trap(:INT) {
|
100
|
-
master_pid = $$ # kill only the workers, not the master
|
101
|
-
trap(:USR1) { destroy_process_group unless $$ == master_pid }
|
100
|
+
trap(:INT) { kill_master_and_workers }
|
102
101
|
trap(:QUIT) { reload_master_process }
|
103
|
-
trap(:TSTP) {
|
102
|
+
trap(:TSTP) { forcibly_run_all_tests }
|
104
103
|
end
|
105
104
|
|
106
|
-
def
|
105
|
+
def kill_master_and_workers
|
107
106
|
Process.kill :KILL, -$$
|
108
107
|
end
|
109
108
|
|
110
109
|
def reload_master_process
|
111
110
|
notify 'Restarting loop...'
|
112
|
-
Process.kill :USR1, -$$
|
113
111
|
exec(*EXEC_VECTOR)
|
114
112
|
end
|
115
113
|
|
@@ -132,14 +130,19 @@ module Test
|
|
132
130
|
end
|
133
131
|
end
|
134
132
|
|
135
|
-
def
|
133
|
+
def init_test_loop
|
136
134
|
@running_files = []
|
137
135
|
@running_files_lock = Mutex.new
|
138
|
-
|
139
136
|
@lines_by_file = {} # path => readlines
|
140
137
|
@last_ran_at = @started_at = Time.now
|
141
|
-
|
138
|
+
end
|
142
139
|
|
140
|
+
def forcibly_run_all_tests
|
141
|
+
@last_ran_at = Time.at(0)
|
142
|
+
@lines_by_file.clear
|
143
|
+
end
|
144
|
+
|
145
|
+
def run_test_loop
|
143
146
|
notify 'Ready for testing!'
|
144
147
|
loop do
|
145
148
|
# figure out what test files need to be run
|
metadata
CHANGED
@@ -3,10 +3,10 @@ name: test-loop
|
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
|
-
-
|
6
|
+
- 9
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
version:
|
9
|
+
version: 9.0.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Suraj N. Kurapati
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-02-
|
17
|
+
date: 2011-02-15 00:00:00 -08:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|