bake-toolkit 2.37.10 → 2.37.11

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: 41533efcf74917cf145922efbf597c510485ba76
4
- data.tar.gz: 6505bada10e3389a7ffa4e5d90604486a257ab71
3
+ metadata.gz: b9c08bcd9a6877108b9c2f91805c50271cf900c6
4
+ data.tar.gz: cf18a35e22de426069d6f05b346234eb2d6b464a
5
5
  SHA512:
6
- metadata.gz: 23c1b3a301acc734e2795091c7dc3627f2b6685c8ff535b20fc71cd55f604d119b3e6f0b75187c2af6cbe8aca5b7c350731d12496381c4788dbc1c7dc786b91c
7
- data.tar.gz: abae3a5e45e813d41f2987816f196629421b7f4e982a2a4f8f2fa63db267f6b8bac0441850edce52fc14d0fbc9634172d4eff0a6fac240f5adf7002676adb4b6
6
+ metadata.gz: 393444e52b8e9e5183eb0512c95eb5efa758ed14926d30090fe5835aa2f8c0a344bbda47e92eed0680396edefc40037ae8fa658ae14dd233a346b13ace8982cf
7
+ data.tar.gz: 6e07994cfbe5e233b4e0527d31a6851d7346427656f866646bd20e1f76c05eddad6a4b998ad5ce74ab98097c1874042069391681a530970d9a4ce35d7614b943
data/bin/bakeqac CHANGED
@@ -46,9 +46,13 @@ def self.executeQacli(cmd, adminStepAndImmediateOutput = false)
46
46
 
47
47
  loop do
48
48
  FileUtils.rm_rf @options.qacdata if adminStepAndImmediateOutput
49
+ FileUtils::mkdir_p @options.qacdata
50
+
51
+ cmdDupped = cmd.dup
52
+ cmdDupped << @options.qacdata
49
53
 
50
54
  # admin step should not take longer than 60 seconds, rest not longer than 80% of qacretry time if specified
51
- success, consoleOutput = ProcessHelper.run(cmd, adminStepAndImmediateOutput, true, nil, [0], Dir.pwd, adminStepAndImmediateOutput ? 60 : (@options.qacretry * 0.8).to_i)
55
+ success, consoleOutput = ProcessHelper.run(cmdDupped, adminStepAndImmediateOutput, true, nil, [0], Dir.pwd, adminStepAndImmediateOutput ? 60 : (@options.qacretry * 0.8).to_i)
52
56
  licenseError = false
53
57
  qacDaemonError = false
54
58
  processTimeout = false
@@ -66,24 +70,29 @@ def self.executeQacli(cmd, adminStepAndImmediateOutput = false)
66
70
  end
67
71
  if (line.include?("Process timeout") || line.include?("A mutually exclusive operation is in progress"))
68
72
  puts line
69
- puts "Seconds left after killing process: %d" % (@options.qacretry - (Time.now - timeStart))
70
73
  processTimeout = true
71
- puts "bakeqac: Removing locks from #{@options.qacdata}..."
72
- sleep(1)
73
- successRemove, consoleOutput = ProcessHelper.run($cmdRemoveLocks, false)
74
- puts "Seconds left after removing locks: %d" % (@options.qacretry - (Time.now - timeStart))
75
- puts consoleOutput unless consoleOutput.empty?
74
+ if !adminStepAndImmediateOutput
75
+ puts "bakeqac: Removing locks from #{@options.qacdata}..."
76
+ sleep(1)
77
+ successRemove, consoleOutput = ProcessHelper.run($cmdRemoveLocks, false)
78
+ puts consoleOutput unless consoleOutput.empty?
79
+ end
76
80
  break
77
81
  end
78
82
  end
79
83
  cSizeCheck = checkCipSize()
80
84
 
81
85
  break unless ((@options.qacretry >= (Time.now - timeStart)) && (!cSizeCheck || licenseError || qacDaemonError || processTimeout))
82
- puts "Retry seconds left: %d" % (@options.qacretry - (Time.now - timeStart))
86
+ puts "bakeqac: Retry seconds left: %d" % (@options.qacretry - (Time.now - timeStart))
87
+
88
+ if processTimeout && adminStepAndImmediateOutput
89
+ @options.incrementQacdata
90
+ end
91
+
83
92
  end
