bake-toolkit 2.40.1 → 2.41.0

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: 47018509fb45c727f0be0b11470726b01d13606a
4
- data.tar.gz: 3b0fa9295363deb6ee596df9c4c3d1c87d4c40e7
3
+ metadata.gz: 9265c5c61a09ad000f71da3b935c655ab972cb81
4
+ data.tar.gz: 287a266d8db00d5a34c197915a0cb8d42d3e154b
5
5
  SHA512:
6
- metadata.gz: d0ba48431dba2e59155c9d8026acce4a9f1d23a844ae4c347131d71a1b7150a24201e62f0b4afbd7e4c9a3581a12d2ee4a1a993c951ca744ce25aa82ae59889f
7
- data.tar.gz: aa757eb55d06270e41ecfb84d885ec0db3d94b37702f589cfd39f965f4df8870f1caed7b8126fffaeff6c3ba94a92d1119dced7509a9b2e49aab885de98a0008
6
+ metadata.gz: 7e0d5ea92a4b631dda6ac2540c3769a5bb963af978e69859c9ebb3c4d59fe08c6bba766d0475406a84fa016c2f5c0b28867684d65f07d2228448606156a5e79d
7
+ data.tar.gz: 424d1b303dbcdb345cc7f9e1a51d14b5ab5f6351328d3c8e3b9ca869713cfabca7cebf42b7af8a109a7d207e3cceca44a44e0bbe82940fa0461f60ad87c770af
data/bin/bakeqac CHANGED
@@ -281,7 +281,9 @@ $cmdRemoveLocks = qaExe + ["admin", "--qaf-project", @options.qacdata, "--remove
281
281
  converted_line = (scan_res[0][0].downcase + scan_res[0][1] + scan_res[0][2].gsub(/\\/,"/"))
282
282
  foundFile = ProjectFilter.localFile(converted_line)
283
283
  end
284
- if foundFile && (!line.include?("QAC++ Deep Flow Static Analyser") || !@options.qacmsgfilter)
284
+ if line.include?("requires QA C++ version")
285
+ filteredLines << line # either downgrade gcc or upgrade QA C++
286
+ elsif foundFile && (!line.include?("QAC++ Deep Flow Static Analyser") || !@options.qacmsgfilter)
285
287
  filteredLines << line
286
288
  else
287
289
  misraLine = ["MSG: ", "trc: ", "// ======= Results for", "QAC++ Deep Flow Static Analyser"].none? { |pattern| line.include?(pattern) }
@@ -343,40 +343,6 @@ module Bake
343
343
  @potentialProjs.uniq!
344
344
  end
345
345
 
346
- def filterStep(step, globalFilterStr)
347
-
348
- # 1st prio: explicit single filter
349
- if step.filter != ""
350
- return true if Bake.options.exclude_filter.include?step.filter
351
- return false if Bake.options.include_filter.include?step.filter
352
- end
353
-
354
- # 2nd prio: explicit global filter
355
- if globalFilterStr != nil
356
- return true if Bake.options.exclude_filter.include?globalFilterStr
357
- return false if Bake.options.include_filter.include?globalFilterStr
358
- end
359
-
360
- # 3nd prio: default
361
- return true if step.default == "off"
362
- false
363
- end
364
-
365
- def filterSteps
366
- @referencedConfigs.each do |projName, configs|
367
- configs.each do |config|
368
- config.startupSteps.step = config.startupSteps.step.delete_if { |step| filterStep(step, "STARTUP") } if config.startupSteps
369
- config.preSteps.step = config.preSteps.step.delete_if { |step| filterStep(step, "PRE") } if config.preSteps
370
- config.postSteps.step = config.postSteps.step.delete_if { |step| filterStep(step, "POST") } if config.postSteps
371
- config.exitSteps.step = config.exitSteps.step.delete_if { |step| filterStep(step, "EXIT") } if config.exitSteps
372
- config.cleanSteps.step = config.cleanSteps.step.delete_if { |step| filterStep(step, "CLEAN") } if config.cleanSteps
373
- if Metamodel::CustomConfig === config and config.step
374
- config.step = nil if filterStep(config.step, nil)
375
- end
376
- end
377
- end
378
- end
379
-
380
346
  def defaultConfigName
381
347
  @loadedConfigs[Bake.options.main_project_name].first.parent.default
382
348
  end
@@ -420,7 +386,6 @@ module Bake
420
386
  loadMeta(dep)
421
387
  end
422
388
 
423
- filterSteps
424
389
  return @referencedConfigs
425
390
  end
426
391
 
@@ -32,6 +32,14 @@ module Bake
32
32
  end
33
33
 
34
34
  @model = RGen::Fragment::FragmentedModel.new(:env => @env)
35
+
36
+ @globalFilterStrMap = {
37
+ Bake::Metamodel::StartupSteps => "STARTUP",
38
+ Bake::Metamodel::PreSteps => "PRE",
39
+ Bake::Metamodel::PostSteps => "POST",
40
+ Bake::Metamodel::ExitSteps => "EXIT",
41
+ Bake::Metamodel::CleanSteps => "CLEAN"
42
+ }
35
43
  end
36
44
 
37
45
  def load_internal(filename, silent = false)
@@ -68,6 +76,62 @@ module Bake
68
76
  frag
69
77
  end
70
78
 
79
+ def filterElement?(elem)
80
+ return false if Bake::Metamodel::Project === elem
81
+
82
+ # 1st prio: explicit single filter
83
+ if elem.filter != ""
84
+ return true if Bake.options.exclude_filter.include?elem.filter
85
+ return false if Bake.options.include_filter.include?elem.filter
86
+ end
87
+
88
+ # 2nd prio: explicit global filter
89
+ if defined?(elem.parent)
90
+ globalFilterStr = @globalFilterStrMap[elem.parent.class]
91
+ if (globalFilterStr)
92
+ return true if Bake.options.exclude_filter.include?globalFilterStr
93
+ return false if Bake.options.include_filter.include?globalFilterStr
94
+ end
95
+ end
96
+
97
+ # 3nd prio: default
98
+ return true if elem.default == "off"
99
+ false
100
+ end
101
+
102
+ def applyFilterOnArray(a)
103
+ toRemove = []
104
+ a.each do |elem|
105
+ if filterElement?(elem)
106
+ toRemove << elem
107
+ else
108
+ applyFilterOnElement(elem)
109
+ end
110
+ end
111
+ toRemove.each { |r| r.parent = nil }
112
+ end
113
+
114
+ def applyFilterOnElement(elem)
115
+ return if elem.nil?
116
+ elem.class.ecore.eAllReferences.each do |f|
117
+ next unless f.containment
118
+ begin
119
+ childData = elem.getGeneric(f.name)
120
+ rescue Exception => ex
121
+ next
122
+ end
123
+ next if childData.nil?
124
+ if (Array === childData)
125
+ applyFilterOnArray(childData)
126
+ elsif Metamodel::ModelElement === childData
127
+ if filterElement?(childData)
128
+ childData.parent = nil
129
+ else
130
+ applyFilterOnElement(childData)
131
+ end
132
+ end
133
+ end
134
+ end
71
135
 
72
136
  def load(filename)
73
137
  sumErrors = 0
@@ -98,6 +162,8 @@ module Bake
98
162
  ExitHelper.exit(1)
99
163
  end
100
164
 
165
+ applyFilterOnArray(frag.root_elements)
166
+
101
167
  return frag
102
168
 
103
169
  end
@@ -8,6 +8,8 @@ module Bake
8
8
 
9
9
  class ModelElement < RGen::MetamodelBuilder::MMBase
10
10
  abstract
11
+ has_attr 'default', String, :defaultValueLiteral => "on"
12
+ has_attr 'filter', String, :defaultValueLiteral => ""
11
13
  has_attr 'line_number', Integer do
12
14
  annotation :details => {'internal' => 'true'}
13
15
  end
@@ -181,8 +183,6 @@ module Bake
181
183
 
182
184
  class Step < ModelElement
183
185
  has_attr 'name', String, :defaultValueLiteral => ""
184
- has_attr 'default', String, :defaultValueLiteral => "on"
185
- has_attr 'filter', String, :defaultValueLiteral => ""
186
186
  has_attr 'echo', String, :defaultValueLiteral => "on"
187
187
  has_attr 'independent', Boolean, :defaultValueLiteral => "false"
188
188
  has_many_attr 'validExitCodes', Integer
@@ -179,10 +179,13 @@ module Bake
179
179
  @adapt.uniq!
180
180
 
181
181
  if @project
182
- if @project.split(',').length > 2
182
+ ar = @project.split(",")
183
+ if ar.length > 2
183
184
  Bake.formatter.printError("Error: only one comma allowed for -p")
184
185
  ExitHelper.exit(1)
185
186
  end
187
+ ar[0] = File::basename(Dir.pwd) if ar[0] == "."
188
+ @project = ar.join(",")
186
189
  end
187
190
 
188
191
  if @conversion_info
@@ -38,10 +38,10 @@ module Bake
38
38
  puts " --toolchain-info <name> Prints default values of a toolchain."
39
39
  puts " --toolchain-names Prints available toolchains."
40
40
  puts " --dot <filename> Creates a .dot file of the config dependencies."
41
- puts " --do <name>[=<arg>] Includes steps with this filter name (can be used multiple times)."
41
+ puts " --do <name>[=<arg>] Includes elements with this filter name (can be used multiple times)."
42
42
  puts " Optional arguments which can be accessed in Project.meta via $(FilterArguments, <name>)."
43
43
  puts " 'PRE', 'POST', 'STARTUP', 'EXIT' or 'CLEAN' includes all according steps."
44
- puts " --omit <name> Excludes steps with this filter name (can be used multiple times)."
44
+ puts " --omit <name> Excludes elements with this filter name (can be used multiple times)."
45
45
  puts " 'PRE', 'POST', 'STARTUP', 'EXIT' or 'CLEAN' excludes all according steps."
46
46
  puts " --abs-paths Compiler prints absolute filename paths instead of relative paths."
47
47
  puts " --Wparse The error parser result is also taken into account, not only the return value of compiler, archiver and linker."
@@ -1,7 +1,7 @@
1
1
  module Bake
2
2
  class Version
3
3
  def self.number
4
- "2.40.1"
4
+ "2.41.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.40.1
4
+ version: 2.41.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-10-10 00:00:00.000000000 Z
11
+ date: 2017-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rtext
@@ -84,56 +84,56 @@ dependencies:
84
84
  name: rake
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: '0.1'
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
- version: '0'
96
+ version: '0.1'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rspec
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
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: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: simplecov
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - '>='
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
117
  version: '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: '0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: coveralls
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - '>='
129
+ - - ">="
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
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: '0'
139
139
  description: See documentation for more details
@@ -248,23 +248,23 @@ licenses:
248
248
  metadata: {}
249
249
  post_install_message:
250
250
  rdoc_options:
251
- - -x
251
+ - "-x"
252
252
  - doc
253
253
  require_paths:
254
254
  - lib
255
255
  required_ruby_version: !ruby/object:Gem::Requirement
256
256
  requirements:
257
- - - '>='
257
+ - - ">="
258
258
  - !ruby/object:Gem::Version
259
259
  version: '1.9'
260
260
  required_rubygems_version: !ruby/object:Gem::Requirement
261
261
  requirements:
262
- - - '>='
262
+ - - ">="
263
263
  - !ruby/object:Gem::Version
264
264
  version: '0'
265
265
  requirements: []
266
266
  rubyforge_project:
267
- rubygems_version: 2.6.7
267
+ rubygems_version: 2.6.13
268
268
  signing_key:
269
269
  specification_version: 4
270
270
  summary: Build tool to compile C/C++ projects fast and easy.