bake-toolkit 2.41.4 → 2.42.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: deb031ecf751fd6de9602b91e74157fd7d487dca
4
- data.tar.gz: 0fb933f2d6c8f82ee337c0f800283532e9950ec0
3
+ metadata.gz: 30b115d04d6f147c9b54638708839299ada7bc02
4
+ data.tar.gz: 8180029ea7cdf161e70c1c98bf91b73bcb0a7e6e
5
5
  SHA512:
6
- metadata.gz: 31badf86143b439e651977fe576f284e9c271a17cc2c5769d1fdb8e1f84f91714fe308bf8962d1d4672ba48b34aeb53421a21480652d938965318fca0e6bd2e9
7
- data.tar.gz: 16d5206127049c485a9d8b637d6ea1a9b12ee7117c8a95c6112ac4a1eb5372e60173dcaa9118c19a07059c9cc5bb42c09681d1798ef21156cac87f04cfa22231
6
+ metadata.gz: 8b6b7f29f46606f6fe4bc98e185fd02d6d718b88adbeae59d8613db26d31bdf97891bd0a0791b26953e91ea800f2bf8f03e0a6808011b2b868e5352fbeee758b
7
+ data.tar.gz: 8b3a7951978eb94886b2b78e7fe4c57bd60c235ece0634d877de9613eafb257e2ca83147e741f1191a47d2036ed9a53a188cabdf5960451bb296cd93b76d05de
@@ -51,6 +51,8 @@ def self.executeQacli(cmd, adminStepAndImmediateOutput = false)
51
51
  cmdDupped = cmd.dup
52
52
  cmdDupped << @options.qacdata
53
53
 
54
+ puts cmdDupped.join(" ") if @options.qacverbose
55
+
54
56
  # admin step should not take longer than 60 seconds, rest not longer than 80% of qacretry time if specified
55
57
  success, consoleOutput = ProcessHelper.run(cmdDupped, adminStepAndImmediateOutput, true, nil, [0], Dir.pwd, adminStepAndImmediateOutput ? 60 : (@options.qacretry * 0.8).to_i)
56
58
  licenseError = false
@@ -123,7 +125,7 @@ end
123
125
  excludeParam = false
124
126
  wasMinus = false
125
127
  ARGV.each do |x|
126
- if ["--c++11", "--c++14", "--qacnofilefilter", "--qacnomsgfilter", "--qacnofilter", "--qacnoformat", "--qacrawformat", "--qacunittest", "--qacdoc", "--qaccctpatch"].include?x
128
+ if ["--c++11", "--c++14", "--qacnofilefilter", "--qacnomsgfilter", "--qacnofilter", "--qacnoformat", "--qacrawformat", "--qacunittest", "--qacdoc", "--qaccctpatch", "--qacverbose"].include?x
127
129
  excludeParam = false
128
130
  next
129
131
  elsif ["--cct", "--rcf", "--acf", "--qacdata", "--qacstep", "--qacretry"].include?x
@@ -7,12 +7,12 @@ module Bake
7
7
 
8
8
  class BakeqacOptions < Parser
9
9
  attr_reader :rcf, :acf, :qacstep, :qac_home, :mcpp_home, :cct_append # String
10
- attr_reader :c11, :c14, :qacmsgfilter, :qacfilefilter, :qacnoformat, :qacunittest, :qacdoc, :cct_patch # Boolean
10
+ attr_reader :c11, :c14, :qacmsgfilter, :qacfilefilter, :qacnoformat, :qacunittest, :qacdoc, :cct_patch, :qacverbose # Boolean
11
11
  attr_reader :cct # Array
12
12
  attr_reader :qacretry # int
13
13
  attr_accessor :qacdata # String
14
14
 
15
- RCF_DEFAULT = "config/rcf/mcpp-1_5_1-en_US.rcf".freeze()
15
+ RCF_DEFAULT = "config/rcf/mcpp-*-en_US.rcf".freeze()
16
16
 
17
17
  def initialize(argv)
18
18
  super(argv)
@@ -27,6 +27,7 @@ module Bake
27
27
  @cct = []
