Skip to content

Commit

Permalink
Added go compiling at the beginning to remove go compilation stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
NiclasHaderer committed Apr 13, 2024
1 parent e0d611e commit f89d4af
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/duck_vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,14 @@ def run_default(*args: str) -> str:
binary = install_dir / binary
result = subprocess.run([str(binary), *args], capture_output=True, text=True)
return result.stdout


def compile_once():
args = ["go", "build", "-ldflags", "-X 'duckdb-version-manager/config.Version=100.0.0'", main_file]
result = subprocess.run(
args,
capture_output=True,
text=True,
)
if result.returncode != 0:
raise ValueError(result.stdout + result.stderr)
1 change: 1 addition & 0 deletions tests/e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class TestE2E(unittest.TestCase):

@classmethod
def setUpClass(cls):
duck_vm.compile_once()
local_versions = duck_vm.list_local_versions(True)
for version in local_versions:
duck_vm.uninstall_version(version)
Expand Down

0 comments on commit f89d4af

Please sign in to comment.