Skip to content

Commit

Permalink
removing duplicated, mocked unittests (#16956)
Browse files Browse the repository at this point in the history
Changelog: Omit
Docs: Omit

Pure refactor, to close this ticket
Close #11092

I have verified the tests removed are already covered by other existing
integration or functional tests
  • Loading branch information
ErniGH authored Sep 9, 2024
2 parents d99c714 + 6526af6 commit b564314
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 195 deletions.
32 changes: 32 additions & 0 deletions test/integration/toolchains/cmake/cmakedeps/test_cmakedeps.py
Original file line number Diff line number Diff line change
Expand Up @@ -787,3 +787,35 @@ def test_using_deployer_folder():
content = c.load("dep-release-x86_64-data.cmake")
assert ('set(dep_PACKAGE_FOLDER_RELEASE "${CMAKE_CURRENT_LIST_DIR}/mydeploy/direct_deploy/dep")'
in content)


def test_component_name_same_package():
"""
When the package and the component are the same the variables declared in data and linked
to the target have to be the same.
https://github.com/conan-io/conan/issues/9071
This doesn't seem to have any special treatment, in fact, last FIXME looks it could be
problematic
"""
c = TestClient()
dep = textwrap.dedent("""\
from conan import ConanFile
class Pkg(ConanFile):
name = "dep"
version = "0.1"
def package_info(self):
self.cpp_info.components["dep"].includedirs = ["myincludes"]
""")
c.save({"conanfile.py": dep})
c.run("create .")
c.run("install --requires=dep/0.1 -g CMakeDeps -s arch=x86_64")
cmake_data = c.load("dep-release-x86_64-data.cmake")
assert 'set(dep_dep_dep_INCLUDE_DIRS_RELEASE ' \
'"${dep_PACKAGE_FOLDER_RELEASE}/myincludes")' in cmake_data
cmake_target = c.load("dep-Target-release.cmake")
assert 'add_library(dep_dep_dep_DEPS_TARGET INTERFACE IMPORTED)' in cmake_target
assert 'set_property(TARGET dep::dep APPEND' in cmake_target
# FIXME: Depending on itself, this doesn't look good
assert 'set_property(TARGET dep::dep APPEND PROPERTY ' \
'INTERFACE_LINK_LIBRARIES dep::dep)' in cmake_target
195 changes: 0 additions & 195 deletions test/unittests/tools/cmake/test_cmakedeps.py

This file was deleted.

0 comments on commit b564314

Please sign in to comment.