atp 0.4.1 → 0.4.2

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: 3ade09fa87d4ff3f63b38bb3ba4dca6524d7e5dd
4
- data.tar.gz: 05379db576550d3b423c28bb084ab170a6f96f9b
3
+ metadata.gz: cc41fbbf375fb2096a5a6448cd8cbb6a17c1acec
4
+ data.tar.gz: ce6ae9e83db3fb17a0e65054aa85aecaef755b47
5
5
  SHA512:
6
- metadata.gz: 56c43e8a9054f69982ea469dac331dffc32dce19861dbb5a8ecff0508311e800e32cda904d15944010f5a078dd437b1dc2cd0b62397fcd2b53450cf0839500ab
7
- data.tar.gz: 6b14b723b4efdb50a951711780158738228cafda516cdfd9efa10739633a7de45359a17c22777c75202aae7e59ca74e7175b7d8251ad909cd933a8198790c38d
6
+ metadata.gz: 920d52764ac0272df6f068412252587343194f04f3931dcdaf73c1905b78ea4d7129e27cfa4560c5017cad4a2ee5274fb021c27398d0d628eb4871a54bdfebc8
7
+ data.tar.gz: 11f5b29de3140272e07a2f8bf98c548f009f980f895666664b43fcb98f9775ecfb5e81807167810d5cb2bf530fee8a67688b95c31c32310cee3bc1d3aff6f859
data/config/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module ATP
2
2
  MAJOR = 0
3
3
  MINOR = 4
4
- BUGFIX = 1
4
+ BUGFIX = 2
5
5
  DEV = nil
6
6
 
7
7
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
data/lib/atp/flow.rb CHANGED
@@ -112,7 +112,7 @@ module ATP
112
112
  t = apply_open_conditions(options) do |options|
113
113
  conditions = options.delete(:conditions)
114
114
  options[:return] = true
115
- builder.cz(cz_setup, test(instance, options), conditions: conditions)
115
+ builder.cz(cz_setup, test(instance, options.merge(dont_apply_conditions: true)), conditions: conditions)
116
116
  end
117
117
  append(t)
118
118
  end
@@ -263,8 +263,10 @@ module ATP
263
263
  builder.new_context
264
264
  t = yield(options)
265
265
  unless options[:context] == :current
266
- open_conditions.each do |conditions|
267
- t = builder.apply_conditions(t, conditions)
266
+ unless options[:dont_apply_conditions]
267
+ open_conditions.each do |conditions|
268
+ t = builder.apply_conditions(t, conditions)
269
+ end
268
270
  end
269
271
  end
270
272
  t
@@ -10,7 +10,19 @@ module ATP
10
10
  end
11
11
 
12
12
  def on_test(node)
13
- @output += node.find(:name).value
13
+ if node.find(:name)
14
+ @output += node.find(:name).value
15
+ else
16
+ @output += node.find(:object).value['Test']
17
+ end
18
+ @output += ' F' if node.find(:failed)
19
+ @output += "\n"
20
+ end
21
+
22
+ def on_set_result(node)
23
+ @output += node.to_a[0].upcase
24
+ @output += " #{node.find(:bin).value}" if node.find(:bin)
25
+ @output += " #{node.find(:softbin).value}" if node.find(:softbin)
14
26
  @output += "\n"
15
27
  end
16
28
  end
data/lib/atp/runner.rb CHANGED
@@ -79,21 +79,23 @@ module ATP
79
79
  if failed_test_ids.include?(id)
80
80
  node = node.add(n0(:failed))
81
81
  failed = true
82
+ if n_on_fail = node.find(:on_fail)
83
+ node = node.remove(n_on_fail)
84
+ end
82
85
  end
83
86
  end
84
- # If there is a group on_fail, then remove any test specific one as that
85
- # will be overridden
86
- if @groups_on_fail.last
87
- if n_on_fail = node.find(:on_fail)
88
- node = node.remove(n_on_fail)
89
- end
90
- end
91
- if @groups_on_pass.last
87
+ unless failed
92
88
  if n_on_pass = node.find(:on_pass)
93
89
  node = node.remove(n_on_pass)
94
90
  end
95
91
  end
96
- container << node unless completed?
92
+
93
+ unless completed?
94
+ container << node
95
+ process_all(n_on_fail) if n_on_fail
96
+ process_all(n_on_pass) if n_on_pass
97
+ end
98
+
97
99
  if failed
98
100
  # Give indication to the parent group that at least one test within it failed
99
101
  if @groups.last
@@ -143,7 +145,7 @@ module ATP
143
145
  @groups_on_fail.pop
144
146
  @groups_on_pass.pop
145
147
  end
146
- container << node.updated(nil, c + [on_fail, on_pass])
148
+ container << node.updated(nil, c)
147
149
  end
148
150
 
149
151
  def on_set_result(node)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen McGinty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-03 00:00:00.000000000 Z
11
+ date: 2016-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: origen
@@ -121,4 +121,3 @@ signing_key:
121
121
  specification_version: 4
122
122
  summary: An abstract test program model for Origen
123
123
  test_files: []
124
- has_rdoc: