[tests] Add missing system libraries to test.
@@ -9,7 +9,7 @@ import numpy as np
import pytest
from flaky import flaky
-from compiler_gym.envs.llvm import LlvmEnv
+from compiler_gym.envs.llvm import LlvmEnv, llvm_benchmark
from compiler_gym.service.connection import ServiceError
from tests.test_main import main
@@ -37,7 +37,9 @@ def test_custom_benchmark_runtime(env: LlvmEnv, tmpdir, runtime_observation_coun
benchmark = env.make_benchmark(Path(tmpdir) / "program.c")
- benchmark.proto.dynamic_config.build_cmd.argument.extend(["$CC", "$IN"])
+ benchmark.proto.dynamic_config.build_cmd.argument.extend(
+ ["$CC", "$IN"] + llvm_benchmark.get_system_library_flags()
+ )
benchmark.proto.dynamic_config.build_cmd.outfile.extend(["a.out"])
benchmark.proto.dynamic_config.build_cmd.timeout_seconds = 10
@@ -73,7 +75,9 @@ def test_custom_benchmark_runtimes_differ(env: LlvmEnv, tmpdir):
benchmark = env.make_benchmark(Path(tmpdir) / "program.c")
- benchmark.proto.dynamic_config.build_cmd.argument.extend(["$CC", "$IN"])
+ benchmark.proto.dynamic_config.build_cmd.argument.extend(
+ ["$CC", "$IN"] + llvm_benchmark.get_system_library_flags()
+ )
benchmark.proto.dynamic_config.build_cmd.outfile.extend(["a.out"])
benchmark.proto.dynamic_config.build_cmd.timeout_seconds = 10
