File tree 2 files changed +8
-1
lines changed
src/cargo/sources/registry/index 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -185,6 +185,10 @@ jobs:
185
185
- name : Clear test output
186
186
run : ci/clean-test-output.sh
187
187
188
+ - name : Check operability of index cache in SQLite3
189
+ run : ' cargo test -p cargo --test testsuite -- alt_registry:: global_cache_tracker::'
190
+ env :
191
+ __CARGO_TEST_FORCE_SQLITE_INDEX_CACHE : 1
188
192
# This only tests `cargo fix` because fix-proxy-mode is one of the most
189
193
# complicated subprocess management in Cargo.
190
194
- name : Check operability of rustc invocation with argfile
Original file line number Diff line number Diff line change @@ -248,7 +248,10 @@ impl<'gctx> CacheManager<'gctx> {
248
248
///
249
249
/// `root` --- The root path where caches are located.
250
250
pub fn new ( cache_root : Filesystem , gctx : & ' gctx GlobalContext ) -> CacheManager < ' gctx > {
251
- let store: Box < dyn CacheStore > = if gctx. cli_unstable ( ) . index_cache_sqlite {
251
+ #[ allow( clippy:: disallowed_methods) ]
252
+ let use_sqlite = gctx. cli_unstable ( ) . index_cache_sqlite
253
+ || std:: env:: var ( "__CARGO_TEST_FORCE_SQLITE_INDEX_CACHE" ) . is_ok ( ) ;
254
+ let store: Box < dyn CacheStore > = if use_sqlite {
252
255
Box :: new ( LocalDatabase :: new ( cache_root, gctx) )
253
256
} else {
254
257
Box :: new ( LocalFileSystem :: new ( cache_root, gctx) )
You can’t perform that action at this time.
0 commit comments