run_loop 1.2.0.pre3 → 1.2.0.pre4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d1e52a31e85f0adac547191703e3f010e760e665
4
- data.tar.gz: cf4d484d655377efcc8c1408254d54ff68cbc84f
3
+ metadata.gz: d041411905af94f4cb9288cd0e5b11d8cb00bd9e
4
+ data.tar.gz: 5952607793b2c047079d26341725602230c88bcc
5
5
  SHA512:
6
- metadata.gz: d31a1fec8c28bbbfc3d39b7542f466e854c52be37a5ce4e97cfba55d8d89d449dbaf786b30e2a9ca25a0dbd88e08cfcbad1914426513cb3dec0ad1648933d206
7
- data.tar.gz: 8696c5e294b423f76adad71131d387e75b78cffbc0ca9e84f456882a6dc0624668c84f9250d7495f1300469d8cf0bbcfd2155d46132883667484f96b6c5e5574
6
+ metadata.gz: fec5fc044d4e4a7d421d494118a9001f12fd21f483a3e2759c096e9970535c41b1a8d7d1e54f09cff81c6a1b4f003b1b656f00580ef19a5db1783c4f99bb229a
7
+ data.tar.gz: 215eec2cf64348bd4172b505e526b9c3b672a8cb971b24abd945c409544d02ee271627aac903d55da54addf6f0e9672403f08d1dcea5e19648167a74c5340dc0
data/lib/run_loop/core.rb CHANGED
@@ -29,6 +29,7 @@ module RunLoop
29
29
  }
30
30
 
31
31
  READ_SCRIPT_PATH = File.join(SCRIPTS_PATH, 'read-cmd.sh')
32
+ TIMEOUT_SCRIPT_PATH = File.join(SCRIPTS_PATH, 'timeout3')
32
33
 
33
34
  def self.scripts_path
34
35
  SCRIPTS_PATH
@@ -160,6 +161,7 @@ module RunLoop
160
161
  code = File.read(options[:script])
161
162
  code = code.gsub(/\$PATH/, results_dir)
162
163
  code = code.gsub(/\$READ_SCRIPT_PATH/, READ_SCRIPT_PATH)
164
+ code = code.gsub(/\$TIMEOUT_SCRIPT_PATH/, TIMEOUT_SCRIPT_PATH)
163
165
  code = code.gsub(/\$MODE/, 'FLUSH') unless options[:no_flush]
164
166
 
165
167
  repl_path = File.join(results_dir, 'repl-cmd.pipe')
@@ -1,5 +1,5 @@
1
1
  module RunLoop
2
- VERSION = '1.2.0.pre3'
2
+ VERSION = '1.2.0.pre4'
3
3
 
4
4
  # A model of a software release version that can be used to compare two versions.
5
5
  #
@@ -153,7 +153,9 @@ if (!/\/$/.test(commandPath)) {
153
153
  }
154
154
  commandPath += "repl-cmd.pipe";
155
155
 
156
- var blockingReadScriptPath = "$READ_SCRIPT_PATH";
156
+ var timeoutScriptPath = "$TIMEOUT_SCRIPT_PATH",
157
+ readPipeScriptPath = "$READ_SCRIPT_PATH";
158
+
157
159
 
158
160
 
159
161
 
