Skip to content

Commit 9a13f4f

Browse files
authored
Rollup merge of #110525 - jyn514:translation-download-rustc, r=albertlarsan68
Fix `tests/run-make-translation` when download-rustc is enabled When building locally, we never generate a `share` directory in the local sysroot. However, when we download the `rustc` component from ci, it includes a `share/man` directory in the sysroot. The `run-make/translation` test assumed that it didn't exist, and would create a link from `fakeroot` to the real share directory, and write symbolic links into it. Change it not to create the link, so that rustc doesn't try to load multiple copies of the same `.ftl` file. Fixes #110357.
2 parents 1de29ac + 23cf3ce commit 9a13f4f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: tests/run-make/translation/Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ sysroot: test.rs working.ftl
4646
rm -f $(FAKEROOT)/lib/rustlib/src
4747
mkdir $(FAKEROOT)/lib/rustlib/src
4848
ln -s $(SYSROOT)/lib/rustlib/src/* $(FAKEROOT)/lib/rustlib/src
49+
# When download-rustc is enabled, `$(SYSROOT)` will have a share directory. Delete the link to it.
50+
rm -f $(FAKEROOT)/share
4951
mkdir -p $(FAKEROOT)/share/locale/zh-CN/
5052
ln -s $(CURDIR)/working.ftl $(FAKEROOT)/share/locale/zh-CN/basic-translation.ftl
5153
$(RUSTC) $< --sysroot $(FAKEROOT) -Ztranslate-lang=zh-CN 2>&1 | $(CGREP) "this is a test message"

0 commit comments

Comments
 (0)