Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/full-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@ jobs:
- uses: crate-ci/typos@bee27e3a4fd1ea2111cf90ab89cd076c870fce14

test:
env:
# Bound full-workspace build artifacts on hosted runners without changing test coverage.
CARGO_PROFILE_TEST_DEBUG: "0"
strategy:
fail-fast: false
matrix:
Expand All @@ -273,7 +276,7 @@ jobs:
toolchain: ${{ matrix.rust }}
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4
with:
shared-key: full-host-${{ runner.os }}-${{ runner.arch }}-${{ matrix.rust }}-test
shared-key: full-host-${{ runner.os }}-${{ runner.arch }}-${{ matrix.rust }}-test-no-debuginfo
cache-bin: false
save-if: ${{ github.ref == 'refs/heads/main' && github.event_name != 'workflow_dispatch' }}
- run: cargo xtask test
Expand Down
10 changes: 5 additions & 5 deletions crates/j2k-native/src/j2c/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub(crate) use self::direct_plan::{
};
pub(crate) use self::peak::{record_workspace, WorkspaceBytes, WorkspacePeak};
pub(crate) use self::planes_floor::full_decode_planes_floor;
#[cfg(feature = "std")]
#[cfg(any(test, feature = "std"))]
pub(crate) use self::reuse::is_capacity_error;
pub(crate) use self::state::{DecompositionStorage, TileDecodeContext, TileDecompositions};
use self::store::{
Expand Down Expand Up @@ -722,9 +722,9 @@ impl OutputRegion {

#[derive(Default, Debug, Clone, Copy, PartialEq, Eq)]
pub(crate) struct DecodeDebugCounters {
#[cfg(all(test, feature = "std"))]
#[cfg(test)]
pub(crate) packet_headers: usize,
#[cfg(all(test, feature = "std"))]
#[cfg(test)]
pub(crate) directory_skips: usize,
pub(crate) decoded_code_blocks: usize,
pub(crate) skipped_code_blocks: usize,
Expand Down Expand Up @@ -938,9 +938,9 @@ fn decode_tile<'a>(
// Next, we parse the layers/segments for each code block.
let stage_start = profile::profile_now(profile_enabled);
let packet_stats = segment::parse_selected(tile, header, storage, selection.as_ref())?;
#[cfg(not(all(test, feature = "std")))]
#[cfg(not(test))]
let _ = packet_stats;
#[cfg(all(test, feature = "std"))]
#[cfg(test)]
{
tile_ctx.debug_counters.packet_headers += packet_stats.parsed_headers;
tile_ctx.debug_counters.directory_skips += packet_stats.skipped_packets;
Expand Down
2 changes: 1 addition & 1 deletion crates/j2k-native/src/j2c/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ use crate::math::{SimdBuffer, SIMD_WIDTH};
pub(crate) use codestream::Header;
#[cfg(test)]
pub(crate) use decode::decode_with_capacity_retry as decode;
#[cfg(feature = "std")]
#[cfg(any(test, feature = "std"))]
pub(crate) use decode::is_capacity_error;
#[cfg(test)]
pub(crate) use decode::should_decode_classic_sub_band_in_parallel;
Expand Down
12 changes: 6 additions & 6 deletions crates/j2k-native/src/j2c/segment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ mod ht;

#[derive(Default)]
pub(crate) struct PacketParseStats {
#[cfg(all(test, feature = "std"))]
#[cfg(test)]
pub(crate) parsed_headers: usize,
#[cfg(all(test, feature = "std"))]
#[cfg(test)]
pub(crate) skipped_packets: usize,
}

Expand Down Expand Up @@ -632,12 +632,12 @@ fn parse_inner<'a>(
.validate_packet_length(packet_start)
.ok_or("packet length marker disagrees with consumed bytes")?;

#[cfg(test)]
{
walk.stats.parsed_headers += 1;
}
#[cfg(feature = "std")]
{
#[cfg(test)]
{
walk.stats.parsed_headers += 1;
}
if let Some(boundaries) = walk.recording.as_mut() {
let end = tile_part
.inline_offset()
Expand Down
1 change: 1 addition & 0 deletions typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ extend-exclude = [
[default]
extend-ignore-re = [
"fnv1a64:[0-9a-f]+",
"\\bok:[0-9a-f]{16}\\b",
"`[0-9a-f]{8}(?:[0-9a-f]{32})?`",
"`[0-9a-f]{7,40}\\.\\.\\.[0-9a-f]{7,40}`",
]
Expand Down
Loading