ec-av1: the census child test skips in a normal suite run instead of reddening it
Browse files at this commit0cd363dd52c6ff5f47281404bdaf319a9c92fcf8Parent: 310e7841 changed file +13 -0
- crates/ec-av1/src/stream.rs +13 -0
crates/ec-av1/src/stream.rsmodified+13 -0
| @@ -48501,6 +48501,19 @@ exit 0 | |||
| 48501 | /// in-process counter -- which no external binary could read. | 48501 | /// in-process counter -- which no external binary could read. |
| 48502 | #[test] | 48502 | #[test] |
| 48503 | fn uwdep_child_unwritten_census() { | 48503 | fn uwdep_child_unwritten_census() { |
| 48504 | + // Reached with NEITHER variable set means a normal suite run: the parent | ||
| 48505 | + // invokes this test BY NAME with the variable set, so there is nothing to | ||
| 48506 | + // measure here. Asserting the fill instead made every full suite red | ||
| 48507 | + // (`stream::tests::uwdep_child_unwritten_census` is in the default test | ||
| 48508 | + // list), and the run it wanted to catch is already caught on the parent's | ||
| 48509 | + // side, which panics when the child prints no census line. A standalone | ||
| 48510 | + // run SAYS it skipped rather than passing silently. | ||
| 48511 | + if std::env::var_os("UWDEP_CENSUS_SYNTHETIC").is_none() | ||
| 48512 | + && std::env::var_os("UWDEP_CENSUS_FIXTURE").is_none() | ||
| 48513 | + { | ||
| 48514 | + println!("UWDEP_CENSUS skipped: not invoked as a census child"); | ||
| 48515 | + return; | ||
| 48516 | + } | ||
| 48504 | assert!( | 48517 | assert!( |
| 48505 | std::env::var_os("EC_AV1_PLANE_SENTINEL").is_some(), | 48518 | std::env::var_os("EC_AV1_PLANE_SENTINEL").is_some(), |
| 48506 | "the census child ran without EC_AV1_PLANE_SENTINEL, so the fill was never live \ | 48519 | "the census child ran without EC_AV1_PLANE_SENTINEL, so the fill was never live \ |