File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
bootstrap/src/core/config Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -2888,6 +2888,13 @@ impl Config {
28882888
28892889 let absolute_path = self . src . join ( relative_path) ;
28902890
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+
28912898 // NOTE: The check for the empty directory is here because when running x.py the first time,
28922899 // the submodule won't be checked out. Check it out now so we can build it.
28932900 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> {
23782378 // eg.
23792379 // /home/user/rust/build/x86_64-unknown-linux-gnu/test/ui/<test_dir>/$name.$revision.$mode/
23802380 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" ) ;
23812388 // eg. /home/user/rust/build
23822389 normalize_path ( & self . config . build_root , "$BUILD_DIR" ) ;
23832390
23842391 if json {
23852392 // 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,
23872394 // since only humans process the stderr files.
23882395 // Thus we just turn escaped newlines back into newlines.
23892396 normalized = normalized. replace ( "\\ n" , "\n " ) ;
You can’t perform that action at this time.
0 commit comments