Skip to content

Commit

Permalink
Print mutant overview
Browse files Browse the repository at this point in the history
  • Loading branch information
gvladika committed Aug 13, 2024
1 parent 6a87599 commit b9b143e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
16 changes: 14 additions & 2 deletions test-mutation/config.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
[
{
"filename": "../contracts/tokenbridge/arbitrum/gateway/L2ArbitrumGateway.sol",
"filename": "../contracts/tokenbridge/ethereum/L1ArbitrumMessenger.sol",
"sourceroot": "..",
"solc_remappings": [
"@openzeppelin=../node_modules/@openzeppelin",
"@arbitrum=../node_modules/@arbitrum"
]
],
"num_mutants": 4,
"random_seed": true
},
{
"filename": "../contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol",
"sourceroot": "..",
"solc_remappings": [
"@openzeppelin=../node_modules/@openzeppelin",
"@arbitrum=../node_modules/@arbitrum"
],
"num_mutants": 4,
"random_seed": true
}
]
5 changes: 4 additions & 1 deletion test-mutation/gambitTester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async function runMutationTesting() {
console.log('====== Generating mutants')
const mutants: Mutant[] = await _generateMutants()

console.log('\n====== Test mutants')
console.log('\n====== Testing mutants')
const results = await _testAllMutants(mutants)

// Print summary
Expand Down Expand Up @@ -74,6 +74,9 @@ async function _generateMutants(): Promise<Mutant[]> {
fs.readFileSync(`${GAMBIT_OUT}/gambit_results.json`, 'utf8')
)
console.log(`Generated ${mutants.length} mutants in ${GAMBIT_OUT}`)
console.log('----------------------------------------------')
console.log('Mutants overview:')
console.log(fs.readFileSync(`${GAMBIT_OUT}/mutants.log`, 'utf8'))

return mutants
}
Expand Down

0 comments on commit b9b143e

Please sign in to comment.