mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
commit
5cd6bcf2a8
5 changed files with 47 additions and 18 deletions
31
.travis.yml
31
.travis.yml
|
@ -1,15 +1,28 @@
|
||||||
language: rust
|
language: rust
|
||||||
rust:
|
matrix:
|
||||||
- stable
|
include:
|
||||||
- beta
|
- rust: stable
|
||||||
- nightly
|
os: linux
|
||||||
os:
|
env: FEATURES=''
|
||||||
- linux
|
- rust: stable
|
||||||
- osx
|
os: osx
|
||||||
|
env: FEATURES=''
|
||||||
|
- rust: beta
|
||||||
|
os: linux
|
||||||
|
env: FEATURES=''
|
||||||
|
- rust: beta
|
||||||
|
os: osx
|
||||||
|
env: FEATURES=''
|
||||||
|
- rust: nightly
|
||||||
|
os: linux
|
||||||
|
env: FEATURES=nightly
|
||||||
|
- rust: nightly
|
||||||
|
os: osx
|
||||||
|
env: FEATURES=nightly
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- $HOME/.cargo
|
- $HOME/.cargo
|
||||||
sudo: false
|
sudo: false
|
||||||
script:
|
script:
|
||||||
- cargo build
|
- cargo build --features "$FEATURES"
|
||||||
- cargo test --no-fail-fast
|
- cargo test --features "$FEATURES" --no-fail-fast
|
||||||
|
|
|
@ -95,8 +95,9 @@ generic = [
|
||||||
"whoami",
|
"whoami",
|
||||||
"yes",
|
"yes",
|
||||||
]
|
]
|
||||||
default = ["generic", "unix"]
|
|
||||||
test_unimplemented = []
|
test_unimplemented = []
|
||||||
|
nightly = []
|
||||||
|
default = ["generic", "unix"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
uucore = { path="src/uucore" }
|
uucore = { path="src/uucore" }
|
||||||
|
|
21
appveyor.yml
21
appveyor.yml
|
@ -3,11 +3,26 @@ environment:
|
||||||
- TARGET: x86_64-pc-windows-msvc
|
- TARGET: x86_64-pc-windows-msvc
|
||||||
- TARGET: i686-pc-windows-msvc
|
- TARGET: i686-pc-windows-msvc
|
||||||
- TARGET: i686-pc-windows-gnu
|
- TARGET: i686-pc-windows-gnu
|
||||||
|
MINGW_URL: https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.2/threads-win32/dwarf/i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z/download
|
||||||
|
MINGW_ARCHIVE: i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z
|
||||||
|
MINGW_DIR: mingw32
|
||||||
|
- TARGET: x86_64-pc-windows-gnu
|
||||||
|
MSYS_BITS: 64
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe"
|
- ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe"
|
||||||
|
- SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin;C:\MinGW\bin
|
||||||
|
|
||||||
|
# Use the system msys if we can
|
||||||
|
- if defined MSYS_BITS set PATH=C:\msys64\mingw%MSYS_BITS%\bin;C:\msys64\usr\bin;%PATH%
|
||||||
|
|
||||||
|
# download a custom compiler otherwise
|
||||||
|
- if defined MINGW_ARCHIVE appveyor DownloadFile "%MINGW_URL%" -FileName "%MINGW_ARCHIVE%"
|
||||||
|
- if defined MINGW_ARCHIVE 7z x -y "%MINGW_ARCHIVE%" > nul
|
||||||
|
- if defined MINGW_ARCHIVE set PATH=%CD%\%MINGW_DIR%\bin;C:\msys64\usr\bin;%PATH%
|
||||||
|
|
||||||
- rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
|
- rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
|
||||||
- SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin
|
|
||||||
- SET PATH=%PATH%;C:\MinGW\bin
|
|
||||||
- rustc -V
|
- rustc -V
|
||||||
- cargo -V
|
- cargo -V
|
||||||
|
|
||||||
|
@ -18,4 +33,4 @@ artifacts:
|
||||||
build: false
|
build: false
|
||||||
|
|
||||||
test_script:
|
test_script:
|
||||||
- cargo test --no-fail-fast --features generic --no-default-features
|
- cargo test --no-fail-fast --features nightly generic --no-default-features
|
||||||
|
|
2
build.rs
2
build.rs
|
@ -12,7 +12,7 @@ pub fn main() {
|
||||||
if val == "1" && key.starts_with(feature_prefix) {
|
if val == "1" && key.starts_with(feature_prefix) {
|
||||||
let krate = key[feature_prefix.len()..].to_lowercase();
|
let krate = key[feature_prefix.len()..].to_lowercase();
|
||||||
match krate.as_ref() {
|
match krate.as_ref() {
|
||||||
"default" | "unix" | "generic" | "test_unimplemented" => continue,
|
"default" | "unix" | "generic" | "nightly" | "test_unimplemented" => continue,
|
||||||
_ => {},
|
_ => {},
|
||||||
}
|
}
|
||||||
crates.push(krate.to_string());
|
crates.push(krate.to_string());
|
||||||
|
|
|
@ -145,11 +145,11 @@ fn test_invalid_option() {
|
||||||
ucmd.fails();
|
ucmd.fails();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unused_variable)]
|
#[cfg(target_os = "linux")]
|
||||||
const NORMAL_FMTSTR: &'static str = "%a %A %b %B %d %D %f %F %g %G %h %i %m %n %o %s %u %U %w %W %x %X %y %Y %z %Z";
|
const NORMAL_FMTSTR: &'static str = "%a %A %b %B %d %D %f %F %g %G %h %i %m %n %o %s %u %U %w %W %x %X %y %Y %z %Z";
|
||||||
#[allow(unused_variable)]
|
#[cfg(target_os = "linux")]
|
||||||
const DEV_FMTSTR: &'static str = "%a %A %b %B %d %D %f %F %g %G %h %i %m %n %o %s (%t/%T) %u %U %w %W %x %X %y %Y %z %Z";
|
const DEV_FMTSTR: &'static str = "%a %A %b %B %d %D %f %F %g %G %h %i %m %n %o %s (%t/%T) %u %U %w %W %x %X %y %Y %z %Z";
|
||||||
#[allow(unused_variable)]
|
#[cfg(target_os = "linux")]
|
||||||
const FS_FMTSTR: &'static str = "%a %b %c %d %f %i %l %n %s %S %t %T";
|
const FS_FMTSTR: &'static str = "%a %b %c %d %f %i %l %n %s %S %t %T";
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
@ -233,7 +233,7 @@ fn test_printf() {
|
||||||
assert_eq!(ucmd.run().stdout, "123?\r\"\\\x07\x08\x1B\x0C\x0B /\x12wZJ\n");
|
assert_eq!(ucmd.run().stdout, "123?\r\"\\\x07\x08\x1B\x0C\x0B /\x12wZJ\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[cfg(target_os = "linux")]
|
||||||
fn expected_result(args: &[&str]) -> String {
|
fn expected_result(args: &[&str]) -> String {
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue