bake-toolkit 2.34.0 → 2.34.1

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: 55e127ea891d694b2055ef9c7233f0c2f52955a1
4
- data.tar.gz: 897a5a3e47ff5d351ef86395b801389395c8a21f
3
+ metadata.gz: b11e2453cd82049d2070eb49b22ecb28d8048bde
4
+ data.tar.gz: f10d2cd9bfeca29b371f7c9ee20fad0147390410
5
5
  SHA512:
6
- metadata.gz: df5380fdb0f5b84bf0e393726df5aa259502ec3f721a7e6ed110dda3f1ba845758d2c78449cf0ccb7896cff8ca9094bc930af6552c5394b9ae0deddcde4683fa
7
- data.tar.gz: 335f22338bd491a4edab31ac75c272aef67a2bb781f775dc397be558cd9c98cb6f27f995bc5943b3a7c2dc9215017e05cc2a175748982592c76ff99f30092898
6
+ metadata.gz: f0bb5910da86ad9840662d921af520b44cb7b63b14c265ab3e3cf9e2ba3d800f23dc888fdffaea3fea7db4f6f482a088bede87ec5a968713c2eecf5825564a60
7
+ data.tar.gz: bbb83467b457996c83a751383f90bae049cdba3d60c9a60258457a06a62b04bc20783ccb7c35c13b1f9eb790b9609f97aabe2f20a252cb592a5e6a9d0b6a8486
data/bin/bakery CHANGED
@@ -125,6 +125,7 @@ module Bake
125
125
  runOk = (ExitHelper.exit_code == 0)
126
126
  if Bake::IDEInterface.instance.get_abort
127
127
  abort = true
128
+ msg1 << "aborted"
128
129
  exitValue = 1
129
130
  break
130
131
  end
@@ -20,7 +20,7 @@ module Bake
20
20
  attr_accessor :build_config, :nocache, :analyze, :eclipseOrder, :envToolchain, :showConfigs
21
21
  attr_reader :main_dir, :project, :filename, :main_project_name, :buildDirDelimiter, :dot, :cc2j_filename # String
22
22
  attr_reader :roots, :include_filter, :exclude_filter, :adapt # String List
23
- attr_reader :conversion_info, :stopOnFirstError, :clean, :rebuild, :show_includes, :show_includes_and_defines, :projectPaths, :qac, :dry, :syncedOutput # Boolean
23
+ attr_reader :conversion_info, :stopOnFirstError, :clean, :rebuild, :show_includes, :show_includes_and_defines, :projectPaths, :qac, :dry, :syncedOutput, :debug_threads # Boolean
24
24
  attr_reader :linkOnly, :compileOnly, :no_autodir, :clobber, :docu, :debug, :prepro, :oldLinkOrder, :prebuild, :printTime, :json, :wparse # Boolean
25
25
  attr_reader :threads, :socket # Fixnum
26
26
  attr_reader :vars # map
@@ -32,6 +32,7 @@ module Bake
32
32
  def initialize(argv)
33
33
  super(argv)
34
34
 
35
+ @debug_threads = false
35
36
  @dry = false
36
37
  @filelist = nil
37
38
  @qac = false
@@ -111,6 +112,7 @@ module Bake
111
112
  add_option(["-v3" ], lambda { @verbose = 3 })
112
113
 
113
114
  add_option(["--debug" ], lambda { @debug = true })
115
+ add_option(["--debug-threads" ], lambda { @debug_threads = true })
114
116
  add_option(["--set" ], lambda { |x| set_set(x) })
115
117
 
116
118
  add_option(["--clobber" ], lambda { @clobber = true; @clean = true })
@@ -66,6 +66,7 @@ module Bake
66
66
  puts " -h, --help Print this help."
67
67
  puts " --license Print the license."
68
68
  puts " --debug Print out backtraces in some cases - used only for debugging bake."
69
+ puts " --debug-threads Print some debug information about started and stopped threads."
69
70
  ExitHelper.exit(0)
70
71
  end
71
72
 
data/lib/blocks/block.rb CHANGED
@@ -184,6 +184,15 @@ module Bake
184
184
  @@threads
185
185
  end
186
186
 
