diff --git a/.github/workflows/mutants.yml b/.github/workflows/mutants.yml index 79ce60573b..8cc19c06e5 100644 --- a/.github/workflows/mutants.yml +++ b/.github/workflows/mutants.yml @@ -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: | diff --git a/mutation-testing/scripts/git-diff.sh b/mutation-testing/scripts/git-diff.sh index d926669cbe..0a52b0ba9d 100755 --- a/mutation-testing/scripts/git-diff.sh +++ b/mutation-testing/scripts/git-diff.sh @@ -20,7 +20,7 @@ cd mutation-testing # get the differences since the last commit last_commit_hash=$(<./packages-output/last_commit_hash.txt) -git diff "$last_commit_hash" +git diff "$last_commit_hash" > git.diff # it runs cargo mutants for those specific changed functions and outputs to /temp/mutants.out # for faster builds: increase number to 4 if at least 16 gb ram and 6 cores CPU @@ -30,11 +30,11 @@ cargo mutants --no-shuffle -j 2 -vV --in-diff git.diff --output temp/ cd scripts # call append-match-package.sh to update the content from the stable output -sh append-match-package.sh +bash append-match-package.sh # print the modified mutants for testing, to be deleted echo "Files ending with .txt in ./temp/mutants.out:" -for file in ./temp/mutants.out/*.txt; do +for file in ../temp/mutants.out/*.txt; do if [ -f "$file" ]; then echo "File: $file" echo "Contents:" diff --git a/stx-genesis/src/lib.rs b/stx-genesis/src/lib.rs index cd75f9c750..0c18ce300e 100644 --- a/stx-genesis/src/lib.rs +++ b/stx-genesis/src/lib.rs @@ -110,30 +110,6 @@ impl Iterator for LinePairReader { } } -fn fn_option_remove() -> Option { - Some(2) -} - -fn fn_int_remove() -> u32 { - 12 -} - -fn read_deflated_zonefiles_test_clone( - deflate_bytes: &'static [u8], -) -> Box> { - 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> {