Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Subfolder for the configure script (#9393)
* Subfolder for the configure script * Fix windows test * Renamed to build_script_folder * Build script modules * Fixed Mac test * review
- Loading branch information
Showing
6 changed files
with
52 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import os | ||
import textwrap | ||
|
||
from conan.tools.files import save_toolchain_args | ||
from conan.tools.gnu import Autotools | ||
from conans.test.utils.mocks import ConanFileMock | ||
from conans.test.utils.test_files import temp_folder | ||
|
||
|
||
def test_source_folder_works(): | ||
folder = temp_folder() | ||
os.chdir(folder) | ||
save_toolchain_args({ | ||
"configure_args": "-foo bar", | ||
"make_args": ""} | ||
) | ||
conanfile = ConanFileMock() | ||
conanfile.folders.set_base_install(folder) | ||
sources = "/path/to/sources" | ||
conanfile.folders.set_base_source(sources) | ||
autotools = Autotools(conanfile) | ||
autotools.configure(build_script_folder="subfolder") | ||
assert conanfile.command.replace("\\", "/") == "/path/to/sources/subfolder/configure -foo bar" | ||
|
||
autotools.configure() | ||
assert conanfile.command.replace("\\", "/") == "/path/to/sources/configure -foo bar" |