Rename a variable name

This commit is contained in:
Naoto Ono 2024-07-19 15:52:33 +09:00 committed by Koichi Sasada
parent 09dd9a0457
commit d9bff41637
Notes: git 2024-07-19 07:39:38 +00:00

View File

@ -364,7 +364,7 @@ end
# In bootstraptest, we aggregate the test results based on file level. # In bootstraptest, we aggregate the test results based on file level.
module Launchable module Launchable
@@last_test_name = nil @@last_test_name = nil
@@stderr = '' @@failure_log = ''
@@duration = 0 @@duration = 0
def show_progress(message = '') def show_progress(message = '')
@ -372,7 +372,7 @@ module Launchable
if writer = BT.launchable_test_reports if writer = BT.launchable_test_reports
if faildesc if faildesc
@@stderr += faildesc @@failure_log += faildesc
end end
repo_path = File.expand_path("#{__dir__}/../") repo_path = File.expand_path("#{__dir__}/../")
relative_path = File.join(__dir__, self.path).delete_prefix("#{repo_path}/") relative_path = File.join(__dir__, self.path).delete_prefix("#{repo_path}/")
@ -380,7 +380,7 @@ module Launchable
# The test path is a URL-encoded representation. # The test path is a URL-encoded representation.
# https://github.com/launchableinc/cli/blob/v1.81.0/launchable/testpath.py#L18 # https://github.com/launchableinc/cli/blob/v1.81.0/launchable/testpath.py#L18
test_path = "#{encode_test_path_component("file")}=#{encode_test_path_component(@@last_test_name)}" test_path = "#{encode_test_path_component("file")}=#{encode_test_path_component(@@last_test_name)}"
if @@stderr.size > 0 if @@failure_log.size > 0
status = 'TEST_FAILED' status = 'TEST_FAILED'
else else
status = 'TEST_PASSED' status = 'TEST_PASSED'
@ -391,7 +391,7 @@ module Launchable
status: status, status: status,
duration: t, duration: t,
createdAt: Time.now.to_s, createdAt: Time.now.to_s,
stderr: @@stderr, stderr: @@failure_log,
stdout: nil, stdout: nil,
data: { data: {
lineNumber: self.lineno lineNumber: self.lineno
@ -399,7 +399,7 @@ module Launchable
} }
) )
@@duration = 0 @@duration = 0
@@stderr.clear @@failure_log.clear
end end
@@last_test_name = relative_path @@last_test_name = relative_path
@@duration += t @@duration += t