Skip to content

Commit

Permalink
ci: fix address sanitizer step
Browse files Browse the repository at this point in the history
  • Loading branch information
ObserverOfTime committed May 4, 2024
1 parent f517b04 commit 24fb0fd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/sanitize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Sanitize

env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-D warnings"
RUSTFLAGS: -D warnings

on:
workflow_call:
Expand Down Expand Up @@ -34,17 +34,13 @@ jobs:

- name: Run main tests with undefined behaviour sanitizer (UBSAN)
env:
UBSAN_OPTIONS: halt_on_error=1
CFLAGS: -fsanitize=undefined
RUSTFLAGS: ${{ env.RUSTFLAGS }} -lubsan
run: cargo test -- --test-threads 1

- name: Run main tests with address sanitizer (ASAN)
env:
ASAN_OPTIONS: halt_on_error=1
ASAN_OPTIONS: verify_asan_link_order=0
CFLAGS: -fsanitize=address
RUSTFLAGS: ${{ env.RUSTFLAGS }} -Zsanitizer=address --cfg=sanitizing
run: |
rustup install nightly
rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
cargo +nightly test -Z build-std --target x86_64-unknown-linux-gnu -- --test-threads 1
RUSTFLAGS: ${{ env.RUSTFLAGS }} -lasan
run: cargo test -- --test-threads 1
9 changes: 5 additions & 4 deletions cli/src/tests/corpus_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,11 @@ fn test_corpus_for_json(seed: usize) {
test_language_corpus("json", seed, None, None);
}

// #[test_with_seed(retry=10, seed=*START_SEED, seed_fn=new_seed)]
// fn test_corpus_for_php(seed: usize) {
// test_language_corpus("php", seed, None, Some("php"));
// }
#[ignore]
#[test_with_seed(retry=10, seed=*START_SEED, seed_fn=new_seed)]
fn test_corpus_for_php(seed: usize) {
test_language_corpus("php", seed, None, Some("php"));
}

#[test_with_seed(retry=10, seed=*START_SEED, seed_fn=new_seed)]
fn test_corpus_for_python(seed: usize) {
Expand Down

0 comments on commit 24fb0fd

Please sign in to comment.