84
93
  checkError = !cSizeCheck || licenseError || qacDaemonError || processTimeout
85
94
  if @options.qacretry > 0 && checkError
86
- puts "Retry timeout over: %d -> failure." % (@options.qacretry - (Time.now - timeStart))
95
+ puts "bakeqac: Retry timeout over: %d -> failure." % (@options.qacretry - (Time.now - timeStart))
87
96
  end
88
97
  success = false if checkError
89
98
  return [success, consoleOutput, checkError]
@@ -145,10 +154,11 @@ $cmdRemoveLocks = qaExe + ["admin", "--qaf-project", @options.qacdata, "--remove
145
154
 
146
155
  if (@options.qacstep.nil? or @options.qacstep.include?"admin")
147
156
 
148
- cmd = qaExe + ["admin", "--qaf-project-config", "--qaf-project", @options.qacdata]
157
+ cmd = qaExe + ["admin", "--qaf-project-config"]
149
158
  @options.cct.each {|c| cmd << "--cct" << c }
150
159
  cmd << "--rcf" << @options.rcf
151
160
  cmd << "--acf" << @options.acf
161
+ cmd << "--qaf-project" # << @options.qacdata
152
162
 
153
163
  puts "bakeqac: creating database..."
154
164
 
@@ -185,7 +195,7 @@ $cmdRemoveLocks = qaExe + ["admin", "--qaf-project", @options.qacdata, "--remove
185
195
  if success and (@options.qacstep.nil? or @options.qacstep.include?"analyze")
186
196
  FileUtils::mkdir_p @options.qacdata
187
197
 
188
- cmd = qaExe + ["analyze", "-P", @options.qacdata, "-b"]
198
+ cmd = qaExe + ["analyze", "-b"]
189
199
 
190
200
  begin
191
201
  devMode = File.exist?"c:/Projekte/git/bake/bin/bake"
@@ -201,7 +211,7 @@ $cmdRemoveLocks = qaExe + ["admin", "--qaf-project", @options.qacdata, "--remove
201
211
 
202
212
  bcmd += passedParams.join(" ")
203
213
  cmd << bcmd
204
-
214
+ cmd << "-P" # << @options.qacdata
205
215
  puts "bakeqac: building and analyzing files..."
206
216
 
207
217
  success, consoleOutput, checkError = executeQacli(cmd)
@@ -245,11 +255,12 @@ $cmdRemoveLocks = qaExe + ["admin", "--qaf-project", @options.qacdata, "--remove
245
255
 
246
256
  puts "bakeqac: printing results..."
247
257
 
248
- cmd = qaExe + ["view", "-P", @options.qacdata, "-m", "STDOUT"]
258
+ cmd = qaExe + ["view", "-m", "STDOUT"]
249
259
  if not @options.qacnoformat
250
260
  cmd += ["-f", "%?u==0%(MSG: %:trc: %)%F(%l,%c): (%r:%N)%t%?v%(\n%v%)"]
251
261
  end
252
262
 
263
+ cmd << "-P" # << @options.qacdata,
253
264
  success, consoleOutput, checkError = executeQacli(cmd)
254
265
 
255
266
  if ProjectFilter.is_valid?
@@ -403,8 +414,9 @@ $cmdRemoveLocks = qaExe + ["admin", "--qaf-project", @options.qacdata, "--remove
403
414
 
404
415
  puts "bakeqac: generating MDR report..."
405
416
 
406
- cmd = qaExe + ["report", "-P", @options.qacdata, "-t", "MDR"]
417
+ cmd = qaExe + ["report", "-t", "MDR"]
407
418
 
419
+ cmd << "-P" # << @options.qacdata
408
420
  success, consoleOutput, checkError = executeQacli(cmd)
409
421
  puts consoleOutput
410
422
 
@@ -421,7 +433,7 @@ $cmdRemoveLocks = qaExe + ["admin", "--qaf-project", @options.qacdata, "--remove
421
433
  data = JSON.parse(raw)
422
434
 
423
435
  filename = File.normalize(data["file"])
424
- filename = @options.qacdata + "/../" + filename unless File.is_absolute?(filename) # only needed for UT
436
+ filename = @options.qacdata + "/../../" + filename unless File.is_absolute?(filename) # only needed for UT
425
437
  fileContent = nil
426
438
  fileFunctions = []
427
439
 
@@ -6,7 +6,6 @@ module Bake
6
6
  @@filterList = nil
7
7
  @@valid = nil
8
8
  @@options = options
9
- @@filter_filename = "#{@@options.qacdata}/filter.txt"
10
9
  end
11
10
 
12
11
  def self.projects
@@ -25,7 +24,8 @@ module Bake
25
24
  end
26
25
 
27
26
  def self.writeFilter(filter)
28
- File.open(@@filter_filename, "w+") do |f|
27
+ filter_filename = "#{@@options.qacdata}/filter.txt"
28
+ File.open(filter_filename, "w+") do |f|
29
29
  filter.uniq!
30
30
  filter.delete_if { |f| (f.end_with? "/gtest") or (f.end_with? "/gmock") }
31
31
  f.puts(filter)
@@ -34,9 +34,10 @@ module Bake
34
34
 
35
35
  def self.calcFilter_internal
36
36
  @@filterList = []
37
- @@valid = File.exist?(@@filter_filename) && @@options.qacfilter
37
+ filter_filename = "#{@@options.qacdata}/filter.txt"
38
+ @@valid = File.exist?(filter_filename) && @@options.qacfilter
38
39
  if @@valid
39
- File.open(@@filter_filename, "r") do |f|
40
+ File.open(filter_filename, "r") do |f|
40
41
  f.each_line { |line| @@filterList << line.strip }
41
42
  end
42
43
  end
@@ -6,10 +6,11 @@ require 'common/options/finder'
6
6
  module Bake
7
7
 
8
8
  class BakeqacOptions < Parser
9
- attr_reader :rcf, :acf, :qacdata, :qacstep, :qac_home, :cct_append # String
9
+ attr_reader :rcf, :acf, :qacstep, :qac_home, :cct_append # String
10
10
  attr_reader :c11, :c14, :qacfilter, :qacnoformat, :qacunittest, :qacdoc, :cct_patch # Boolean
11
11
  attr_reader :cct # Array
12
12
  attr_reader :qacretry # int
13
+ attr_accessor :qacdata # String
13
14
 
14
15
  def initialize(argv)
15
16
  super(argv)
@@ -30,6 +31,8 @@ module Bake
30
31
  @qacunittest = false
31
32
  @qacretry = 0
32
33
  @qacdoc = false
34
+ @qacdataOrg = nil
35
+ @qacdataCounter = 0
33
36
 
34
37
  add_option(["-b", "" ], lambda { |x| setDefault(x) })
35
38
  add_option(["-a" ], lambda { |x| Bake.formatter.setColorScheme(x.to_sym) })
@@ -108,6 +111,14 @@ module Bake
108
111
  return nil
109
112
  end
110
113
 
114
+ def incrementQacdata()
115
+ if @qacdataCounter > 0
116
+ FileUtils::rm_rf(@qacdata)
117
+ end
118
+ @qacdataCounter = @qacdataCounter + 1
119
+ @qacdata = @qacdataOrg + "/run" + @qacdataCounter.to_s
120
+ end
121
+
111
122
  def parse_options(bakeOptions)
112
123
  parse_internal(true, bakeOptions)
113
124
 
@@ -121,6 +132,9 @@ module Bake
121
132
  end
122
133
 
123
134
  @qacdata = "#{@main_dir}/.qacdata" if @qacdata.nil?
135
+ @qacdataOrg = @qacdata
136
+ @qacdataCounter = 0
137
+ incrementQacdata()
124
138
 
125
139
  if !ENV["QAC_HOME"] || ENV["QAC_HOME"].empty?
126
140
  Bake.formatter.printError("Error: specify the environment variable QAC_HOME.")
@@ -1,7 +1,7 @@
1
1
  module Bake
2
2
  class Version
3
3
  def self.number
4
- "2.37.10"
4
+ "2.37.11"
5
5
  end
6
6
 
7
7
  def self.printBakeVersion(ry = "")
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.37.10
4
+ version: 2.37.11
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-06-19 00:00:00.000000000 Z
11
+ date: 2017-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rtext