mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
Merge pull request #5825 from tertsdiepraam/codecov-uucore-features
CI: test `uucore` with `coreutils` in codecov to run it with the proper features
This commit is contained in:
commit
b7a14ac119
2 changed files with 8 additions and 15 deletions
10
.github/workflows/CICD.yml
vendored
10
.github/workflows/CICD.yml
vendored
|
@ -1012,16 +1012,8 @@ jobs:
|
||||||
UTILITY_LIST="$(./util/show-utils.sh ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }})"
|
UTILITY_LIST="$(./util/show-utils.sh ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }})"
|
||||||
CARGO_UTILITY_LIST_OPTIONS="$(for u in ${UTILITY_LIST}; do echo -n "-puu_${u} "; done;)"
|
CARGO_UTILITY_LIST_OPTIONS="$(for u in ${UTILITY_LIST}; do echo -n "-puu_${u} "; done;)"
|
||||||
outputs CARGO_UTILITY_LIST_OPTIONS
|
outputs CARGO_UTILITY_LIST_OPTIONS
|
||||||
- name: Test uucore
|
|
||||||
run: cargo nextest run --profile ci --hide-progress-bar -p uucore
|
|
||||||
env:
|
|
||||||
RUSTC_WRAPPER: ""
|
|
||||||
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
|
|
||||||
RUSTDOCFLAGS: "-Cpanic=abort"
|
|
||||||
RUST_BACKTRACE: "1"
|
|
||||||
# RUSTUP_TOOLCHAIN: ${{ steps.vars.outputs.TOOLCHAIN }}
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: cargo nextest run --profile ci --hide-progress-bar ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }}
|
run: cargo nextest run --profile ci --hide-progress-bar ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} -p uucore -p coreutils
|
||||||
env:
|
env:
|
||||||
RUSTC_WRAPPER: ""
|
RUSTC_WRAPPER: ""
|
||||||
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
|
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
|
||||||
|
|
|
@ -484,22 +484,23 @@ mod tests {
|
||||||
fn test_crlf_across_blocks() {
|
fn test_crlf_across_blocks() {
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
|
|
||||||
use crate::digest::Digest;
|
use super::Digest;
|
||||||
use crate::digest::DigestWriter;
|
use super::DigestWriter;
|
||||||
|
use super::Md5;
|
||||||
|
|
||||||
// Writing "\r" in one call to `write()`, and then "\n" in another.
|
// Writing "\r" in one call to `write()`, and then "\n" in another.
|
||||||
let mut digest = Box::new(md5::Md5::new()) as Box<dyn Digest>;
|
let mut digest = Box::new(Md5::new()) as Box<dyn Digest>;
|
||||||
let mut writer_crlf = DigestWriter::new(&mut digest, false);
|
let mut writer_crlf = DigestWriter::new(&mut digest, false);
|
||||||
writer_crlf.write_all(&[b'\r']).unwrap();
|
writer_crlf.write_all(&[b'\r']).unwrap();
|
||||||
writer_crlf.write_all(&[b'\n']).unwrap();
|
writer_crlf.write_all(&[b'\n']).unwrap();
|
||||||
writer_crlf.hash_finalize();
|
writer_crlf.finalize();
|
||||||
let result_crlf = digest.result_str();
|
let result_crlf = digest.result_str();
|
||||||
|
|
||||||
// We expect "\r\n" to be replaced with "\n" in text mode on Windows.
|
// We expect "\r\n" to be replaced with "\n" in text mode on Windows.
|
||||||
let mut digest = Box::new(md5::Md5::new()) as Box<dyn Digest>;
|
let mut digest = Box::new(Md5::new()) as Box<dyn Digest>;
|
||||||
let mut writer_lf = DigestWriter::new(&mut digest, false);
|
let mut writer_lf = DigestWriter::new(&mut digest, false);
|
||||||
writer_lf.write_all(&[b'\n']).unwrap();
|
writer_lf.write_all(&[b'\n']).unwrap();
|
||||||
writer_lf.hash_finalize();
|
writer_lf.finalize();
|
||||||
let result_lf = digest.result_str();
|
let result_lf = digest.result_str();
|
||||||
|
|
||||||
assert_eq!(result_crlf, result_lf);
|
assert_eq!(result_crlf, result_lf);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue