File tree 2 files changed +15
-1
lines changed
bootstrap/src/core/config
2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -2888,6 +2888,13 @@ impl Config {
2888
2888
2889
2889
let absolute_path = self . src . join ( relative_path) ;
2890
2890
2891
+ // NOTE: This check is required because `jj git clone` doesn't create directories for
2892
+ // submodules, they are completely ignored. The code below assumes this directory exists,
2893
+ // so create it here.
2894
+ if !absolute_path. exists ( ) {
2895
+ t ! ( fs:: create_dir_all( & absolute_path) ) ;
2896
+ }
2897
+
2891
2898
// NOTE: The check for the empty directory is here because when running x.py the first time,
2892
2899
// the submodule won't be checked out. Check it out now so we can build it.
2893
2900
if !GitInfo :: new ( false , & absolute_path) . is_managed_git_subrepository ( )
Original file line number Diff line number Diff line change @@ -2378,12 +2378,19 @@ impl<'test> TestCx<'test> {
2378
2378
// eg.
2379
2379
// /home/user/rust/build/x86_64-unknown-linux-gnu/test/ui/<test_dir>/$name.$revision.$mode/
2380
2380
normalize_path ( & self . output_base_dir ( ) , "$TEST_BUILD_DIR" ) ;
2381
+ // Same as above, but with a canonicalized path.
2382
+ // This is required because some tests print canonical paths inside test build directory,
2383
+ // so if the build directory is a symlink, normalization doesn't help.
2384
+ //
2385
+ // NOTE: There are also tests which print the non-canonical name, so we need both this and
2386
+ // the above normalizations.
2387
+ normalize_path ( & self . output_base_dir ( ) . canonicalize_utf8 ( ) . unwrap ( ) , "$TEST_BUILD_DIR" ) ;
2381
2388
// eg. /home/user/rust/build
2382
2389
normalize_path ( & self . config . build_root , "$BUILD_DIR" ) ;
2383
2390
2384
2391
if json {
2385
2392
// escaped newlines in json strings should be readable
2386
- // in the stderr files. There's no point int being correct,
2393
+ // in the stderr files. There's no point in being correct,
2387
2394
// since only humans process the stderr files.
2388
2395
// Thus we just turn escaped newlines back into newlines.
2389
2396
normalized = normalized. replace ( "\\ n" , "\n " ) ;
You can’t perform that action at this time.
0 commit comments