]> git.proxmox.com Git - cargo.git/blob - debian/patches/0003-tests-add-missing-cross-disabled-checks.patch
Refresh patches and remove upstream applied CVE patches
[cargo.git] / debian / patches / 0003-tests-add-missing-cross-disabled-checks.patch
1 From 981279ccd8f7855faaed010bff0891afff588210 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?=
3 <debian@fabian.gruenbichler.email>
4 Date: Sat, 19 Nov 2022 10:24:08 +0100
5 Subject: [PATCH] tests: add missing cross disabled checks
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 cross_conmpile::alternate states it should only be used in test cases
11 after checking cross_compile::disabled(), which is missing here. these
12 tests fail despite setting CFG_DISABLE_CROSS_TESTS on i386, since both
13 the host and the alternate cross target would be i686 in that case.
14
15 Signed-off-by: Fabian Grünbichler <debian@fabian.gruenbichler.email>
16 ---
17 tests/testsuite/build_script.rs | 6 ++++++
18 1 file changed, 6 insertions(+)
19
20 diff --git a/tests/testsuite/build_script.rs b/tests/testsuite/build_script.rs
21 index 902364dff..e458b3262 100644
22 --- a/tests/testsuite/build_script.rs
23 +++ b/tests/testsuite/build_script.rs
24 @@ -585,6 +585,9 @@ fn custom_build_linker_bad_host_with_arch() {
25 #[cargo_test]
26 fn custom_build_env_var_rustc_linker_cross_arch_host() {
27 let target = rustc_host();
28 + if cross_compile::disabled() {
29 + return;
30 + }
31 let cross_target = cross_compile::alternate();
32 let p = project()
33 .file(
34 @@ -623,6 +626,9 @@ fn custom_build_env_var_rustc_linker_cross_arch_host() {
35 #[cargo_test]
36 fn custom_build_linker_bad_cross_arch_host() {
37 let target = rustc_host();
38 + if cross_compile::disabled() {
39 + return;
40 + }
41 let cross_target = cross_compile::alternate();
42 let p = project()
43 .file(
44 --
45 2.38.1
46