mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
clippy, run subset of cli_run tests
This commit is contained in:
parent
5a447a9fcc
commit
0517d8959c
2 changed files with 10 additions and 4 deletions
5
.github/workflows/windows.yml
vendored
5
.github/workflows/windows.yml
vendored
|
@ -52,4 +52,7 @@ jobs:
|
|||
run: cargo test --locked --release --no-run -p roc_ident -p roc_region -p roc_collections -p roc_can -p roc_types -p roc_solve -p roc_mono -p roc_gen_dev -p roc_gen_wasm -p roc_serialize -p roc_editor -p roc_linker -p roc_cli || cargo test --locked --release --no-run -p roc_ident -p roc_region -p roc_collections -p roc_can -p roc_types -p roc_solve -p roc_mono -p roc_gen_dev -p roc_gen_wasm -p roc_serialize -p roc_editor -p roc_linker -p roc_cli
|
||||
|
||||
- name: Actually run the tests.
|
||||
run: cargo test --locked --release -p roc_ident -p roc_region -p roc_collections -p roc_can -p roc_types -p roc_solve -p roc_mono -p roc_gen_dev -p roc_gen_wasm -p roc_serialize -p roc_editor -p roc_linker -p roc_cli
|
||||
run: cargo test --locked --release -p roc_ident -p roc_region -p roc_collections -p roc_can -p roc_types -p roc_solve -p roc_mono -p roc_gen_dev -p roc_gen_wasm -p roc_serialize -p roc_editor -p roc_linker
|
||||
|
||||
- name: Run roc_cli tests that work on CI
|
||||
run: cargo test --locked --release -p roc_cli cli_run::fibonacci cli_run::format_check_good cli_run::format_check_reformatting_needed cli_run::platform_switching_zig cli_run::platform_switching_main
|
||||
|
|
|
@ -3,7 +3,7 @@ use snafu::OptionExt;
|
|||
use std::{
|
||||
collections::HashMap,
|
||||
env::{self, VarError},
|
||||
path::{Path, PathBuf},
|
||||
path::PathBuf,
|
||||
process::Command,
|
||||
slice::SliceIndex,
|
||||
};
|
||||
|
@ -131,14 +131,17 @@ pub fn get_lib_path() -> Option<PathBuf> {
|
|||
None
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
use std::path::Path;
|
||||
|
||||
/// On windows, the path is prefixed with `\\?\`, the "verbatim" prefix.
|
||||
/// Such a path does not works as an argument to `zig` and other command line tools,
|
||||
/// and there seems to be no good way to strip it. So we resort to some string manipulation.
|
||||
#[cfg(windows)]
|
||||
pub fn strip_windows_prefix(path_buf: &Path) -> std::path::PathBuf {
|
||||
pub fn strip_windows_prefix(path_buf: &Path) -> PathBuf {
|
||||
let path_str = path_buf.display().to_string();
|
||||
|
||||
std::path::Path::new(path_str.trim_start_matches(r"\\?\")).to_path_buf()
|
||||
Path::new(path_str.trim_start_matches(r"\\?\")).to_path_buf()
|
||||
}
|
||||
|
||||
/// get the Path of the root of the repository
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue