]> git.lizzy.rs Git - rust.git/commitdiff
internal: env var to toggle slow benches
authorAleksey Kladov <aleksey.kladov@gmail.com>
Tue, 4 May 2021 15:21:36 +0000 (18:21 +0300)
committerAleksey Kladov <aleksey.kladov@gmail.com>
Tue, 4 May 2021 15:21:36 +0000 (18:21 +0300)
crates/rust-analyzer/src/integrated_benchmarks.rs

index 411446b042b7640e8cb29eaf243a3ac07a690a6b..3dcbe397ad83bb838236e23536f95f110754085e 100644 (file)
@@ -21,8 +21,7 @@
 
 #[test]
 fn integrated_highlighting_benchmark() {
-    // Don't run slow benchmark by default
-    if true {
+    if std::env::var("RUN_SLOW_BENCHES").is_err() {
         return;
     }
 
@@ -76,8 +75,7 @@ fn integrated_highlighting_benchmark() {
 
 #[test]
 fn integrated_completion_benchmark() {
-    // Don't run slow benchmark by default
-    if true {
+    if std::env::var("RUN_SLOW_BENCHES").is_err() {
         return;
     }