Skip to content

Commit

Permalink
test: log debug messages on console on CICD
Browse files Browse the repository at this point in the history
  • Loading branch information
KoltesDigital committed Oct 4, 2022
1 parent 76b88cb commit 8d18422
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ branches:
- master

environment:
DOKAN_CONSOLE_DEBUG_LOG: 1
RUST_BACKTRACE: 1
AccessTokenDokanDoc:
secure: Z5/daTZ6OJaDbslmhxSxxB6leKaqHTnTbISy153Y4cdJm/oTAbDHaofb9TqvKXV1
Expand Down
13 changes: 10 additions & 3 deletions dokan/src/usage_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -881,13 +881,20 @@ pub fn with_test_drive<Scope: FnOnce(TestDriveContext)>(scope: Scope) {

let (tx_signal, rx_signal) = mpsc::sync_channel(1024);

let mut flags =
MountFlags::CURRENT_SESSION | MountFlags::FILELOCK_USER_MODE | MountFlags::ALT_STREAM;

let enable_console_debug_log =
std::env::var_os("DOKAN_CONSOLE_DEBUG_LOG").map_or(false, |x| &x != "0");
if enable_console_debug_log {
flags = flags | MountFlags::DEBUG | MountFlags::STDERR;
}

let drive_thread_handle = thread::spawn(move || {
let mount_point = convert_str("Z:\\");
let handler = TestHandler::new(tx_signal);
let options = MountOptions {
flags: MountFlags::CURRENT_SESSION
| MountFlags::FILELOCK_USER_MODE
| MountFlags::ALT_STREAM,
flags,
timeout: Duration::from_secs(15),
allocation_unit_size: 1024,
sector_size: 1024,
Expand Down

0 comments on commit 8d18422

Please sign in to comment.