This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
tools/rust-analyzer/crates/test-utils/src Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -396,6 +396,10 @@ impl Step for RustAnalyzer {
396396 // https://github.com/rust-analyzer/expect-test/issues/33
397397 cargo. env ( "CARGO_WORKSPACE_DIR" , & dir) ;
398398
399+ // RA's test suite tries to write to the source directory, that can't
400+ // work in Rust CI
401+ cargo. env ( "SKIP_SLOW_TESTS" , "1" ) ;
402+
399403 cargo. add_rustc_lib_path ( builder, compiler) ;
400404 cargo. arg ( "--" ) . args ( builder. config . cmd . test_args ( ) ) ;
401405
Original file line number Diff line number Diff line change 88
99#![ warn( rust_2018_idioms, unused_lifetimes, semicolon_in_expressions_from_macros) ]
1010
11+ mod assert_linear;
1112pub mod bench_fixture;
1213mod fixture;
13- mod assert_linear;
1414
1515use std:: {
1616 collections:: BTreeMap ,
@@ -391,7 +391,8 @@ fn main() {
391391/// also creates a file at `./target/.slow_tests_cookie` which serves as a flag
392392/// that slow tests did run.
393393pub fn skip_slow_tests ( ) -> bool {
394- let should_skip = std:: env:: var ( "CI" ) . is_err ( ) && std:: env:: var ( "RUN_SLOW_TESTS" ) . is_err ( ) ;
394+ let should_skip = ( std:: env:: var ( "CI" ) . is_err ( ) && std:: env:: var ( "RUN_SLOW_TESTS" ) . is_err ( ) )
395+ || std:: env:: var ( "SKIP_SLOW_TESTS" ) . is_ok ( ) ;
395396 if should_skip {
396397 eprintln ! ( "ignoring slow test" ) ;
397398 } else {
@@ -475,7 +476,7 @@ pub fn ensure_file_contents(file: &Path, contents: &str) {
475476pub fn try_ensure_file_contents ( file : & Path , contents : & str ) -> Result < ( ) , ( ) > {
476477 match std:: fs:: read_to_string ( file) {
477478 Ok ( old_contents) if normalize_newlines ( & old_contents) == normalize_newlines ( contents) => {
478- return Ok ( ( ) )
479+ return Ok ( ( ) ) ;
479480 }
480481 _ => ( ) ,
481482 }
You can’t perform that action at this time.
0 commit comments