summaryrefslogtreecommitdiffstats
path: root/ci/script.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/script.sh')
-rwxr-xr-xci/script.sh36
1 files changed, 16 insertions, 20 deletions
diff --git a/ci/script.sh b/ci/script.sh
index 60d9a2d5..c0227c56 100755
--- a/ci/script.sh
+++ b/ci/script.sh
@@ -11,17 +11,16 @@ main() {
# output of cargo a little trickier. So just wipe it.
cargo clean
# Test a normal debug build.
- cargo build --target "${TARGET}" --verbose --all
+ cargo build --target "$TARGET" --verbose --all
- # Show the output of build.rs stderr.
+ # Show the output of the most recent build.rs stderr.
set +x
- find ./target/"$TARGET"/debug -name stderr | while read stderr; do
- if [ -s "$stderr" ]; then
- echo "===== $stderr ====="
- cat "$stderr"
- echo "====="
- fi
- done
+ stderr="$(find "target/$TARGET/debug" -name stderr -print0 | xargs -0 ls -t | head -n1)"
+ if [ -s "$stderr" ]; then
+ echo "===== $stderr ====="
+ cat "$stderr"
+ echo "====="
+ fi
set -x
# sanity check the file type
@@ -37,19 +36,16 @@ main() {
"$(dirname "${0}")/test_complete.sh"
# Check that we've generated man page and other shell completions.
- find ./target/"$TARGET"/debug/build/ripgrep-* -name 'out' | \
- while read outdir; do
- file "$outdir/rg.bash"
- file "$outdir/rg.fish"
- file "$outdir/_rg.ps1"
- # man page requires asciidoc, and we only install it on Linux x86.
- if is_linux; then
- file "$outdir/rg.1"
- fi
- done
+ outdir="$(cargo_out_dir "target/$TARGET/debug")"
+ file "$outdir/rg.bash"
+ file "$outdir/rg.fish"
+ file "$outdir/_rg.ps1"
+ # N.B. man page isn't generated on ARM cross-compile, but we gave up
+ # long before this anyway.
+ file "$outdir/rg.1"
# Run tests for ripgrep and all sub-crates.
- cargo test --target "${TARGET}" --verbose --all
+ cargo test --target "$TARGET" --verbose --all
}
main