diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:50 +0000 |
commit | 2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35 (patch) | |
tree | d325add32978dbdc1db975a438b3a77d571b1ab8 /tests/run-make/translation/Makefile | |
parent | Releasing progress-linux version 1.68.2+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35.tar.xz rustc-2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35.zip |
Merging upstream version 1.69.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/run-make/translation/Makefile')
-rw-r--r-- | tests/run-make/translation/Makefile | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/tests/run-make/translation/Makefile b/tests/run-make/translation/Makefile index 20e86c7f9..5b0b331ca 100644 --- a/tests/run-make/translation/Makefile +++ b/tests/run-make/translation/Makefile @@ -6,8 +6,10 @@ include ../../run-make-fulldeps/tools.mk SYSROOT:=$(shell $(RUSTC) --print sysroot) FAKEROOT=$(TMPDIR)/fakeroot +RUSTC_LOG:=rustc_error_messages +export RUSTC_TRANSLATION_NO_DEBUG_ASSERT:=1 -all: normal custom sysroot +all: normal custom missing broken sysroot sysroot-invalid sysroot-missing # Check that the test works normally, using the built-in fallback bundle. normal: test.rs @@ -32,6 +34,7 @@ broken: test.rs broken.ftl # identifier by making a local copy of the sysroot and adding the custom locale # to it. sysroot: test.rs working.ftl + rm -rf $(FAKEROOT) mkdir $(FAKEROOT) ln -s $(SYSROOT)/* $(FAKEROOT) rm -f $(FAKEROOT)/lib @@ -51,12 +54,12 @@ sysroot: test.rs working.ftl # found. This test might start failing if there actually exists a Klingon # translation of rustc's error messages. sysroot-missing: - $(RUSTC) $< -Ztranslate-lang=tlh 2>&1 || grep "missing locale directory" + $(RUSTC) $< -Ztranslate-lang=tlh 2>&1 | grep "missing locale directory" -# Check that the compiler errors out when the sysroot requested cannot be -# found. This test might start failing if there actually exists a Klingon -# translation of rustc's error messages. +# Check that the compiler errors out when the directory for the locale in the +# sysroot is actually a file. sysroot-invalid: test.rs working.ftl + rm -rf $(FAKEROOT) mkdir $(FAKEROOT) ln -s $(SYSROOT)/* $(FAKEROOT) rm -f $(FAKEROOT)/lib @@ -68,5 +71,6 @@ sysroot-invalid: test.rs working.ftl rm -f $(FAKEROOT)/lib/rustlib/src mkdir $(FAKEROOT)/lib/rustlib/src ln -s $(SYSROOT)/lib/rustlib/src/* $(FAKEROOT)/lib/rustlib/src - touch $(FAKEROOT)/share/locale/zh-CN/ - $(RUSTC) $< --sysroot $(FAKEROOT) -Ztranslate-lang=zh-CN 2>&1 || grep "`\$sysroot/share/locales/\$locale` is not a directory" + mkdir -p $(FAKEROOT)/share/locale + touch $(FAKEROOT)/share/locale/zh-CN + $(RUSTC) $< --sysroot $(FAKEROOT) -Ztranslate-lang=zh-CN 2>&1 | grep "`\$sysroot/share/locales/\$locale` is not a directory" |