Skip to content

Commit f47a482

Browse files
committed
ci(tests): find path of golang-logfmt-echo dynamically
1 parent 56a5819 commit f47a482

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/test_formatter.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import logging
2+
import os
23
import re
4+
import shutil
35
import subprocess
46
import sys
57
import traceback
@@ -384,8 +386,13 @@ def test_external_tools_compatibility(value):
384386

385387
formatted = Logfmter(keys=["at"]).format(record)
386388

389+
exe = (
390+
shutil.which("golang-logfmt-echo")
391+
or os.getcwd() + "/external/golang-logfmt-echo/golang-logfmt-echo"
392+
)
393+
387394
result = subprocess.run(
388-
["golang-logfmt-echo"],
395+
[exe],
389396
check=False,
390397
input=formatted,
391398
capture_output=True,

0 commit comments

Comments
 (0)