Skip to content

Commit c967f65

Browse files
committed
fixup! Edit Pipeline Trigger
1 parent 15f8150 commit c967f65

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

.pipelines/templates/run-unit-tests.yaml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,25 @@ stages:
129129
# Function to run the test and capture output
130130
def run_test():
131131
command = 'go test -timeout 30m -mod=readonly -buildvcs=false -tags "unit" '
132-
command += "--skip 'TestE2E*' -race -covermode atomic -coverprofile=windows-coverage.out ./npm/... ./cni/... ./platform/...; "
133-
command += 'go tool cover -func=windows-coverage.out'
134-
result = subprocess.Popen(command, shell=True, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=cwd)
132+
command += "--skip 'TestE2E*' -race -covermode atomic -coverprofile=windows-coverage.out ./npm/... ./cni/... ./platform/..."
133+
testing_process = subprocess.Popen(command, capture_output=True, shell=True, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=cwd)
134+
out, err = testing_process.communicate()
135135
test_exit_code = result.returncode
136+
print("Out:")
137+
print(out)
138+
print("Error:")
139+
print(err)
140+
print(test_exit_code)
141+
142+
command = 'go tool cover -func=windows-coverage.out'
143+
result = subprocess.Popen(command, capture_output=True, shell=True, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=cwd)
144+
out, err = testing_process.communicate()
145+
print("Out:")
146+
print(out)
147+
print("Error:")
148+
print(err)
149+
test_exit_code = result.returncode
150+
print(test_exit_code)
136151
print(os.listdir(cwd))
137152
138153
cov_out = os.path.join(cwd, 'windows-coverage.out')

0 commit comments

Comments
 (0)