Refactor logging configuration and streamline command execution in tests

- Updated the main function to conditionally disable file logging based on the `ATLAS_NO_FILE_LOG` environment variable, enhancing flexibility in logging behavior.
- Introduced a new `atlas_command` function to encapsulate command creation for tests, ensuring consistent command execution across various test files.
- Replaced direct usage of `ROJO_PATH` with `atlas_command` in multiple test utilities, improving code clarity and maintainability.

These changes aim to enhance the logging setup and simplify command handling in the test suite.
This commit is contained in:
Joe 2026-03-01 14:41:51 -06:00
parent c0f5a01e17
commit 380041dc2a
7 changed files with 35 additions and 27 deletions

View file

@ -2,12 +2,18 @@ use std::{
fs,
io::{self, Read},
path::{Path, PathBuf},
process::Child,
process::{Child, Command},
};
use walkdir::WalkDir;
pub static ROJO_PATH: &str = env!("CARGO_BIN_EXE_atlas");
pub fn atlas_command() -> Command {
let mut cmd = Command::new(ROJO_PATH);
cmd.env("ATLAS_NO_FILE_LOG", "1");
cmd
}
pub static BUILD_TESTS_PATH: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/rojo-test/build-tests");
pub static SERVE_TESTS_PATH: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/rojo-test/serve-tests");
pub static SYNCBACK_TESTS_PATH: &str =