Skip to content

Commit

Permalink
feat: Add content based test for conan_deps_module_extension
Browse files Browse the repository at this point in the history
  • Loading branch information
Neeeflix committed May 7, 2024
1 parent c7da4b4 commit c0d8468
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions conans/test/integration/toolchains/google/test_bazeldeps.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import pathlib
import textwrap

from conans.test.assets.genconanfile import GenConanfile
Expand Down Expand Up @@ -625,7 +626,16 @@ def load_conan_dependencies():
path="{recipes_folder}/dep",
build_file="{recipes_folder}/pkg/dep/BUILD.bazel",
)""") in content
content = client.load("conan_deps_module_extension.bzl")
assert textwrap.dedent(f"""\
def _load_dependenies_impl(mctx):
conan_dependency_repo(
name = "dep",
package_path = "{recipes_folder}/dep",
build_file_path = "{recipes_folder}/pkg/dep/BUILD.bazel",
)""") in content
content = client.load("dep/BUILD.bazel")
assert pathlib.Path(client.current_folder, "conan_deps_repo_rules.bzl").exists()
assert textwrap.dedent("""\
cc_import(
name = "mylib_precompiled",
Expand Down

0 comments on commit c0d8468

Please sign in to comment.