Skip to content

Commit

Permalink
Merge pull request #132 from joshuata/joshuata/compilation
Browse files Browse the repository at this point in the history
Adds Pipfile and fixes regex compile errors
  • Loading branch information
Bernhard Mueller authored Apr 24, 2018
2 parents 3133fef + 09521c1 commit 02a6121
Show file tree
Hide file tree
Showing 8 changed files with 762 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ jobs:
name: Unit-testing
command: cd /home/mythril && ./all_tests.sh

- store_test_results:
path: /tmp/test-reports

- store_artifacts:
path: /tmp/test-reports

- run:
name: Ensuring that setup script is functional
command: cd /home/mythril && python3 setup.py install
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ build
dist
*.rst
*.lock
!Pipfile.lock
*.svg
laser*
lol*
.idea*
coverage_html_report/
.coverage
.pytest_cache
tests/testdata/outputs_current/
tests/mythril_dir/signatures.json
31 changes: 31 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"

[packages]
requests = "*"
plyvel = "*"
py-solc = "*"
coverage = "*"
BTrees = "*"
ethereum = ">=2.3.0"
zodb = ">=5.3.0"
eth-abi = "*"
"z3-solver" = ">=4.5"
eth-account = "*"
eth-tester = "*"
laser-ethereum = ">=0.5.20"
"jinja2" = "*"
attrs = ">=17.0.0"

[dev-packages]
pylint = "*"
yapf = "*"
pytest = "*"

[requires]
python_version = "3.6"

[pipenv]
allow_prereleases = true
716 changes: 716 additions & 0 deletions Pipfile.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion all_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ echo "Please make sure you are using solc 0.4.21"

rm -rf ./tests/testdata/outputs_current/
mkdir -p ./tests/testdata/outputs_current/
python3 -m unittest discover -p "*_test.py"
mkdir -p /tmp/test-reports
pytest --junitxml=/tmp/test-reports/junit.xml
2 changes: 1 addition & 1 deletion mythril/analysis/modules/dependence_on_predictable_vars.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def execute(statespace):
if "blockhash" in str(constraint):
description = "In the function `" + call.node.function_name + "` "
if "number" in str(constraint):
m = re.search('blockhash\w+(\s\-\s(\d+))*', str(constraint))
m = re.search(r'blockhash\w+(\s-\s(\d+))*', str(constraint))
if m and solve(call):

found = m.group(1)
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ eth-rlp>=0.1.0
eth-tester>=0.1.0b21
coverage
jinja2
attrs
pytest
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,8 @@
'eth-rlp>=0.1.0',
'eth-tester>=0.1.0b21',
'coverage',
'jinja2'
'jinja2',
'attrs'
],

python_requires='>=3.5',
Expand Down

0 comments on commit 02a6121

Please sign in to comment.