mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
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:
parent
c0f5a01e17
commit
380041dc2a
7 changed files with 35 additions and 27 deletions
|
|
@ -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 =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue