Skip to content

Commit

Permalink
(try) fix CICD yet again
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-valerio committed Oct 24, 2024
1 parent 5d505ed commit c769bfd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,15 @@ jobs:
working-directory: ./sample
run: bash build.sh

- name: Run all unit tests
- name: Run all unit and integration tests
run: |
cargo test --no-fail-fast -- --test-threads=1 --show-output
# Clean up after tests
cargo clean
df -h
- name: Final cleanup
if: always()
run: |
cargo clean
sudo apt autoremove -y
sudo apt clean
rm -rf ~/.cargo/registry ~/.cargo/git ~/.cargo/index
rm -rf target
cargo clean
12 changes: 9 additions & 3 deletions tests/shared/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,16 @@ pub fn is_compiled(path_instrumented_contract: &Path) -> bool {

/// A function to get all entries from the corpus directory
pub fn get_corpus_files(corpus_path: &PathBuf) -> ResultOf<HashSet<PathBuf>> {
let corpus_files = fs::read_dir(corpus_path)
.context(format!("Can't read {corpus_path:?}"))?
let entries = fs::read_dir(corpus_path).context(format!("Can't read {corpus_path:?}"))?;

let paths: Vec<_> = entries
.filter_map(|entry| entry.ok().map(|e| e.path()))
.collect::<HashSet<PathBuf>>();
.collect();

let i = paths.len();
println!("Could read {corpus_path:?} containing {i:?} files");

let corpus_files: HashSet<PathBuf> = paths.into_iter().collect();

println!(
"Got {} corpus files in {:?}",
Expand Down

0 comments on commit c769bfd

Please sign in to comment.