File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -289,14 +289,19 @@ mod tests {
289289 assert ! ( result. is_none( ) ) ;
290290 }
291291
292+ /// The idea for this test is to make sure the desired clang-tool is downloaded and
293+ /// the download path can be used to identify the location of the clang tool.
292294 #[ tokio:: test]
293295 async fn eval_download_path ( ) {
294296 let tmp_cache_dir = TempDir :: new ( ) . unwrap ( ) ;
295297 unsafe {
296298 std:: env:: set_var ( "CPP_LINTER_CACHE" , tmp_cache_dir. path ( ) ) ;
297299 }
298300 let tool = ClangTool :: ClangFormat ;
299- let version_req = VersionReq :: parse ( "17" ) . unwrap ( ) ;
301+ // for this test we should use the oldest supported clang version
302+ // because that would be most likely to require downloading.
303+ let version_req =
304+ VersionReq :: parse ( option_env ! ( "MIN_CLANG_TOOLS_VERSION" ) . unwrap_or ( "11" ) ) . unwrap ( ) ;
300305 let downloaded_clang = RequestedVersion :: Requirement ( version_req. clone ( ) )
301306 . eval_tool ( & tool, false )
302307 . await
You can’t perform that action at this time.
0 commit comments