| 1 |
Description: Don't fail the tests if a cfg cannot be generated for target csky-unknown-linux-gnuabiv2 |
| 2 |
This target seems to be present but broken in Ubuntu's rustc. |
| 3 |
Author: Peter Michael Green <[email protected]> |
| 4 |
Last-Update: 2024-01-23 |
| 5 |
|
| 6 |
--- a/src/resolve.rs |
| 7 |
+++ b/src/resolve.rs |
| 8 |
@@ -871,7 +871,15 @@ mod tests { |
| 9 |
fn parse_cfg_list() { |
| 10 |
// builtin targets |
| 11 |
for target in cmd!("rustc", "--print", "target-list").read().unwrap().lines() { |
| 12 |
- let cfg = Cfg::from_rustc(cmd!("rustc"), &target.into()).unwrap(); |
| 13 |
+ let cfg = Cfg::from_rustc(cmd!("rustc"), &target.into()); |
| 14 |
+ |
| 15 |
+ let Ok(cfg) = cfg else { |
| 16 |
+ if target.starts_with("csky-unknown-linux-gnuabiv2") { |
| 17 |
+ continue; |
| 18 |
+ } |
| 19 |
+ panic!("failed to generate cfg for target {target}"); |
| 20 |
+ }; |
| 21 |
+ |
| 22 |
check_cfg(&cfg); |
| 23 |
} |
| 24 |
// custom targets |