Skip to content

Commit

Permalink
Fix some tests names and autotools v2 tests (#8299)
Browse files Browse the repository at this point in the history
* fix autotools v2 test

* rename tests

* simplify test

* minor changes

* move to integration
  • Loading branch information
czoido authored Jan 11, 2021
1 parent 074b652 commit 8f24eb0
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 45 deletions.
43 changes: 0 additions & 43 deletions conans/test/functional/conan_v2/build_helpers/autotools.py

This file was deleted.

30 changes: 30 additions & 0 deletions conans/test/integration/conan_v2/build_helpers/test_autotools.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import textwrap

from conans.test.utils.conan_v2_tests import ConanV2ModeTestCase


class AutotoolsBuildHelperTestCase(ConanV2ModeTestCase):
conanfile = textwrap.dedent("""
from conans import ConanFile, AutoToolsBuildEnvironment, tools
class Pkg(ConanFile):
settings = "os", "arch", "{}"
def run(cmd, *args, **kwargs):
pass
def build(self):
autotools = AutoToolsBuildEnvironment(self)
autotools.configure()
autotools.make()
""")

def test_no_build_type(self):
t = self.get_client()
t.save({"conanfile.py": self.conanfile.format("compiler")})
t.run("create . pkg/0.1@user/testing", assert_error=True)
self.assertIn("Conan v2 incompatible: build_type setting should be defined.", t.out)

def test_no_compiler(self):
t = self.get_client()
t.save({"conanfile.py": self.conanfile.format("build_type")})
t.run("create . pkg/0.1@user/testing", assert_error=True)
self.assertIn("Conan v2 incompatible: compiler setting should be defined.", t.out)
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import textwrap
import platform
import unittest

from conans.test.utils.conan_v2_tests import ConanV2ModeTestCase

Expand Down

0 comments on commit 8f24eb0

Please sign in to comment.