@@ -281,18 +283,17 @@ while (true) {
281
283
 
282
284
  host = target.host();
283
285
  try {
284
- _process = host.performTaskWithPathArgumentsTimeout("/bin/bash",
285
- [blockingReadScriptPath, commandPath],
286
- //[commandPath],
287
- 1);
286
+ _process = host.performTaskWithPathArgumentsTimeout(timeoutScriptPath,
287
+ [readPipeScriptPath, commandPath],
288
+ 10);
288
289
 
289
290
  } catch (e) {
290
- Log.output("Timeout on read command...");
291
+ Log.output("Timeout on read command..." + e);
291
292
  continue;
292
293
  }
293
294
  if (_process.exitCode != 0) {
294
295
  if (_process.exitCode != 15) {
295
- Log.output("unable to execute: " + blockingReadScriptPath + " " + commandPath + " exitCode " + _process.exitCode + ". Error: " + _process.stderr + _process.stdout);
296
+ Log.output("unable to execute: " + timeoutScriptPath + " " +readPipeScriptPath + " " + commandPath + " exitCode " + _process.exitCode + ". Error: " + _process.stderr + _process.stdout);
296
297
  }
297
298
  }
298
299
  else {
data/scripts/timeout3 ADDED
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env bash
2
+ # A specialized version of
3
+ # http://www.bashcookbook.com/bashinfo/source/bash-4.0/examples/scripts/timeout3
4
+ # Note the non-standard use of sleep 0.1, which is out
5
+ # of standard but works on OS X and Ubuntu
6
+ # Original design by Dmitry V Golovashkin <Dmitry.Golovashkin@sas.com>
7
+ (
8
+ ((t = 50))
9
+
10
+ while ((t > 0)); do
11
+ sleep 0.1
12
+ kill -0 $$ || exit 0
13
+ ((t -= 1))
14
+ done
15
+
16
+ # Be nice, post SIGTERM first.
17
+ # The 'exit 0' below will be executed if any preceeding command fails.
18
+ kill -s SIGTERM $$ && kill -0 $$ || exit 0
19
+ sleep $delay
20
+ kill -s SIGKILL $$
21
+ ) 2> /dev/null &
22
+
23
+ exec "$@"
metadata CHANGED
@@ -1,209 +1,209 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: run_loop
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0.pre3
4
+ version: 1.2.0.pre4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karl Krukow
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-14 00:00:00.000000000 Z
11
+ date: 2014-12-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0.18'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0.18'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: json
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.8'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.8'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: retriable
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: 1.3.3.1
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 1.3.3.1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: awesome_print
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: 1.2.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 1.2.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: CFPropertyList
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '2.2'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '2.2'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: '1.6'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '1.6'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: travis
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ~>
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: '1.7'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ~>
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '1.7'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rspec
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ~>
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
117
  version: '3.0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ~>
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: '3.0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rake
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ~>
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
131
  version: '10.3'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ~>
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
138
  version: '10.3'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: guard-rspec
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ~>
143
+ - - "~>"
144
144
  - !ruby/object:Gem::Version
145
145
  version: '4.3'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ~>
150
+ - - "~>"
151
151
  - !ruby/object:Gem::Version
152
152
  version: '4.3'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: guard-bundler
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - ~>
157
+ - - "~>"
158
158
  - !ruby/object:Gem::Version
159
159
  version: '2.0'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ~>
164
+ - - "~>"
165
165
  - !ruby/object:Gem::Version
166
166
  version: '2.0'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: growl
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - ~>
171
+ - - "~>"
172
172
  - !ruby/object:Gem::Version
173
173
  version: '1.0'
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - ~>
178
+ - - "~>"
179
179
  - !ruby/object:Gem::Version
180
180
  version: '1.0'
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: rb-readline
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - ~>
185
+ - - "~>"
186
186
  - !ruby/object:Gem::Version
187
187
  version: '0.5'
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - ~>
192
+ - - "~>"
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0.5'
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: stub_env
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
- - - ~>
199
+ - - "~>"
200
200
  - !ruby/object:Gem::Version
201
201
  version: '0.2'
202
202
  type: :development
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
- - - ~>
206
+ - - "~>"
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0.2'
209
209
  description: calabash-cucumber drives tests for native iOS apps. RunLoop provides
@@ -238,6 +238,7 @@ files:
238
238
  - scripts/run_loop_fast_uia.js
239
239
  - scripts/run_loop_host.js
240
240
  - scripts/run_loop_shared_element.js
241
+ - scripts/timeout3
241
242
  - scripts/udidetect
242
243
  homepage: http://calaba.sh
243
244
  licenses:
@@ -249,19 +250,18 @@ require_paths:
249
250
  - lib
250
251
  required_ruby_version: !ruby/object:Gem::Requirement
251
252
  requirements:
252
- - - '>='
253
+ - - ">="
253
254
  - !ruby/object:Gem::Version
254
255
  version: '1.9'
255
256
  required_rubygems_version: !ruby/object:Gem::Requirement
256
257
  requirements:
257
- - - '>'
258
+ - - ">"
258
259
  - !ruby/object:Gem::Version
259
260
  version: 1.3.1
260
261
  requirements: []
261
262
  rubyforge_project:
262
- rubygems_version: 2.4.1
263
+ rubygems_version: 2.2.2
263
264
  signing_key:
264
265
  specification_version: 4
265
266
  summary: Tools related to running Calabash iOS tests
266
267
  test_files: []
267
- has_rdoc: