@@ -2,7 +2,7 @@ use std::process::Command;
2
2
3
3
use gix_hash:: ObjectId ;
4
4
use gix_odb:: { store, store:: iter:: Ordering , Find , FindExt , Header , Write } ;
5
- use gix_testtools:: fixture_path ;
5
+ use gix_testtools:: fixture_path_standalone ;
6
6
7
7
use crate :: { hex_to_id, odb:: db} ;
8
8
@@ -14,18 +14,18 @@ fn all_orderings() -> [Ordering; 2] {
14
14
}
15
15
16
16
/// indices, multi-pack-index, loose odb
17
- fn db_with_all_object_sources ( ) -> crate :: Result < ( gix_odb:: Handle , tempfile:: TempDir ) > {
17
+ fn db_with_all_object_sources ( ) -> crate :: Result < ( gix_odb:: Handle , gix_testtools :: tempfile:: TempDir ) > {
18
18
let objects_dir = gix_testtools:: tempfile:: tempdir ( ) ?;
19
- gix_testtools:: copy_recursively_into_existing_dir ( fixture_path ( "objects" ) , & objects_dir) ?;
19
+ gix_testtools:: copy_recursively_into_existing_dir ( fixture_path_standalone ( "objects" ) , & objects_dir) ?;
20
20
21
21
let multi_pack_index = std:: fs:: OpenOptions :: new ( )
22
22
. write ( true )
23
23
. create_new ( true )
24
24
. open ( objects_dir. path ( ) . join ( "pack/multi-pack-index" ) ) ?;
25
25
gix_odb:: pack:: multi_index:: File :: write_from_index_paths (
26
26
vec ! [
27
- fixture_path ( "objects/pack/pack-a2bf8e71d8c18879e499335762dd95119d93d9f1.idx" ) ,
28
- fixture_path ( "objects/pack/pack-c0438c19fb16422b6bbcce24387b3264416d485b.idx" ) ,
27
+ fixture_path_standalone ( "objects/pack/pack-a2bf8e71d8c18879e499335762dd95119d93d9f1.idx" ) ,
28
+ fixture_path_standalone ( "objects/pack/pack-c0438c19fb16422b6bbcce24387b3264416d485b.idx" ) ,
29
29
] ,
30
30
multi_pack_index,
31
31
gix_features:: progress:: Discard ,
@@ -39,7 +39,7 @@ fn db_with_all_object_sources() -> crate::Result<(gix_odb::Handle, tempfile::Tem
39
39
40
40
#[ test]
41
41
fn multi_index_access ( ) -> crate :: Result {
42
- let dir = gix_testtools:: scripted_fixture_writable ( "make_repo_multi_index.sh" ) ?;
42
+ let dir = gix_testtools:: scripted_fixture_writable_standalone ( "make_repo_multi_index.sh" ) ?;
43
43
let handle = gix_odb:: at ( dir. path ( ) . join ( ".git/objects" ) ) ?;
44
44
45
45
assert_eq ! (
@@ -145,7 +145,7 @@ fn multi_index_access() -> crate::Result {
145
145
146
146
#[ test]
147
147
fn multi_index_keep_open ( ) -> crate :: Result {
148
- let dir = gix_testtools:: scripted_fixture_writable ( "make_repo_multi_index.sh" ) ?;
148
+ let dir = gix_testtools:: scripted_fixture_writable_standalone ( "make_repo_multi_index.sh" ) ?;
149
149
let ( stable_handle, handle) = {
150
150
let mut stable_handle = gix_odb:: at ( dir. path ( ) . join ( ".git/objects" ) ) ?;
151
151
let handle = stable_handle. clone ( ) ;
@@ -210,7 +210,7 @@ fn multi_index_keep_open() -> crate::Result {
210
210
211
211
#[ test]
212
212
fn write ( ) -> crate :: Result {
213
- let dir = tempfile:: tempdir ( ) ?;
213
+ let dir = gix_testtools :: tempfile:: tempdir ( ) ?;
214
214
let mut handle = gix_odb:: at ( dir. path ( ) ) ?;
215
215
// It should refresh once even if the refresh mode is never, just to initialize the index
216
216
handle. refresh_never ( ) ;
@@ -222,7 +222,7 @@ fn write() -> crate::Result {
222
222
223
223
#[ test]
224
224
fn alternate_dbs_query ( ) -> crate :: Result {
225
- let dir = gix_testtools:: scripted_fixture_read_only ( "make_alternates_odb.sh" ) ?;
225
+ let dir = gix_testtools:: scripted_fixture_read_only_standalone ( "make_alternates_odb.sh" ) ?;
226
226
let handle = gix_odb:: at ( dir. join ( ".git/objects" ) ) ?;
227
227
228
228
let alternates = handle. store_ref ( ) . alternate_db_paths ( ) ?;
@@ -242,7 +242,7 @@ fn alternate_dbs_query() -> crate::Result {
242
242
243
243
#[ test]
244
244
fn object_replacement ( ) -> crate :: Result {
245
- let dir = gix_testtools:: scripted_fixture_read_only ( "make_replaced_history.sh" ) ?;
245
+ let dir = gix_testtools:: scripted_fixture_read_only_standalone ( "make_replaced_history.sh" ) ?;
246
246
let handle = gix_odb:: at ( dir. join ( ".git/objects" ) ) ?;
247
247
let mut buf = Vec :: new ( ) ;
248
248
let short_history_link = hex_to_id ( "434e5a872d6738d1fffd1e11e52a1840b73668c6" ) ;
@@ -797,7 +797,10 @@ fn auto_refresh_with_and_without_id_stability() -> crate::Result {
797
797
. success( ) ,
798
798
"git should work"
799
799
) ;
800
- gix_testtools:: copy_recursively_into_existing_dir ( fixture_path ( "objects/pack" ) , tmp. path ( ) . join ( "objects/pack" ) ) ?;
800
+ gix_testtools:: copy_recursively_into_existing_dir (
801
+ fixture_path_standalone ( "objects/pack" ) ,
802
+ tmp. path ( ) . join ( "objects/pack" ) ,
803
+ ) ?;
801
804
let hide_pack = |name : & str | {
802
805
let stem = tmp. path ( ) . join ( "objects/pack" ) . join ( name) ;
803
806
std:: fs:: rename ( stem. with_extension ( "idx" ) , stem. with_extension ( "idx.bak" ) ) . unwrap ( ) ;
@@ -940,7 +943,7 @@ mod verify {
940
943
use std:: sync:: atomic:: AtomicBool ;
941
944
942
945
use gix_features:: progress;
943
- use gix_testtools:: fixture_path ;
946
+ use gix_testtools:: fixture_path_standalone ;
944
947
945
948
use crate :: store:: dynamic:: db;
946
949
@@ -954,20 +957,20 @@ mod verify {
954
957
assert_eq ! ( outcome. index_statistics. len( ) , 3 , "there are only three packs to check" ) ;
955
958
assert_eq ! (
956
959
outcome. index_statistics[ 0 ] . path,
957
- fixture_path ( "objects/pack/pack-c0438c19fb16422b6bbcce24387b3264416d485b.idx" )
960
+ fixture_path_standalone ( "objects/pack/pack-c0438c19fb16422b6bbcce24387b3264416d485b.idx" )
958
961
) ;
959
962
assert_eq ! (
960
963
outcome. index_statistics[ 1 ] . path,
961
- fixture_path ( "objects/pack/pack-a2bf8e71d8c18879e499335762dd95119d93d9f1.idx" )
964
+ fixture_path_standalone ( "objects/pack/pack-a2bf8e71d8c18879e499335762dd95119d93d9f1.idx" )
962
965
) ;
963
966
assert_eq ! (
964
967
outcome. index_statistics[ 2 ] . path,
965
- fixture_path ( "objects/pack/pack-11fdfa9e156ab73caae3b6da867192221f2089c2.idx" )
968
+ fixture_path_standalone ( "objects/pack/pack-11fdfa9e156ab73caae3b6da867192221f2089c2.idx" )
966
969
) ;
967
970
assert_eq ! (
968
971
outcome. loose_object_stores,
969
972
vec![ gix_odb:: store:: verify:: integrity:: LooseObjectStatistics {
970
- path: fixture_path ( "objects" ) ,
973
+ path: fixture_path_standalone ( "objects" ) ,
971
974
statistics: gix_odb:: loose:: verify:: integrity:: Statistics { num_objects: 7 }
972
975
} ]
973
976
) ;
0 commit comments