diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index a7ee5aa5..c6fd64b3 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -2,7 +2,7 @@ name: Code quality and sanity on: push: - branches: '*' + branches: 'main' pull_request: branches: '*' @@ -22,12 +22,12 @@ jobs: - uses: hecrj/setup-rust-action@v1 with: components: clippy - - - name: Verifiying the code quality with Clippy + + - name: Verifiying the code quality with Clippy run: | cd zork++ cargo clippy --all-targets --all-features - + rustfmt: name: Verify code formatting runs-on: ubuntu-latest @@ -36,51 +36,17 @@ jobs: - name: Caching project dependencies id: project-cache uses: Swatinem/rust-cache@v2 - - uses: hecrj/setup-rust-action@v1 + + - uses: hecrj/setup-rust-action@v2 with: components: rustfmt + - name: Checking the format sanity of the project run: | cd zork++ cargo fmt --all -- --check - tests: - name: Run the tests - Clang - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - clang_version: [15, 16, 17] - steps: - - uses: actions/checkout@v3 - - name: Caching project dependencies - id: project-cache - uses: Swatinem/rust-cache@v2 - - name: Install Clang ${{ matrix.clang_version }} - run: | - # Exit on error - set -e - # Download and execute the LLVM installation script for the specified Clang version - echo "-----> Downloading and executing the LLVM installation script for Clang ${{ matrix.clang_version }}" - wget https://apt.llvm.org/llvm.sh - chmod +x llvm.sh - sudo ./llvm.sh ${{ matrix.clang_version }} - - echo "-----> Installing libc++" - sudo apt-get install -y libc++-${{ matrix.clang_version }}-dev libc++abi-${{ matrix.clang_version }}-dev libunwind-${{ matrix.clang_version }} libunwind-${{ matrix.clang_version }}-dev libc6 libzstd1 - - # Update the symbolic link to point to the newly installed Clang version - echo "-----> Updating the symbolic link to point to Clang ${{ matrix.clang_version }}" - sudo rm -f /usr/bin/clang++ - sudo ln -s /usr/bin/clang++-${{ matrix.clang_version }} /usr/bin/clang++ - - - # Display the installation directory and version of the installed Clang - echo "-----> Clang-${{ matrix.clang_version }} was installed on:" - which clang-${{ matrix.clang_version }} - echo "-----> Clang++ was installed on:" - which clang++-${{ matrix.clang_version }} - - name: Running the tests for the project + - name: Run Unit and Doc tests run: | - cd zork++ - RUST_LOG=trace cargo test 2>&1 --all --color=always --no-fail-fast -- --nocapture --show-output --test-threads=1 + cargo test --workspace --lib --color=always --no-fail-fast + cargo test --workspace --doc --color=always --no-fail-fast diff --git a/.github/workflows/tests-clang-linux.yml b/.github/workflows/tests-clang-linux.yml new file mode 100644 index 00000000..b2bf910e --- /dev/null +++ b/.github/workflows/tests-clang-linux.yml @@ -0,0 +1,52 @@ +name: Clang Tests For Linux builds + +on: + push: + branches: 'main' + pull_request: + branches: '*' + +jobs: + tests: + name: Run the tests - Clang + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + clang_version: [15, 16, 17, 18] + steps: + - uses: actions/checkout@v3 + - name: Caching project dependencies + id: project-cache + uses: Swatinem/rust-cache@v2 + + - if: ${{ matrix.clang_version < 18 }} + name: Install Clang ${{ matrix.clang_version }} + run: | + # Exit on error + set -e + # Download and execute the LLVM installation script for the specified Clang version + echo "-----> Downloading and executing the LLVM installation script for Clang ${{ matrix.clang_version }}" + wget https://apt.llvm.org/llvm.sh + chmod +x llvm.sh + sudo ./llvm.sh ${{ matrix.clang_version }} + + echo "-----> Installing libc++" + sudo apt-get install -y libc++-${{ matrix.clang_version }}-dev libc++abi-${{ matrix.clang_version }}-dev libunwind-${{ matrix.clang_version }} libunwind-${{ matrix.clang_version }}-dev libc6 libzstd1 + + # Update the symbolic link to point to the newly installed Clang version + echo "-----> Updating the symbolic link to point to Clang ${{ matrix.clang_version }}" + sudo rm -f /usr/bin/clang++ + sudo ln -s /usr/bin/clang++-${{ matrix.clang_version }} /usr/bin/clang++ + + # Display the installation directory and version of the installed Clang + echo "-----> Clang-${{ matrix.clang_version }} was installed on:" + which clang-${{ matrix.clang_version }} + echo "-----> Clang++ was installed on:" + which clang++-${{ matrix.clang_version }} + + - if: ${{ matrix.clang_version < 18 }} + name: Running the tests for the project + run: | + cd zork++ + RUST_LOG=trace cargo test 2>&1 clang --color=always --no-fail-fast -- --nocapture --show-output --test-threads=1 diff --git a/.github/workflows/tests-gcc.yml b/.github/workflows/tests-gcc.yml new file mode 100644 index 00000000..64d78d47 --- /dev/null +++ b/.github/workflows/tests-gcc.yml @@ -0,0 +1,25 @@ +name: GCC Tests For Linux builds + +on: + push: + branches: 'main' + pull_request: + branches: '*' + +jobs: + tests: + name: Run the tests - GCC + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - uses: actions/checkout@v3 + + - name: Caching project dependencies + id: project-cache + uses: Swatinem/rust-cache@v2 + + - name: Running the tests for the project + run: | + cd zork++ + RUST_LOG=trace cargo test 2>&1 gcc --color=always --no-fail-fast -- --nocapture --show-output --test-threads=1 diff --git a/.github/workflows/tests-msvc.yml b/.github/workflows/tests-msvc.yml new file mode 100644 index 00000000..842109fd --- /dev/null +++ b/.github/workflows/tests-msvc.yml @@ -0,0 +1,30 @@ +name: MSVC Tests For Windows builds + +on: + push: + branches: 'main' + pull_request: + branches: '*' + +jobs: + tests: + name: Run the tests - MSVC + runs-on: windows-latest + strategy: + fail-fast: false + steps: + - uses: actions/checkout@v3 + + - name: Caching project dependencies + id: project-cache + uses: Swatinem/rust-cache@v2 + + - name: Setting up Rust + uses: hecrj/setup-rust-action@v1 + with: + rust-version: stable + + - name: Running the tests for the project + run: | + cd zork++ + cargo test 2>&1 msvc --color=always --no-fail-fast -- --nocapture --show-output --test-threads=1 diff --git a/zork++/src/lib/cache/mod.rs b/zork++/src/lib/cache/mod.rs index 893120e2..8a4b7024 100644 --- a/zork++/src/lib/cache/mod.rs +++ b/zork++/src/lib/cache/mod.rs @@ -204,7 +204,7 @@ impl ZorkCache { .entry(PathBuf::from(named_target)) .and_modify(|e| { if !(*e).eq(&commands_details.main.command) { - *e = commands_details.main.command.clone() + e.clone_from(&commands_details.main.command) } }) .or_insert(commands_details.main.command.clone()); diff --git a/zork++/src/lib/config_file/build.rs b/zork++/src/lib/config_file/build.rs index 9225efac..7242856c 100644 --- a/zork++/src/lib/config_file/build.rs +++ b/zork++/src/lib/config_file/build.rs @@ -23,7 +23,7 @@ use serde::*; /// /// assert_eq!(config.output_dir, Some("out")); /// ``` -#[derive(Deserialize, Debug, PartialEq)] +#[derive(Deserialize, Debug, PartialEq, Clone)] #[serde(deny_unknown_fields)] pub struct BuildAttribute<'a> { #[serde(borrow)] diff --git a/zork++/src/lib/config_file/compiler.rs b/zork++/src/lib/config_file/compiler.rs index e1b8437b..d37136e9 100644 --- a/zork++/src/lib/config_file/compiler.rs +++ b/zork++/src/lib/config_file/compiler.rs @@ -66,7 +66,7 @@ use crate::project_model; /// /// For a test over a real example, please look at the /// [`zork::config_file::ZorkConfigFile`] doc-test -#[derive(Deserialize, Debug, PartialEq, Default)] +#[derive(Deserialize, Debug, PartialEq, Default, Clone)] #[serde(deny_unknown_fields)] pub struct CompilerAttribute<'a> { pub cpp_compiler: CppCompiler, diff --git a/zork++/src/lib/config_file/mod.rs b/zork++/src/lib/config_file/mod.rs index f01e08d0..c498be1c 100644 --- a/zork++/src/lib/config_file/mod.rs +++ b/zork++/src/lib/config_file/mod.rs @@ -6,9 +6,11 @@ pub mod executable; pub mod modules; pub mod project; pub mod tests; +pub mod workspace; use std::fmt::Debug; +use crate::config_file::workspace::WorkspaceAttribute; use serde::Deserialize; use self::{ @@ -42,8 +44,10 @@ use self::{ /// The [`ZorkConfigFile`] is the type that holds /// the whole hierarchy of Zork++ config file attributes /// and properties -#[derive(Deserialize, Debug, Default)] +#[derive(Deserialize, Debug, Default, Clone)] pub struct ZorkConfigFile<'a> { + #[serde(borrow)] + pub workspace: Option>, #[serde(borrow)] pub project: ProjectAttribute<'a>, #[serde(borrow)] diff --git a/zork++/src/lib/config_file/modules.rs b/zork++/src/lib/config_file/modules.rs index e5f7d80d..d6004b54 100644 --- a/zork++/src/lib/config_file/modules.rs +++ b/zork++/src/lib/config_file/modules.rs @@ -59,7 +59,7 @@ use serde::Deserialize; /// assert_eq!(&gcc_sys_headers[3], &"type_traits"); /// assert_eq!(&gcc_sys_headers[4], &"functional"); /// ``` -#[derive(Deserialize, Debug, PartialEq)] +#[derive(Deserialize, Debug, PartialEq, Clone)] pub struct ModulesAttribute<'a> { #[serde(borrow)] pub base_ifcs_dir: Option<&'a str>, @@ -132,7 +132,7 @@ pub struct ModulesAttribute<'a> { /// assert_eq!(ifc_3.file, "some_module_part.cppm"); /// assert_eq!(ifc_3.module_name, Some("math_part")); /// ``` -#[derive(Deserialize, Debug, PartialEq)] +#[derive(Deserialize, Debug, PartialEq, Clone)] #[serde(deny_unknown_fields)] pub struct ModuleInterface<'a> { #[serde(borrow)] @@ -158,7 +158,7 @@ pub struct ModuleInterface<'a> { /// * `is_internal_partition` - Optional field for declare that the module is actually /// a module for hold implementation details, known as module implementation partitions. /// This option only takes effect with MSVC -#[derive(Deserialize, Debug, PartialEq)] +#[derive(Deserialize, Debug, PartialEq, Clone)] pub struct ModulePartition<'a> { #[serde(borrow)] pub module: &'a str, @@ -200,7 +200,7 @@ pub struct ModulePartition<'a> { /// assert_eq!(deps[1], "type_traits"); /// assert_eq!(deps[2], "iostream"); /// ``` -#[derive(Deserialize, Debug, PartialEq)] +#[derive(Deserialize, Debug, PartialEq, Clone)] pub struct ModuleImplementation<'a> { #[serde(borrow)] pub file: &'a str, diff --git a/zork++/src/lib/config_file/project.rs b/zork++/src/lib/config_file/project.rs index 86e96634..e1464659 100644 --- a/zork++/src/lib/config_file/project.rs +++ b/zork++/src/lib/config_file/project.rs @@ -35,7 +35,7 @@ use serde::*; /// /// For a test over a real example, please look at the /// [`zork::config_file::ZorkConfigFile`] doc-test -#[derive(Deserialize, Debug, PartialEq, Default)] +#[derive(Deserialize, Debug, PartialEq, Default, Clone)] #[serde(deny_unknown_fields)] pub struct ProjectAttribute<'a> { pub name: &'a str, diff --git a/zork++/src/lib/config_file/tests.rs b/zork++/src/lib/config_file/tests.rs index 73f24a83..8f53f86f 100644 --- a/zork++/src/lib/config_file/tests.rs +++ b/zork++/src/lib/config_file/tests.rs @@ -38,7 +38,7 @@ use serde::*; /// /// For a test over a real example, please look at the /// [`zork::config_file::ZorkConfigFile`] doc-test -#[derive(Deserialize, Debug, PartialEq)] +#[derive(Deserialize, Debug, PartialEq, Clone)] pub struct TestsAttribute<'a> { #[serde(borrow)] pub test_executable_name: Option<&'a str>, diff --git a/zork++/src/lib/config_file/workspace.rs b/zork++/src/lib/config_file/workspace.rs new file mode 100644 index 00000000..6650aa56 --- /dev/null +++ b/zork++/src/lib/config_file/workspace.rs @@ -0,0 +1,39 @@ +use serde::Deserialize; + +/// [`WorkspaceAttribute`] - Defines the characteristics of a `Zork++` workspace. +/// +/// A `Zork++` workspace is a similar concept to Cargo workspaces, where the managed by +/// the workspace collection of projects shares dependencies, a common output directory, +/// metadata attributes... Commands applied to a workspace are propagated down to the +/// workspace members. +/// +/// This allows the user to divide a project into smaller pieces, or create new organization +/// structures for more complex configurations. +/// +/// * `members` - A collection of the names by which the dependent projects (every member of the ws) +/// has been defined in their own `zork**.toml` config file in the **project_name** key +/// +/// ### Tests +/// +/// ```rust +/// use zork::config_file::workspace::{ +/// WorkspaceAttribute +/// }; +/// + +/// ``` +/// +/// > Note: TOML table are toml commented (#) to allow us to parse +/// the inner attributes as the direct type that they belongs to. +/// That commented tables aren't the real TOML, they are just there +/// for testing and exemplification purposes of the inner attributes +/// of the configuration file. +/// +/// For a test over a real example, please look at the +/// [`zork::config_file::ZorkConfigFile`] doc-test +#[derive(Deserialize, Debug, PartialEq, Default, Clone)] +#[serde(deny_unknown_fields)] +pub struct WorkspaceAttribute<'a> { + #[serde(borrow)] + pub members: Vec<&'a str>, +} diff --git a/zork++/src/lib/lib.rs b/zork++/src/lib/lib.rs index cf5ceccf..43888063 100644 --- a/zork++/src/lib/lib.rs +++ b/zork++/src/lib/lib.rs @@ -29,7 +29,7 @@ pub mod worker { project_model::{compiler::CppCompiler, ZorkModel}, utils::{ self, - reader::{build_model, find_config_files, ConfigFile}, + reader::{build_model, find_config_files}, template::create_templated_project, }, }; @@ -63,35 +63,44 @@ pub mod worker { ); }; - /* let project_root = if cli_args.root.is_none() { - project - .project_root - .map(Path::new) - .unwrap_or(Path::new(".")) - } else { - Path::new(cli_args.root.as_ref().unwrap()) - }; */ - - let config_files: Vec = find_config_files(project_root, &cli_args.match_files) - .with_context(|| "We didn't found a valid Zork++ configuration file")?; - log::trace!("Config files found: {config_files:?}"); - - for config_file in config_files { - log::debug!( - "Launching a Zork++ work event for the configuration file: {:?}, located at: {:?}\n", - config_file.dir_entry.file_name(), - config_file.path + // Find and store the config file paths directly. + let config_files_raw = find_config_files(project_root, &cli_args.match_files) + .with_context(|| "We didn't found a valid Zork++ configuration file") + .unwrap(); + let config_file_paths: Vec<_> = config_files_raw + .iter() + .map(|cfg| cfg.path.clone()) + .collect(); + log::trace!("Config files found: {config_file_paths:?}"); + + // Read the file contents and store them in a Vec of strings. + let mut config_file_contents: Vec = Vec::new(); + for config_file_path in &config_file_paths { + let contents = fs::read_to_string(config_file_path) + .with_context(|| { + format!( + "An error happened parsing the configuration file: {:?}", + config_file_path.file_name() + ) + }) + .expect("UPS"); + config_file_contents.push(contents); + } + + // Deserialize the config files one by one, passing references to the strings in the Vec. + let mut zork_config_files = vec![]; + for config_file_content in &config_file_contents { + zork_config_files.push( + toml::from_str::(config_file_content) + .with_context(|| "Could not parse configuration file") + .expect("UPS 2"), ); - let raw_file = fs::read_to_string(config_file.path).with_context(|| { - format!( - "An error happened parsing the configuration file: {:?}", - config_file.dir_entry.file_name() - ) - })?; + // TODO from here, we should check if there's workspaces, and adapt the processing + // workflow from here + } - let config: ZorkConfigFile = toml::from_str(raw_file.as_str()) - .with_context(|| "Could not parse configuration file")?; - let program_data = build_model(&config, cli_args, &abs_project_root)?; + for zork_config_file in zork_config_files { + let program_data = build_model(&zork_config_file, cli_args, &abs_project_root)?; create_output_directory(&program_data)?; let cache = cache::load(&program_data, cli_args) @@ -99,8 +108,8 @@ pub mod worker { do_main_work_based_on_cli_input(cli_args, &program_data, cache).with_context(|| { format!( - "Failed to build the project for the config file: {:?}", - config_file.dir_entry.file_name() + "Failed to build the project: {:?}", + zork_config_file.project.name ) })?; } diff --git a/zork++/src/lib/project_model/mod.rs b/zork++/src/lib/project_model/mod.rs index 467e9046..67c75473 100644 --- a/zork++/src/lib/project_model/mod.rs +++ b/zork++/src/lib/project_model/mod.rs @@ -5,7 +5,9 @@ pub mod modules; pub mod project; pub mod sourceset; pub mod tests; +pub mod workspace; +use crate::project_model::workspace::WorkspaceModel; use std::fmt::Debug; use self::{ @@ -15,6 +17,7 @@ use self::{ #[derive(Debug, PartialEq, Eq)] pub struct ZorkModel<'a> { + pub workspace: WorkspaceModel<'a>, pub project: ProjectModel<'a>, pub compiler: CompilerModel<'a>, pub build: BuildModel, diff --git a/zork++/src/lib/project_model/workspace.rs b/zork++/src/lib/project_model/workspace.rs new file mode 100644 index 00000000..c03bfecc --- /dev/null +++ b/zork++/src/lib/project_model/workspace.rs @@ -0,0 +1,4 @@ +#[derive(Debug, PartialEq, Eq)] +pub struct WorkspaceModel<'a> { + pub members: Vec<&'a str>, +} diff --git a/zork++/src/lib/utils/reader.rs b/zork++/src/lib/utils/reader.rs index 8e3fd747..e43477fa 100644 --- a/zork++/src/lib/utils/reader.rs +++ b/zork++/src/lib/utils/reader.rs @@ -1,5 +1,7 @@ use crate::cli::input::CliArgs; +use crate::config_file::workspace::WorkspaceAttribute; use crate::project_model::sourceset::SourceFile; +use crate::project_model::workspace::WorkspaceModel; use crate::{ cli::output::arguments::Argument, config_file::{ @@ -58,6 +60,21 @@ pub fn find_config_files( log::debug!("Searching for Zork++ configuration files..."); let mut files = vec![]; + /* + Opción A: Matcheamos con depth = 1, con lo cual solo puedes correr zork++ desde mínimo, dentro + de la raíz del projecto, PEEEERO... habría que buscar de nuevo las config files registradas + en el workspace + + Opción B: Cargarlas todas. Parsear fuera del bucle principal. Organizar. En caso de haber + workspace, lógica 1. Else => otra lógica + + Opción C: Buscar siempre con depth = 1. Si cuando salen los resultados, la config file es + un workspace, volver a buscar. Si no, ya estaríamos compilando el crate al que apunta "el tema" + + Opción D: Al pasar la flag de workspace, sabemos que es de antemano un workspace. Eso implica menos + lógica de proceso, pero podría haber distintos zork por ahí aunque sea de puto milagro + + */ for e in WalkDir::new(base_path) .max_depth(2) .into_iter() @@ -92,6 +109,7 @@ pub fn build_model<'a>( cli_args: &'a CliArgs, absolute_project_root: &Path, ) -> Result> { + let workspace = assemble_workspace_model(&config.workspace); let project = assemble_project_model(&config.project); let compiler = assemble_compiler_model(&config.compiler, cli_args); @@ -102,6 +120,7 @@ pub fn build_model<'a>( let tests = assemble_tests_model(project.name, &config.tests, absolute_project_root); Ok(ZorkModel { + workspace, project, compiler, build, @@ -111,6 +130,16 @@ pub fn build_model<'a>( }) } +fn assemble_workspace_model<'a>(config: &'a Option) -> WorkspaceModel<'a> { + WorkspaceModel { + members: config + .as_ref() + .unwrap_or(&WorkspaceAttribute::default()) + .members + .clone(), + } +} + fn assemble_project_model<'a>(config: &'a ProjectAttribute) -> ProjectModel<'a> { ProjectModel { name: config.name, @@ -398,6 +427,7 @@ mod test { let model = build_model(&config, &cli_args, &abs_path_for_mock); let expected = ZorkModel { + workspace: WorkspaceModel { members: vec![] }, project: ProjectModel { name: "Zork++", authors: &["zerodaycode.gz@gmail.com"], @@ -447,6 +477,7 @@ mod test { let model = build_model(&config, &cli_args, &abs_path_for_mock); let expected = ZorkModel { + workspace: WorkspaceModel { members: vec![] }, project: ProjectModel { name: "Zork++", authors: &["zerodaycode.gz@gmail.com"], diff --git a/zork++/test/test.rs b/zork++/test/test.rs index a72b1b5a..10559d33 100644 --- a/zork++/test/test.rs +++ b/zork++/test/test.rs @@ -37,56 +37,56 @@ fn test_clang_full_process() -> Result<()> { #[cfg(target_os = "windows")] #[test] fn test_msvc_full_process() -> Result<()> { - let temp = tempdir()?; + let tempdir = tempdir()?; + let path = tempdir.path().to_str().unwrap(); - assert!(zork::worker::run_zork( - &CliArgs::parse_from(["", "new", "msvc_example", "--compiler", "msvc"]), - Path::new(temp.path()) - ) + assert!(zork::worker::run_zork(&CliArgs::parse_from([ + "", + "--root", + path, + "new", + "msvc_example", + "--compiler", + "msvc" + ])) .is_ok()); - assert!(zork::worker::run_zork( - &CliArgs::parse_from(["", "-vv", "run"]), - Path::new(temp.path()) - ) - .is_ok()); + assert!( + zork::worker::run_zork(&CliArgs::parse_from(["", "--root", path, "-vv", "run"])).is_ok() + ); - Ok(temp.close()?) + Ok(tempdir.close()?) } #[cfg(target_os = "windows")] #[test] fn test_gcc_windows_full_process() -> Result<()> { - assert!(zork::worker::run_zork( - &CliArgs::parse - Path::new(".") // Unable to run GCC tests because the gcm.cache folder, that - // we just wasn't able to discover how to specify a directory for it - ) + let tempdir = tempdir()?; + let path = tempdir.path().to_str().unwrap(); + + assert!(zork::worker::run_zork(&CliArgs::parse_from([ + "", + "--root", + path, + "new", + "gcc_example", + "--compiler", + "gcc" + ])) .is_ok()); assert!( - zork::worker::run_zork(&CliArgs::parse_from(["", "-vv", "run"]), Path::new(".")).is_ok() + zork::worker::run_zork(&CliArgs::parse_from(["", "--root", path, "-vv", "run"])).is_ok() ); - Ok(()) + fs::remove_dir_all("./gcm.cache")?; + + Ok(tempdir.close()?) } #[cfg(target_os = "linux")] #[test] -/* -In the GitHub's virtual machines, we are still unable, due -to the gcm.cache path. - -cc1plus: fatal error: iostream: No such file or directory -compilation terminated. -In module imported at /tmp/.tmpGaFLnR/gcc_example/main.cpp:8:5: -/usr/include/c++/13.2.1/iostream: error: failed to read compiled module: No such file or directory -/usr/include/c++/13.2.1/iostream: note: compiled module file is ‘gcm.cache/./usr/include/c++/13.2.1/iostream.gcm’ -/usr/include/c++/13.2.1/iostream: note: imports must be built before being imported -/usr/include/c++/13.2.1/iostream: fatal error: returning to the gate for a mechanical issue -compilation terminated. - */ -fn test_gcc_full_process() -> Result<()> { +fn test_gcc_linux_full_process() -> Result<()> { let tempdir = tempdir()?; let path = tempdir.path().to_str().unwrap(); @@ -113,10 +113,10 @@ fn test_gcc_full_process() -> Result<()> { Ok(tempdir.close()?) } +#[cfg(target_os = "linux")] mod local_env_tests { use super::*; use std::env; - /// This test allows the developers to specify a path in local environments, having the opportunity /// to debug the Zork++ source code from a concrete location. /// @@ -127,6 +127,7 @@ mod local_env_tests { /// use a debugger to figure out what our changes are doing and how are affecting the codebase. #[test] #[ignore] + #[cfg(target_os = "linux")] fn test_local_clang_full_process_manually_by_specifying_the_project_root_on_linux() { // Using env::home_dir because this test should be Unix specific // For any developer, change the path to whatever C++ project based on modules