28
28
  @default = nil
29
29
  @qacdata = nil
30
+ @qacverbose = false
30
31
  @qacstep = nil
31
32
  @qacmsgfilter = true
32
33
  @qacfilefilter = true
@@ -55,6 +56,7 @@ module Bake
55
56
  add_option(["--qacnoformat", "--qacrawformat"], lambda { @qacnoformat = true })
56
57
  add_option(["--qacunittest" ], lambda { @qacunittest = true })
57
58
  add_option(["--qacdoc" ], lambda { @qacdoc = true })
59
+ add_option(["--qacverbose" ], lambda { @qacverbose = true })
58
60
  add_option(["-h", "--help" ], lambda { usage; ExitHelper.exit(0) })
59
61
  add_option(["--version" ], lambda { Bake::Version.printBakeqacVersion; ExitHelper.exit(0) })
60
62
 
@@ -78,12 +80,20 @@ module Bake
78
80
  puts " --qacrawformat Raw QAC output (with incomplete MISRA rules!)."
79
81
  puts " --qacretry <seconds> If build or result step fail due to refused license, the step will be retried until timeout."
80
82
  puts " --qacdoc Print link to HTML help page for every warning if found."
83
+ puts " --qacverbose Verbose output of bakeqac."
81
84
  puts " --version Print version."
82
85
  puts " -h, --help Print this help."
83
86
  puts "Note: all parameters from bake apply also here. Note, that --rebuild and --compile-only will be added to the internal bake call automatically."
84
87
  puts "Note: works only for GCC 4.1 and above"
85
88
  end
86
89
 
90
+ def checkNum(num)
91
+ if String === num && !/\A\d+\z/.match(num)
92
+ Bake.formatter.printError("Error: #{num} is not a positive number")
93
+ ExitHelper.exit(1)
94
+ end
95
+ end
96
+
87
97
  def setDefault(x)
88
98
  if (@default)
89
99
  Bake.formatter.printError("Error: '#{x}' not allowed, '#{@default}' already set.")
@@ -164,11 +174,11 @@ module Bake
164
174
  ExitHelper.exit(1)
165
175
  end
166
176
  # prio 2: with qac_home
167
- elsif File.exists?(@qac_home+"/#{RCF_DEFAULT}")
177
+ elsif !(mcps = Dir.glob(@qac_home+"/#{RCF_DEFAULT}")).empty?
168
178
  @mcpp_home = @qac_home
169
179
  # prio 3: next to qac_home
170
- elsif File.exists?(File.dirname(@qac_home)+"/mcpp-1.5.1/#{RCF_DEFAULT}")
171
- @mcpp_home = File.dirname(@qac_home)+"/mcpp-1.5.1"
180
+ elsif !(mcps = Dir.glob(File.dirname(@qac_home)+"/mcpp-*/")).empty?
181
+ @mcpp_home = mcps.sort.last[0..-2]
172
182
  else
173
183
  Bake.formatter.printError("Error: cannot find MCPP home folder. Specify MCPP_HOME.")
174
184
  ExitHelper.exit(1)
@@ -232,7 +242,12 @@ module Bake
232
242
  end
233
243
 
234
244
  if @rcf.nil?
235
- @rcf = @mcpp_home + "/#{RCF_DEFAULT}"
245
+ rcfs = Dir.glob(@mcpp_home+"/#{RCF_DEFAULT}")
246
+ if rcfs.empty?
247
+ Bake.formatter.printError("Error: rcf file not found: #{@mcpp_home+"/#{RCF_DEFAULT}"}")
248
+ ExitHelper.exit(1)
249
+ end
250
+ @rcf = rcfs.sort.last
236
251
  end
237
252
 
238
253
  @cct.each do |cct|
@@ -1,7 +1,7 @@
1
1
  module Bake
2
2
  class Version
3
3
  def self.number
4
- "2.41.4"
4
+ "2.42.0"
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.41.4
4
+ version: 2.42.0
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-11-27 00:00:00.000000000 Z
11
+ date: 2017-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rtext