aboutsummaryrefslogtreecommitdiffstats
path: root/gocoverage.sh
blob: 35038108b943305b42bffb95b68aa9c68b3b32ba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
# The script does automatic checking on a Go package and its sub-packages, including:
# 6. test coverage (http://blog.golang.org/cover)

set -e

# Run test coverage on each subdirectories and merge the coverage profile.

echo "mode: count" > profile.cov

# Standard go tooling behavior is to ignore dirs with leading underscors
for dir in $(find . -maxdepth 10 -not -path './.git*' -not -path '*/_*' -type d);
do
if ls $dir/*.go &> /dev/null; then
    # echo $dir
    go test -covermode=count -coverprofile=$dir/profile.tmp $dir
    if [ -f $dir/profile.tmp ]
    then
        cat $dir/profile.tmp | tail -n +2 >> profile.cov
        rm $dir/profile.tmp
    fi
fi
done

go tool cover -func profile.cov

# To submit the test coverage result to coveralls.io,
# use goveralls (https://github.com/mattn/goveralls)
# goveralls -coverprofile=profile.cov -service=travis-ci
2017-09-043-0/+861 | | | | | | | | Codesize - creation of a ~1mb out of bounds in transaction init code * | Merge pull request #299 from ethereum/refill-stBadOpcodeswinsvega2017-09-041-1/+6756 |\ \ | | | | | | Re-fill stBadOpcodes | * | refill stBadOpcodesJared Wasinger2017-09-041-1/+6756 |/ / * | Merge pull request #296 from ethereum/splitvmtestswinsvega2017-09-031376-1829136/+55309 |\| | | | | Splitvmtests | * refill splited VMtestsDimitry2017-09-01711-1807322/+32330 | | | * split vm testsDimitry2017-09-01687-22389/+23554 | | * | Merge pull request #277 from ethereum/badOpcodes-CALLBLACKBOXwinsvega2017-09-02124-4730/+48742 |\ \ | | | | | | Add more opcodes to badOpcodes test | * | add more blockchain test cases.Jared Wasinger2017-09-02123-9252/+48604 | | | | * | add test case which successfully creates a contract to 'badOpcodes' state ↵Jared Wasinger2017-09-012-745/+799 | | | | | | | | | | | | test. remove unused account. | * | add more bad opcodesJared Wasinger2017-09-012-41/+4577 | | | | * | add CALLBLACKBOX testJared Wasinger2017-09-012-313/+383 | | | * | | Merge pull request #297 from ethereum/sstore-in-contract-initYoichi Hirai2017-09-023-0/+767 |\ \ \ | | | | | | | | Add state test for sstore in contract init code | * | | include produced testJared Wasinger2017-09-011-1/+101 | | | | | * | | remove tabsJared Wasinger2017-09-011-2/+2 | | | | | * | | add state test for sstore in contract init codeJared Wasinger2017-09-013-0/+667 | | |/ | |/| * | | Merge pull request #295 from ethereum/not_homsteadYoichi Hirai2017-09-022-43/+73 |\ \ \ | |/ / |/| | Refill suicideCoinbase test after fixing a typo Homstead -> Homestead | * | Refill suicideCoinbase test after fixing a typo Homstead -> HomesteadYoichi Hirai2017-08-312-43/+73 |/ / * | Merge pull request #293 from ethereum/refill-refund50PercentCap-againYoichi Hirai2017-08-311-82/+82 |\ \ | | | | | | --fillchain refund50percentCap test | * | --fillchain refund50percentCap testYoichi Hirai2017-08-311-82/+82 | |/ | | | | | | This fixes `test/testeth -t BCGeneralStateTests/stRefundTest -- --all` * | Merge pull request #292 from holgerd77/update-docsYoichi Hirai2017-08-3111-245/+365 |\ \ | |/ |/| Structural overhaul of the whole docs / Updated state test section / info box on test type status | * Updated contribute notice on table of contents in docsholgerd772017-08-311-2/+1 | | | * Moved to a simpler file structure for test typesholgerd772017-08-317-6/+6 | | | * Updated VM testsholgerd772017-08-312-19/+53 | | | * Updated difficulty test structure, network/fork informationholgerd772017-08-311-7/+13 | | | * Updated rlp tests structureholgerd772017-08-311-10/+20 | | | * Added updated version of the state test docs from EIP 176 (rough version as ↵holgerd772017-08-312-59/+88 | | | | | | | | a basis to be fine-tuned) | * Structural improvements to the blockchain tests section, new info box with ↵holgerd772017-08-311-19/+43 | | | | | | | | location and HF support info, notice on GeneralStateTests subfolder | * Fix headings, line breaksholgerd772017-08-318-40/+58 | | * | Merge pull request #291 from ethereum/fill-more-bcWalletYoichi Hirai2017-08-314-1355/+1355 |\ \ | | | | | | Fill wallet tests that were failing in the daily run | * | Fill wallet tests that were failing in the daily runYoichi Hirai2017-08-314-1355/+1355 |/ / * | Merge pull request #281 from ethereum/refill-refund50PercentCapYoichi Hirai2017-08-311-56/+56 |\ \ | |/ |/| Fill BlockchainTests/GeneralStateTests/stRefundTest/refund50percentCap | * Fill BlockchainTests/GeneralStateTests/stRefundTest/refund50percentCapYoichi Hirai2017-08-281-56/+56 | | | | | | | | | | | | I was investigating https://github.com/ethereum/cpp-ethereum/issues/4413 and found that the problem has disappeared on the current develop. This commit fills one of the tests mentioned in the issue. * | Merge pull request #276 from ethereum/walletReorgwinsvega2017-08-302-13995/+13465 |\ \ | | | | | | Refill walletReorganizeOwnersFiller.json | * | Refill walletReorganizeOwnersFiller.jsonYoichi Hirai2017-08-262-13995/+13465 | | | | | | | | | | | | | | | | | | | | | walletReorganizeOwner.json contained an empty state in a post state in Byzantium, which is clearly wrong. I had to remove expectations because the Filler was failing for Frontier. This issue will be investigated separately at https://github.com/ethereum/cpp-ethereum/issues/4409 * | | Merge pull request #280 from ethereum/refill-refund600Yoichi Hirai2017-08-302-103/+103 |\ \ \ | | | | | | | | Refull refund600 test | * | | Refull refund600 testYoichi Hirai2017-08-282-103/+103 | | |/ | |/| | | | | | | | | | | | | | | | I was investigating https://github.com/ethereum/cpp-ethereum/issues/4413 and found that GeneralStateTests/stRefundTest/refund600.json was out of date. This commit updates the test together with the BlockchainTest translation. * | | Merge pull request #287 from ethereum/splittransactiontestswinsvega2017-08-301208-15471/+17168 |\ \ \ | | | | | | | | Split TransactionTests into separate files | * | | refill transaction testsDimitry2017-08-30455-284/+2740 | | | | | * | | more transaction testsDimitry2017-08-30173-2898/+3081 | | | | | * | | split transaction tests into separate filesDimitry2017-08-30868-12573/+11631 | | | | * | | | Merge pull request #286 from ethereum/refill-stQuadraticComplexityYoichi Hirai2017-08-3030-1410/+1200 |\ \ \ \ | | | | | | | | | | --fillchain on GeneralStateTests/stQuadraticComplexityTest | * | | | --fillchain on GeneralStateTests/stQuadraticComplexityTestYoichi Hirai2017-08-2930-1410/+1200 | | | | | | | | | | | | | | | | | | | | This will eliminate around 30 errors from `testeth -t BCGeneralStateTests/stQuadraticComplexityTest -- --all` * | | | | Merge pull request #284 from holgerd77/add-docsYoichi Hirai2017-08-3014-1/+890 |\ \ \ \ \ | |_|/ / / |/| | | | Integrate test documentation from Homestead docs | * | | | Some updates on state tests, note on outdated structureholgerd772017-08-301-4/+19 | | | | | | * | | | Updated the test structure of BlockchainTests, removed outdated informationholgerd772017-08-301-82/+91 | | | | | | * | | | Added note on outdated docs, seek for helpholgerd772017-08-302-1/+7 | | | | | | * | | | Updated test doc URL in README, added some contribution notesholgerd772017-08-303-1/+21 | | | | | | * | | | Added doc rst files from the Homestead docsholgerd772017-08-309-8/+598 | | | | | | * | | | Add initial Sphinx docs directory, added docs/_build/ folder to .gitignoreholgerd772017-08-305-0/+249 |/ / / / * | | | Merge pull request #288 from ethereum/fillchain-stRandomYoichi Hirai2017-08-301-54/+40 |\ \ \ \ | |/ / / |/| | | --fillchain randomStatetest642_d0g0v0.json | * | | --fillchain ↵Yoichi Hirai2017-08-301-54/+40 |/ / / | | | | | | | | | BlockchainTests/GeneralStateTests/stRandom/randomStatetest642_d0g0v0.json * | | Merge pull request #285 from ethereum/log-as-hashYoichi Hirai2017-08-291-1509/+128 |\ \ \ | | | | | | | | Replace the remaining log arrays with log hashes | * | | Replace the remaining log arrays with log hashesYoichi Hirai2017-08-291-1509/+128 | | | | | | | | | | | | | | | | | | | | | | | | testeth changed the log formats recently. The test cases are not supposed to contain logs, but only the hash of the logs. `test/testeth -t 'VMTests' -- --all` passes after this commit. * | | | Merge pull request #283 from ethereum/returndatasize_after_staticcallYoichi Hirai2017-08-298-0/+772 |\ \ \ \ | |/ / / |/| | | Add new `returndatasize/returndatacopy` state tests | * | | add 'returndatacopy_after_successful_delegatecall' state testJared Wasinger2017-08-292-0/+193 | | | | | * | | add 'returndatacopy_after_successful_callcode' state testJared Wasinger2017-08-292-0/+193 | | | | | * | | add 'returndatasize_after_successful_delegatecall' state testJared Wasinger2017-08-292-0/+193 | | | | | * | | add 'returndatasize_after_successful_staticcall' state testJared Wasinger2017-08-292-0/+193 |/ / / * | | Merge pull request #282 from ethereum/precompiled-failure-means-balance-revertYoichi Hirai2017-08-291-3/+3 |\ \ \ | | | | | | | | Precompiled failure means reverting the balance transfer | * | | This change is a part of the fix to ↵Yoichi Hirai2017-08-281-3/+3 |/ / / | | | | | | | | | https://github.com/ethereum/cpp-ethereum/issues/4416 * / / add randomTest642 that fails on geth. a call to precompiled 007Dimitry2017-08-283-0/+896 |/ / * | Merge pull request #279 from ethereum/filled-hive-testsYoichi Hirai2017-08-283036-141382/+244798 |\ \ | | | | | | Translate GeneralStateTests into BlockchainTests/GeneralStateTests | * | Translate GeneralStateTests into BlockahtinTests/GeneralStateTestsYoichi Hirai2017-08-283036-141382/+244798 | | | * | | Merge pull request #278 from ethereum/returndatasize_after_callcodeYoichi Hirai2017-08-282-0/+192 |\ \ \ | |/ / |/| | add state test 'returndatasize_after_callcode' | * | add state test 'returndatasize_after_callcode'Jared Wasinger2017-08-282-0/+192 |/ / * | Merge pull request #268 from ethereum/bc-schemaYoichi Hirai2017-08-265-4/+507 |\ \ | | | | | | Add blockchain test linting | * | add blockchain test linting to travisJared Wasinger2017-08-265-4/+507 |/ / * | Merge pull request #275 from ethereum/bc-schema-test-fixesYoichi Hirai2017-08-264-1549/+1532 |\ \ | |/ |/| fix tests that don't conform to blockchain test schema | * fix tests that don't conform to blockchain test schemaJared Wasinger2017-08-264-1549/+1532 |/ * Merge pull request #273 from ethereum/vmIO-fixYoichi Hirai2017-08-252-146/+145 |\ | | | | Fix the filler and fill vmIOandFlowOperationsTest | * Fix the filler and fill vmIOandFlowOperationsTestYoichi Hirai2017-08-242-146/+145 | | * | Merge pull request #274 from ethereum/log-new-formatYoichi Hirai2017-08-253-76969/+38570 |\ \ | |/ |/| Replace more logs with hashes | * Replace more logs with log hashesYoichi Hirai2017-08-242-76924/+38463 | | | * Replace logs with log hashesYoichi Hirai2017-08-241-45/+107 |/ * Merge pull request #271 from ethereum/address-collision-failsYoichi Hirai2017-08-246-112/+22 |\ | | | | EIP 684: contract creation fails on nonempty code or nonzero nonce | * Changes for EIP-684Yoichi Hirai2017-08-246-112/+22 |/ | | | The change was agreed on the last coredev call and this morning I got an OK from @arkpar. * Merge pull request #267 from ethereum/some-vm-test-failuresYoichi Hirai2017-08-2419-1468/+3457 |\ | | | | Replace logs with hashes in VM tests | * Replace logs with hashesYoichi Hirai2017-08-238-17/+9 | | | * Fix some VMTest filling failuresYoichi Hirai2017-08-2311-1451/+3448 |/ * Merge pull request #269 from ethereum/eip649Yoichi Hirai2017-08-23224-36522/+36848 |\ | | | | EIP649: difficulty and reward changes | * Fix uncleHeaderAt2ByzantiumFiller with a correct state root hashYoichi Hirai2017-08-232-3/+705 | | | | | | | | See https://github.com/ethereum/tests/pull/269#discussion_r134723534 | * Fix uncleBloomNot0_2 with the expected state root hashYoichi Hirai2017-08-232-97/+148 | | | | | | | | See https://github.com/ethereum/tests/pull/269#discussion_r134723381 | * Fix futureUncleTimestampDifficultyDrop2Yoichi Hirai2017-08-232-98/+149 | | | | | | | | See https://github.com/ethereum/tests/pull/269#discussion_r134722457 | * Fill more testsYoichi Hirai2017-08-2247-1338/+1551 | | | * Fill more testsYoichi Hirai2017-08-2247-1695/+1482 | | | * Fill more tests on eip649 branchYoichi Hirai2017-08-2221-788/+762 | | | * Fill in more testsYoichi Hirai2017-08-2216-1369/+917 | | | * Refill more straightforward BlockchainTestsYoichi Hirai2017-08-2278-6787/+6787 | | | * Refill straightforward casesYoichi Hirai2017-08-2272-26077/+26077 | | * | Merge pull request #266 from ethereum/0x-fieldswinsvega2017-08-234-1563/+1563 |\ \ | | | | | | Refilled tests again so that 0x is in front of byte sequences | * | Refilled tests again so that 0x is in front of byte sequencesYoichi Hirai2017-08-224-1563/+1563 | | | * | | Merge pull request #213 from jwasinger/issue-204Yoichi Hirai2017-08-234-1/+688 |\ \ \ | | | | | | | | JSON schema for state tests | * | | add storage and code restrictions to json schemacdetrio2017-08-082-3/+25 | | | | | * | | replace Metropolis with Byzantium and Constantinople in state test schemacdetrio2017-08-081-1/+4 | | | | | * | | add schema for state test fillerscdetrio2017-08-082-0/+258 | | | | | * | | use more type definitions in schemacdetrio2017-08-081-116/+214 | | | | | * | | validate.js takes schema file as argumentcdetrio2017-08-082-2/+4 | | | | | * | | improve type checking.Jared Wasinger2017-08-081-148/+190 | | | | | * | | remove es6 syntax from validation script.Jared Wasinger2017-08-081-1/+1 | | | | | * | | make travis use node8Jared Wasinger2017-08-081-1/+1 | | | | | * | | make log ordering consistentJared Wasinger2017-08-081-0/+11 | | | | | * | | add ECDSA parameters r, s, v. Make sure certain fields are marked as ↵Jared Wasinger2017-08-081-8/+25 | | | | | | | | | | | | | | | | required. Add regex for GasAmount. | * | | make error output more informative. Make schema more comprehensive. Add ↵Jared Wasinger2017-08-083-38/+81 | | | | | | | | | | | | | | | | exit code of -1 upon failure | * | | fix process errorJared Wasinger2017-08-081-1/+0 | | | | | * | | format code. Remove unused python codeJared Wasinger2017-08-083-132/+105 | | | | | * | | use JS for json schema validation because the Node 'jsonschema' library is ↵Jared Wasinger2017-08-083-8/+15 | | | | | | | | | | | | | | | | the only one (that I have found) to correctly handle 'additionalProperties' as a boolean (https://spacetelescope.github.io/understanding-json-schema/reference/object.html) | * | | add schema validation with Travis integration.Jared Wasinger2017-08-084-20/+42 | | | | | * | | add "explanation" field. Reduce number of schema errorsJared Wasinger2017-08-084-2/+7 | | | | | * | | modify validation script to run against all test cases under GeneralStateTestsJared Wasinger2017-08-082-27/+9 | | | | | * | | add working schema outlineJared Wasinger2017-08-083-62/+194 | | | | | * | | add JSON schema skeleton for #204Jared Wasinger2017-08-081-0/+71 | | | | * | | | Merge pull request #253 from cdetrio/fix-data-0xYoichi Hirai2017-08-2334-138/+138 |\ \ \ \ | |_|/ / |/| | | add 0x prefix to state test transaction data | * | | add 0x prefix to state test transaction datacdetrio2017-08-0834-138/+138 | |/ / * | | Merge pull request #265 from ethereum/refill-wallet-testswinsvega2017-08-224-1727/+1727 |\ \ \ | |_|/ |/| | Refill bcWalletTest | * | Refill bcWalletTestYoichi Hirai2017-08-224-1727/+1727 |/ / | | | | | | Last time I filled these tests, I used a broken version of testeth, and "0x" prefix was missing everywhere * | refill opcodes test with logsDimitry2017-08-221-469/+235 | | * | Merge pull request #264 from ethereum/refill-empty-accountwinsvega2017-08-224-2315/+2287 |\ \ | | | | | | Refill some tests whose postState contained empty accounts | * | Refill wallet testsYoichi Hirai2017-08-224-1984/+1963 | | | | | | | | | | | | Before this commit, some empty accounts appeared in the postState | * | Refill the test wallet2outOf3txsRevoke.jsonYoichi Hirai2017-08-221-595/+588 | | | | | | | | | | | | Fixes #4362 * | | Merge pull request #263 from ethereum/logswinsvega2017-08-212726-89623/+23638 |\ \ \ | | | | | | | | remove old log fields from randomTestFillers | * | | make all logs hexDimitry2017-08-212193-81494/+17073 | | | | | * | | remove old fields from random testsDimitry2017-08-211081-8677/+7113 |/ / / | | | | | | | | | make logs hash * | | Merge pull request #261 from jwasinger/masterwinsvega2017-08-213-1/+2523 |\ \ \ | | | | | | | | Add State Tests for Unused Opcodes | * | | check for all possible invalid opcodes.Jared Wasinger2017-08-178-640/+2477 | | | | | * | | fix tests to conform to schemaJared Wasinger2017-08-175-7/+7 | | | | | * | | add SLOADBYTESJared Wasinger2017-08-173-1/+189 | | | | | * | | add badOpcode tests for SLOADBYTES and SSIZEJared Wasinger2017-08-175-3/+313 | | | | | * | | add badOpcode state test for SSIZEJared Wasinger2017-08-172-0/+187 | | | | * | | | Merge pull request #254 from cdetrio/fix-filler-storagewinsvega2017-08-2118-26/+26 |\ \ \ \ | |_|/ / |/| | | use hex for storage keys and values in state test fillers | * | | use hex for storage keys and values in state test fillerscdetrio2017-08-0818-26/+26 | | |/ | |/| * | | Merge pull request #262 from ethereum/eip96-to-constantinopleYoichi Hirai2017-08-17221-36812/+35337 |\ \ \ | |_|/ |/| | Move EIP96 to Constantinople | * | Fix more BlockchainTestsYoichi Hirai2017-08-1719-2908/+2826 | | | | * | fill BlockchainTests after delaying EIP96 to ConstantinopleYoichi Hirai2017-08-16206-34380/+32987 |/ / * | update comments in dao transition testsDimitry2017-08-157-472/+472 | | * | Merge pull request #260 from ethereum/bigger-memory-allocwinsvega2017-08-154-133/+133 |\ \ | | | | | | Fix the modexpFiller about large base length and large exp length | * | Fix the modexpFiller about large base length and large exp lengthYoichi Hirai2017-08-144-133/+133 |/ / * | fix test name zeroSigTransactionCreateDimitry2017-08-144-5/+787 | | * | Merge pull request #258 from cdetrio/returndata-caseswinsvega2017-08-1110-0/+891 |\ \ | | | | | | more returndata test cases | * | more returndata test casescdetrio2017-08-1110-0/+891 | | | * | | Update and rename zeroSigTransacrionCreate.json to zeroSigTransactionCreate.jsonwinsvega2017-08-111-2/+2 |/ / * | Merge pull request #255 from ethereum/revert-returndatacopywinsvega2017-08-093-0/+953 |\ \ | |/ |/| Add a test case that RETURNDATACOPYs REVERTed data | * Add a test case that RETURNDATACOPYs REVERTed dataYoichi Hirai2017-08-083-0/+953 |/ * Merge pull request #250 from cdetrio/filler-valid-jsonYoichi Hirai2017-08-0721-554/+554 |\ | | | | fix invalid json state test fillers | * fix invalid json fillerscdetrio2017-08-0621-554/+554 | | * | Merge pull request #248 from ethereum/odd-length-hex-in-vm-fillerwinsvega2017-08-064-89/+439 |\ \ | | | | | | Fix some formatting issues in VMTest fillers | * | Fix some formatting issues in VMTest fillersYoichi Hirai2017-08-054-89/+439 | |/ * | Merge pull request #246 from ethereum/filled-vm-test-no-expectwinsvega2017-08-063-68/+0 |\ \ | | | | | | Remove "expect" sections from VM tests | * | Remove "expect" sections from VM testsYoichi Hirai2017-08-053-68/+0 | |/ * | Merge pull request #251 from ethereum/hivetestswinsvega2017-08-062851-164758/+619483 |\ \ | |/ |/| Hive tests with Byzantine | * Hive tests with ByzantineDimitry2017-08-062851-164758/+619483 |/ * Merge pull request #245 from ethereum/blockhashtestYoichi Hirai2017-08-042-102/+155 |\ | | | | blockhash test on Byzantine transition | * blockhash test on Byzantine transitionDimitry2017-08-042-102/+155 | | * | Merge pull request #244 from ethereum/clear-storage-after-initwinsvega2017-08-043-80/+226 |\ \ | |/ |/| Change tests so that the storage is cleared before, not after contract initialization | * Fix the filler as wellYoichi Hirai2017-08-041-1/+5 | | | * Change tests so that the storage is cleared before, not after contract ↵Yoichi Hirai2017-08-042-79/+221 |/ | | | initialization * Merge pull request #241 from ethereum/metrosplitwinsvega2017-08-043205-75436/+304768 |\ | | | | Metrosplit | * Transition tests with ByzantiumDimitry2017-08-0315-3448/+865 | | | * split metropolisDimitry2017-08-03