test_bench-isolated 2.0.0.2 → 2.0.0.4
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 +4 -4
- data/lib/test_bench_isolated/test_bench/cli.rb +11 -4
- data/lib/test_bench_isolated/test_bench/run/get_files.rb +1 -1
- data/lib/test_bench_isolated/test_bench/run/run.rb +11 -9
- data/lib/test_bench_isolated/test_bench/session/session.rb +23 -0
- metadata +4 -4
- /data/script/{bench → bench-isolated} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9375771e0d1abf769eee3145eb9b9844d025b35aed24f0e97c4105f06a4e571
|
4
|
+
data.tar.gz: f2833acd1612f360f89f582dbfa58369ffa8f0e22c9c0828bee0a41ffdf62e88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85cd5bef0f916954f7ce6f38009a05dab83968d24f16a6b5b34ac75ca250584a4f592a274fad51d59db8e1e3dd0ad21d5703b5ee3dda935dde58b5604788b680
|
7
|
+
data.tar.gz: 1b9e6fa798eb63bad067a8972d505adde572855091e239dda9fe6786053951bc4afcb4044b92dec4d44608f8e6e5772041d67b7444aec90e4265a2bd9674d018
|
@@ -148,12 +148,19 @@ module TestBenchIsolated
|
|
148
148
|
|
149
149
|
when '-x', '--exclude', '--no-exclude'
|
150
150
|
if not negated?(switch)
|
151
|
-
|
151
|
+
exclude_pattern_text = switch_value!(argument_index, switch)
|
152
|
+
|
153
|
+
if env.key?('TEST_BENCH_EXCLUDE_FILE_PATTERN')
|
154
|
+
exclude_pattern_text = [
|
155
|
+
env['TEST_BENCH_EXCLUDE_FILE_PATTERN'],
|
156
|
+
exclude_pattern_text
|
157
|
+
].join(':')
|
158
|
+
end
|
152
159
|
else
|
153
|
-
|
160
|
+
exclude_pattern_text = ''
|
154
161
|
end
|
155
162
|
|
156
|
-
env['TEST_BENCH_EXCLUDE_FILE_PATTERN'] =
|
163
|
+
env['TEST_BENCH_EXCLUDE_FILE_PATTERN'] = exclude_pattern_text
|
157
164
|
|
158
165
|
when '-f', '--only-failure', '--no-only-failure'
|
159
166
|
if not negated?(switch)
|
@@ -206,7 +213,7 @@ module TestBenchIsolated
|
|
206
213
|
|
207
214
|
Configuration Options:
|
208
215
|
\t-d, --[no]detail Always show (or hide) details (Default: #{Session::Output::Detail.default})
|
209
|
-
\t-x, --[no-]exclude PATTERN Do not execute test files matching PATTERN (Default: #{Run::GetFiles::Defaults.
|
216
|
+
\t-x, --[no-]exclude PATTERN Do not execute test files matching PATTERN (Default: #{Run::GetFiles::Defaults.exclude_patterns.inspect})
|
210
217
|
\t-f, --[no-]only-failure Don't display output for test files that pass (Default: #{Run::Output::File::Defaults.only_failure ? 'on' : 'off'})
|
211
218
|
\t-o, --output-styling [on|off|detect]
|
212
219
|
\t Render output coloring and font styling escape codes (Default: #{Output::Writer::Styling.default})
|
@@ -35,7 +35,7 @@ module TestBenchIsolated
|
|
35
35
|
end
|
36
36
|
attr_writer :path_sequence
|
37
37
|
|
38
|
-
def self.build(exclude: nil)
|
38
|
+
def self.build(exclude: nil, session: nil)
|
39
39
|
instance = new
|
40
40
|
|
41
41
|
GetFiles.configure(instance, exclude:)
|
@@ -44,14 +44,16 @@ module TestBenchIsolated
|
|
44
44
|
|
45
45
|
Random.configure(instance)
|
46
46
|
|
47
|
-
session
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
47
|
+
if session.nil?
|
48
|
+
session = Session.build do |telemetry|
|
49
|
+
Output::File.register(telemetry)
|
50
|
+
Output::Summary::Error.register(telemetry)
|
51
|
+
Output::Summary.register(telemetry)
|
52
|
+
end
|
53
53
|
end
|
54
54
|
|
55
|
+
instance.telemetry = session.telemetry
|
56
|
+
|
55
57
|
Session.configure(instance, session:)
|
56
58
|
|
57
59
|
instance
|
@@ -67,10 +69,10 @@ module TestBenchIsolated
|
|
67
69
|
instance.(path)
|
68
70
|
end
|
69
71
|
|
70
|
-
def self.configure(receiver, exclude: nil, attr_name: nil)
|
72
|
+
def self.configure(receiver, exclude: nil, session: nil, attr_name: nil)
|
71
73
|
attr_name ||= :run
|
72
74
|
|
73
|
-
instance = build(exclude:)
|
75
|
+
instance = build(exclude:, session:)
|
74
76
|
receiver.public_send(:"#{attr_name}=", instance)
|
75
77
|
end
|
76
78
|
|
@@ -44,6 +44,29 @@ module TestBenchIsolated
|
|
44
44
|
receiver.public_send(:"#{attr_name}=", instance)
|
45
45
|
end
|
46
46
|
|
47
|
+
def inspect
|
48
|
+
text = self.to_s
|
49
|
+
|
50
|
+
instance_variables = self.instance_variables - [:@telemetry]
|
51
|
+
|
52
|
+
instance_variables.each_with_index do |name, index|
|
53
|
+
ivar_text = String.new
|
54
|
+
|
55
|
+
if index > 0
|
56
|
+
ivar_text << ','
|
57
|
+
end
|
58
|
+
|
59
|
+
value = instance_variable_get(name)
|
60
|
+
value = value.inspect
|
61
|
+
|
62
|
+
ivar_text << " #{name}=#{value}"
|
63
|
+
|
64
|
+
text.insert(-2, ivar_text)
|
65
|
+
end
|
66
|
+
|
67
|
+
text
|
68
|
+
end
|
69
|
+
|
47
70
|
def passed?
|
48
71
|
asserted? && !failed? && !skipped?
|
49
72
|
end
|
metadata
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: test_bench-isolated
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.
|
4
|
+
version: 2.0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Ladd
|
8
8
|
autorequire:
|
9
9
|
bindir: script
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: nathanladd+github@gmail.com
|
15
15
|
executables:
|
16
|
-
- bench
|
16
|
+
- bench-isolated
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
@@ -166,7 +166,7 @@ files:
|
|
166
166
|
- lib/test_bench_isolated/test_bench/telemetry/substitute/sink.rb
|
167
167
|
- lib/test_bench_isolated/test_bench/telemetry/telemetry.rb
|
168
168
|
- lib/test_bench_isolated/test_bench/test_bench.rb
|
169
|
-
- script/bench
|
169
|
+
- script/bench-isolated
|
170
170
|
homepage: https://github.com/test-bench/test-bench-isolated
|
171
171
|
licenses:
|
172
172
|
- MIT
|
File without changes
|