]> git.proxmox.com Git - rustc.git/blame - src/vendor/regex/ci/script.sh
New upstream version 1.28.0~beta.14+dfsg1
[rustc.git] / src / vendor / regex / ci / script.sh
CommitLineData
8bb4bdeb
XL
1#!/bin/sh
2
3# This is the main CI script for testing the regex crate and its sub-crates.
4
0531ce1d 5set -ex
8bb4bdeb
XL
6
7# Builds the regex crate and runs tests.
8cargo build --verbose
9cargo doc --verbose
2c00a5a8 10
0531ce1d 11# Run tests. If we have nightly, then enable our nightly features.
8bb4bdeb 12if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then
0531ce1d 13 cargo test --verbose --features unstable
8bb4bdeb 14else
0531ce1d 15 cargo test --verbose
8bb4bdeb
XL
16fi
17
18# Run a test that confirms the shootout benchmarks are correct.
19ci/run-shootout-test
20
21# Run tests on regex-syntax crate.
22cargo test --verbose --manifest-path regex-syntax/Cargo.toml
23cargo doc --verbose --manifest-path regex-syntax/Cargo.toml
24
25# Run tests on regex-capi crate.
26cargo build --verbose --manifest-path regex-capi/Cargo.toml
2c00a5a8
XL
27(cd regex-capi/ctest && ./compile && LD_LIBRARY_PATH=../../target/debug ./test)
28(cd regex-capi/examples && ./compile && LD_LIBRARY_PATH=../../target/debug ./iter)
8bb4bdeb
XL
29
30# Make sure benchmarks compile. Don't run them though because they take a
0531ce1d 31# very long time. Also, check that we can build the regex-debug tool.
8bb4bdeb 32if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then
0531ce1d 33 cargo build --verbose --manifest-path regex-debug/Cargo.toml
8bb4bdeb 34 for x in rust rust-bytes pcre1 onig; do
0531ce1d 35 (cd bench && ./run $x --no-run --verbose)
8bb4bdeb
XL
36 done
37fi