bitfab 0.23.3 → 0.23.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/bitfab/replay.rb +19 -1
- data/lib/bitfab/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4c6103564370cdb20d6ed221a57c1cd29f8e410cd23ad3218b4eb0bda3ff3bd1
|
|
4
|
+
data.tar.gz: aded540c60d09f0838e529fc7616659fc6d64ad5dbcaf12baf396b164d741f7d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4ee3df19ee7101db92bea5305f61c67cc92d1bb5cdf4999cde05f31ee15b7e5090d5f474a35abb5814ca799a8849cea1cc3eda55064ec72bd2ac601c251622a0
|
|
7
|
+
data.tar.gz: 6729607659c50822d1799e86dfc3219cf7cfa5d47a8d9e82d5e8904918f3378a4d98b8f6a0bf9435ed8f34b147d96b061730424cbd2ce0a132d82e3a10c3f415
|
data/lib/bitfab/replay.rb
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require "fileutils"
|
|
4
|
+
require "json"
|
|
5
|
+
|
|
3
6
|
require_relative "constants"
|
|
4
7
|
require_relative "serialize"
|
|
5
8
|
require_relative "traceable"
|
|
@@ -239,11 +242,26 @@ module Bitfab
|
|
|
239
242
|
end
|
|
240
243
|
end
|
|
241
244
|
|
|
242
|
-
{
|
|
245
|
+
replay_result = {
|
|
243
246
|
items: result_items,
|
|
244
247
|
test_run_id:,
|
|
245
248
|
test_run_url: "#{client.service_url}#{test_run_url}"
|
|
246
249
|
}
|
|
250
|
+
write_replay_result_file(replay_result)
|
|
251
|
+
replay_result
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
def write_replay_result_file(result)
|
|
255
|
+
result_path = ENV["BITFAB_REPLAY_RESULT_PATH"]
|
|
256
|
+
return if result_path.nil? || result_path.empty?
|
|
257
|
+
|
|
258
|
+
begin
|
|
259
|
+
dir = File.dirname(result_path)
|
|
260
|
+
FileUtils.mkdir_p(dir) unless dir.nil? || dir.empty? || dir == "."
|
|
261
|
+
File.write(result_path, "#{JSON.pretty_generate(result)}\n")
|
|
262
|
+
rescue => e
|
|
263
|
+
warn "Bitfab: failed to write replay result to BITFAB_REPLAY_RESULT_PATH (#{result_path}): #{e.message}"
|
|
264
|
+
end
|
|
247
265
|
end
|
|
248
266
|
|
|
249
267
|
# Process all replay items, optionally in parallel using threads.
|
data/lib/bitfab/version.rb
CHANGED