Skip to content

Commit

Permalink
Fix build-breakers
Browse files Browse the repository at this point in the history
Fix two build-breaking issues introduced in [1].

* Update Dockerfile for new integration tests

* Strip CRs from samedec output so Windows output matches
  the test file.

References

1. 7c419a7 "ci, sample: add tests for child processes"
  • Loading branch information
cbs228 committed Feb 3, 2024
1 parent 708cfa7 commit c14a13e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
21 changes: 7 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
### set --build-arg CARGO_NET_OFFLINE=true

# Rust version, like "1" or "1.67.0"
ARG BUILD_RUST_TAG=1.67
ARG BUILD_RUST_TAG=1.70

# Build operating system
# Use slim-buster for glibc or alpine for musl
Expand Down Expand Up @@ -100,21 +100,14 @@ RUN [ -n "$CARGO_BUILD_TARGET" ] || unset CARGO_BUILD_TARGET && \
cargo test --frozen --release --workspace && \
cargo install --frozen --path=crates/samedec

# Perform tests
# Perform integration tests
RUN samedec --version

COPY sample/*.22050.s16le.* .

RUN set -e; \
for file in $(basename -s .bin *.s16le.bin); do \
printf '[%s]\n' "$file"; \
samedec -r 22050 <"$file.bin" | tee result; \
cmp result "$file.txt" || {\
echo "FAIL!"; \
exit 1; \
}; \
echo "PASS"; \
done
COPY sample sample

RUN cd sample && \
SAMEDEC=/usr/local/bin/samedec ./test.sh && \
cd ..

###
### NON-IMAGE
Expand Down
4 changes: 3 additions & 1 deletion sample/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ run_samedec() {
--file "${infile}.bin" \
-- \
bash \
"${infile}.bash" | tee /dev/stderr
"${infile}.bash" | \
tee /dev/stderr | \
tr -d '\r'
}

for file in $(basename -s .bin *.s16le.bin); do
Expand Down

0 comments on commit c14a13e

Please sign in to comment.