Commit Graph

29 Commits

Author SHA1 Message Date
Kamil Śliwak
67fe5fb145 prepare_report.py: Print some statistics about contracts and errors 2021-02-02 16:16:28 +01:00
Kamil Śliwak
4576b1ec89 prepare_report.py: --exit-on-error option 2021-02-02 16:16:28 +01:00
Kamil Śliwak
acaab18a0a prepare_report.py: More information on stdout, with verbosity control 2021-02-02 16:16:28 +01:00
Kamil Śliwak
96fd9051ed prepare_report.py: Add --report-file option 2021-02-02 16:16:28 +01:00
Kamil Śliwak
17fe96c4d0 prepare_report.py: Don't use --metadata option with compiler versions that do not support it
- Before 0.4.3 the option was unavailable but ignored.
- Between 0.4.3 and 0.4.6 an attempt to use that option causes an error.
2021-02-02 16:16:14 +01:00
Kamil Śliwak
49aede680b prepare_report.py: Add --force-no-optimize-yul flag to work around a bug in solc 0.6.0/0.6.1 2021-02-02 16:16:14 +01:00
Kamil Śliwak
7e48aeb848 prepare_report.py: Make parsing more lax to handle output from older compiler versions 2021-02-02 16:16:14 +01:00
Kamil Śliwak
b06de9a2d5 prepare_report: Add command-line options for switching between SMT pragma stripping and only disabling the SMT checker 2021-02-02 16:16:14 +01:00
Kamil Śliwak
53f9a11440 prepare_report: Handle internal compiler errors in Standard JSON as errors, not missing bytecode 2021-01-26 23:30:38 +01:00
Kamil Śliwak
7f19339934 prepare_report.py: Add support for switching between CLI and Standard JSON compiler interfaces 2021-01-26 23:30:38 +01:00
Kamil Śliwak
151df00bb0 Read/write files in python with newline='' option to preserve newlines as \n on Windows 2021-01-22 12:16:27 +01:00
Kamil Śliwak
ba6acae240 prepare_report.py: Prevent Windows-style paths from ending up in the bytecode report 2021-01-22 12:15:33 +01:00
Kamil Śliwak
6628f19fd8 Modernize prepare_report.py and make it easier to extend
- Add argument parser
- Add type annotations
- Use pathlib
- Split into functions
- Use dataclasses to separate report data from presentation
- Provide more information if the script is interrupted
2021-01-11 17:06:59 +01:00
Kamil Śliwak
887497a406 prepare_report: Make error/missing data placeholders actually look like placeholders 2021-01-11 17:06:59 +01:00
Kamil Śliwak
fe7cc2097b prepare_report: Report missing metadata as well 2021-01-11 17:06:59 +01:00
Kamil Śliwak
9f58f77b50 prepare_report: Unify error/missing data handling between JS and Python versions 2021-01-11 17:06:59 +01:00
Daniel Kirchner
e691b7402a Move standard-json "modelCheckerSettings" key to "settings.modelChecker". 2020-12-09 15:53:32 +01:00
Kamil Śliwak
fc1ade7cf6 Use modelCheckerSettings to disable SMT in bytecode comparison instead of stripping the pragmas 2020-11-20 18:53:15 +01:00
chriseth
421f9f3876 Disable smt checker for bytecodecompare. 2020-05-27 11:12:40 +02:00
Daniel Kirchner
50adb2943a Prevent windows line endings in bytecode report. 2020-02-14 17:03:48 +01:00
Christian Parpart
4b38f499ae pylint: reduces max-line-length to something more reasonable 2020-02-04 17:00:05 +01:00
chriseth
8f36dd1571 Fix extract tests on windows. 2020-01-23 16:36:46 +01:00
cameel
d48883ca17 Fix crashes in prepare_report.py caused by using str where bytes is expected and vice-versa
1) `Popen.communicate()` expects `bytes` (a raw, binary string) if `stdout`/`stderr` are open in binary mode but is given output from `json.loads()` which is str (an abstract unicode string). Encoding the `str` object into `bytes` using UTF-8 encoding fixes that.
2) `REPORT_FILE` gets opened in binary mode which means that functions like `write()` expect `bytes`. We're giving them `str` which results in an error. Changed mode to text solves the problem.
2020-01-20 17:33:44 +01:00
Christian Parpart
54b81b0fda python scripts: Some pylint tweaks. 2020-01-15 14:21:33 +01:00
Christian Parpart
44e892634b Use Python 3 instead of Python 2 (EOL'd) 2020-01-15 14:20:43 +01:00
chriseth
19761a08fa Update bytecode output to cope with metadata-only compilability. 2019-03-04 17:38:45 +01:00
chriseth
314f8beef1 This might fix our windows tests. 2017-06-20 17:47:06 +02:00
chriseth
5c3a80ab5b Also generate optimized code. 2017-03-23 09:56:18 +01:00
chriseth
bbe3557a2f Create bytecode for all tests and push to remote repo. 2017-03-23 09:56:18 +01:00