Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Commit

Permalink
feat: updated file location in git diff script
Browse files Browse the repository at this point in the history
  • Loading branch information
ASuciuX committed Dec 5, 2023
1 parent 227f13f commit 55e66bb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 31 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/mutants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ jobs:
- name: Print old commit hash
run: cat ./mutation-testing/packages-output/last_commit_hash.txt

- name: Run the mutation testing on the differences
run: |
if [ -f ../packages-output/last_commit_hash.txt ]; then
./git-diff.sh
fi
working-directory: ./mutation-testing/scripts
# - name: Run the mutation testing on the differences
# run: |
# if [ -f ../packages-output/last_commit_hash.txt ]; then
# ./git-diff.sh
# fi
# working-directory: ./mutation-testing/scripts

- name: Re-write the old commit hash with the current one
run: |
Expand Down
2 changes: 1 addition & 1 deletion mutation-testing/scripts/git-diff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ cd mutation-testing


# get the differences since the last commit
last_commit_hash=$(<./last_commit_hash.txt)
last_commit_hash=$(<./packages-output/last_commit_hash.txt)
git diff "$last_commit_hash"

# it runs cargo mutants for those specific changed functions and outputs to /temp/mutants.out
Expand Down
24 changes: 0 additions & 24 deletions stx-genesis/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,30 +110,6 @@ impl Iterator for LinePairReader {
}
}

fn fn_option_remove() -> Option<u8> {
Some(2)
}

fn fn_int_remove() -> u32 {
12
}

fn read_deflated_zonefiles_test_clone(
deflate_bytes: &'static [u8],
) -> Box<dyn Iterator<Item = GenesisZonefile>> {
let cursor = io::Cursor::new(deflate_bytes);
let deflate_decoder = deflate::Decoder::new(cursor);
let buff_reader = BufReader::new(deflate_decoder);
let pairs = LinePairReader {
val: buff_reader.lines(),
};
let pair_iter = pairs.into_iter().map(|pair| GenesisZonefile {
zonefile_hash: pair[0].to_owned(),
zonefile_content: pair[1].replace("\\n", "\n"),
});
return Box::new(pair_iter);
}

fn read_deflated_zonefiles(
deflate_bytes: &'static [u8],
) -> Box<dyn Iterator<Item = GenesisZonefile>> {
Expand Down

0 comments on commit 55e66bb

Please sign in to comment.