-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: compile testdata/ only once (#6305)
* test: compile testdata/ only once * comment
- Loading branch information
Showing
7 changed files
with
59 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
//! File locking utilities. | ||
use crate::util::pretty_err; | ||
use std::{ | ||
fs::{File, OpenOptions}, | ||
path::Path, | ||
}; | ||
|
||
pub use fd_lock::*; | ||
|
||
/// Creates a new lock file at the given path. | ||
pub fn new_lock(lock_path: impl AsRef<Path>) -> RwLock<File> { | ||
fn new_lock(lock_path: &Path) -> RwLock<File> { | ||
let lock_file = pretty_err( | ||
lock_path, | ||
OpenOptions::new().read(true).write(true).create(true).open(lock_path), | ||
); | ||
RwLock::new(lock_file) | ||
} | ||
new_lock(lock_path.as_ref()) | ||
} |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# Compiler files | ||
cache/ | ||
out/ | ||
out/ | ||
.lock |