Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run the tests in the subcrate #51

Merged
merged 3 commits into from
Feb 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ before_script:
- cargo --version
- sh install_rustfmt_clippy.sh
script:
- cargo fmt --all -- --check
- cargo clippy -- -D warnings
- cargo build --verbose
- sh run_tests.sh
- sh run_sanitizers.sh
Expand Down
20 changes: 20 additions & 0 deletions run_sanitizers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,26 @@ else
exit
fi

# Run tests in the sub crate
# -------------------------------------------------------------------------------------------------
cd coreaudio-sys-utils

echo "\n\nRun ASan\n-----------\n"
RUSTFLAGS="-Z sanitizer=address" cargo test

echo "\n\nRun LSan\n-----------\n"
RUSTFLAGS="-Z sanitizer=leak" cargo test

echo "\n\nRun MSan\n-----------\n"
RUSTFLAGS="-Z sanitizer=memory" cargo test

echo "\n\nRun TSan\n-----------\n"
RUSTFLAGS="-Z sanitizer=thread" cargo test

cd ..

# Run tests in the main crate
# -------------------------------------------------------------------------------------------------
echo "\n\nRun ASan\n-----------\n"
RUSTFLAGS="-Z sanitizer=address" sh run_tests.sh

Expand Down
23 changes: 23 additions & 0 deletions run_tests.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
# display backtrace for debugging
export RUST_BACKTRACE=1

# Run tests in the sub crate
# -------------------------------------------------------------------------------------------------
cd coreaudio-sys-utils

# Format check
cargo fmt --all -- --check

# Lints check
cargo clippy -- -D warnings

# Regular Tests
cargo test

cd ..

# Run tests in the main crate
# -------------------------------------------------------------------------------------------------
# Format check
cargo fmt --all -- --check

# Lints check
cargo clippy -- -D warnings

# Regular Tests
cargo test --verbose
cargo test test_configure_output -- --ignored
Expand Down