forked from conan-io/conan
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
206 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
import unittest | ||
from conans.test.tools import TestClient, TestServer | ||
from conans.test.utils.cpp_test_files import cpp_hello_conan_files | ||
from conans.paths import is_case_insensitive_os, CONANFILE | ||
|
||
|
||
conanfile = ''' | ||
from conans import ConanFile | ||
class ConanLib(ConanFile): | ||
name = "Hello0" | ||
version = "0.1" | ||
def source(self): | ||
self.output.info("Running source!") | ||
''' | ||
|
||
|
||
class CaseSensitiveTest(unittest.TestCase): | ||
|
||
def install_test(self): | ||
test_server = TestServer() | ||
servers = {"default": test_server} | ||
client = TestClient(servers=servers, users={"default": [("lasote", "mypass")]}) | ||
|
||
files = cpp_hello_conan_files("Hello0", "0.1", build=False) | ||
client.save(files) | ||
client.run("export lasote/stable") | ||
|
||
client.run("install Hello0/0.1@lasote/stable --build missing") | ||
client.run("upload Hello0/0.1@lasote/stable --all") | ||
|
||
# If we try to install the same package with --build oudated it's already ok | ||
files = cpp_hello_conan_files("Hello1", "0.1", deps=["hello0/0.1@lasote/stable"], | ||
build=False) | ||
client.save(files) | ||
error = client.run("install", ignore_error=True) | ||
self._check(error, client) | ||
|
||
def _check(self, error, client): | ||
self.assertTrue(error) | ||
if is_case_insensitive_os(): | ||
self.assertIn("case incompatible 'Hello0'", client.user_io.out) | ||
else: | ||
self.assertNotIn("case incompatible 'Hello0'", client.user_io.out) | ||
|
||
def install_same_test(self): | ||
client = TestClient() | ||
client.save({CONANFILE: conanfile}) | ||
client.run("export lasote/stable") | ||
error = client.run("install hello0/0.1@lasote/stable --build=missing", ignore_error=True) | ||
self._check(error, client) | ||
|
||
def imports_test(self): | ||
client = TestClient() | ||
client.save({CONANFILE: conanfile}) | ||
client.run("export lasote/stable") | ||
client.run("install Hello0/0.1@lasote/stable --build=missing") | ||
error = client.run("imports hello0/0.1@lasote/stable", ignore_error=True) | ||
self._check(error, client) | ||
|
||
def package_test(self): | ||
client = TestClient() | ||
client.save({CONANFILE: conanfile}) | ||
client.run("export lasote/stable") | ||
client.run("install Hello0/0.1@lasote/stable --build=missing") | ||
error = client.run("package hello0/0.1@lasote/stable", ignore_error=True) | ||
self._check(error, client) | ||
|
||
def copy_test(self): | ||
client = TestClient() | ||
client.save({CONANFILE: conanfile}) | ||
client.run("export lasote/stable") | ||
client.run("install Hello0/0.1@lasote/stable --build=missing") | ||
error = client.run("copy hello0/0.1@lasote/stable otheruser/testing", ignore_error=True) | ||
self._check(error, client) | ||
|
||
def source_test(self): | ||
client = TestClient() | ||
client.save({CONANFILE: conanfile}) | ||
client.run("export lasote/stable") | ||
error = client.run("source hello0/0.1@lasote/stable", ignore_error=True) | ||
self._check(error, client) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.