187
+ def self.waitForAllThreads
188
+ if @@threads.length > 0
189
+ STDOUT.puts "DEBUG_THREADS: Wait for all threads." if Bake.options.debug_threads
190
+ ThreadsWait.all_waits(@@threads)
191
+ @@threads = []
192
+ STDOUT.puts "DEBUG_THREADS: All threads finished." if Bake.options.debug_threads
193
+ end
194
+ end
195
+
187
196
  def calcIsBuildBlock
188
197
  @startupSteps ||= []
189
198
 
@@ -277,8 +286,13 @@ module Bake
277
286
 
278
287
  def self.waitForFreeThread
279
288
  if @@threads.length == Bake.options.threads
280
- endedThread = ThreadsWait.new(@@threads).next_wait
281
- @@threads.delete(endedThread)
289
+ begin
290
+ STDOUT.puts "DEBUG_THREADS: Wait for free thread." if Bake.options.debug_threads
291
+ endedThread = ThreadsWait.new(@@threads).next_wait
292
+ STDOUT.puts "DEBUG_THREADS: Thread free." if Bake.options.debug_threads
293
+ @@threads.delete(endedThread)
294
+ rescue ErrNoWaitingThread
295
+ end
282
296
  end
283
297
  end
284
298
 
@@ -289,6 +303,7 @@ module Bake
289
303
  return if blockAbort?(true)
290
304
 
291
305
  @@threads << Thread.new(Thread.current[:stdout], Thread.current[:errorStream]) { |outStr, errStr|
306
+ STDOUT.puts "DEBUG_THREADS: Started: #{Thread.current.object_id} (#{@projectName}, #{@config.name})" if Bake.options.debug_threads
292
307
  Thread.current[:stdout] = outStr
293
308
  Thread.current[:errorStream] = errStr
294
309
  exceptionOccured = false
@@ -309,6 +324,7 @@ module Bake
309
324
  @result = false
310
325
  @@delayed_result = false
311
326
  end
327
+ STDOUT.puts "DEBUG_THREADS: Stopped: #{Thread.current.object_id} (#{@projectName}, #{@config.name})" if Bake.options.debug_threads
312
328
  }
313
329
 
314
330
  Block::waitForFreeThread()
@@ -329,7 +345,7 @@ module Bake
329
345
  Thread.current[:lastCommand] = nil
330
346
 
331
347
  preSteps.each do |step|
332
- ThreadsWait.all_waits(Blocks::Block::threads)
348
+ Blocks::Block::waitForAllThreads()
333
349
  @result = executeStep(step, method) if @result
334
350
  return @result if blockAbort?(@result)
335
351
  end unless @prebuild
@@ -361,14 +377,14 @@ module Bake
361
377
  } if !threadableSteps.empty?
362
378
  nonThreadableSteps.each do |step|
363
379
  if !@prebuild || (Library === step)
364
- ThreadsWait.all_waits(Blocks::Block::threads)
380
+ Blocks::Block::waitForAllThreads()
365
381
  @result = executeStep(step, method) if @result
366
382
  end
367
383
  return @result if blockAbort?(@result)
368
384
  end
369
385
 
370
386
  postSteps.each do |step|
371
- ThreadsWait.all_waits(Blocks::Block::threads)
387
+ Blocks::Block::waitForAllThreads()
372
388
  @result = executeStep(step, method) if @result
373
389
  return @result if blockAbort?(@result)
374
390
  end unless @prebuild
@@ -1,7 +1,7 @@
1
1
  module Bake
2
2
  class Version
3
3
  def self.number
4
- "2.34.0"
4
+ "2.34.1"
5
5
  end
6
6
 
7
7
  def self.printBakeVersion(ry = "")
data/lib/tocxx.rb CHANGED
@@ -355,7 +355,7 @@ module Bake
355
355
  SyncOut.reset_errors
356
356
  result = callBlock(block, method) && result
357
357
  ensure
358
- ThreadsWait.all_waits(Blocks::Block::threads)
358
+ Blocks::Block::waitForAllThreads()
359
359
  result &&= Blocks::Block.delayed_result
360
360
  SyncOut.stopStream(result)
361
361
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bake-toolkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.34.0
4
+ version: 2.34.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Schaal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-08 00:00:00.000000000 Z
11
+ date: 2017-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rtext