From 346b759c9bc0254b24fc27ed79caddbd77aa859e Mon Sep 17 00:00:00 2001 From: Josselin Date: Sun, 28 Mar 2021 11:46:26 +0200 Subject: [PATCH 1/2] Add slither-flat to the CI --- .github/workflows/ci.yml | 23 ++++++++++++----------- examples/flat/a.sol | 3 +++ examples/flat/b.sol | 5 +++++ scripts/ci_test_flat.sh | 14 ++++++++++++++ 4 files changed, 34 insertions(+), 11 deletions(-) create mode 100644 examples/flat/a.sol create mode 100644 examples/flat/b.sol create mode 100755 scripts/ci_test_flat.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 65f49b685..1643eb161 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,18 +21,19 @@ jobs: strategy: matrix: type: ["cli", - "data_dependency", - "embark", - "erc", - "etherlime", - "find_paths", - "kspec", - "printers", - "simil", - "slither_config", - "truffle", + "data_dependency", + "embark", + "erc", + "etherlime", + "find_paths", + "kspec", + "printers", + "simil", + "slither_config", + "truffle", "upgradability", - "prop"] + "prop", + "flat"] steps: - uses: actions/checkout@v1 - name: Set up Python 3.6 diff --git a/examples/flat/a.sol b/examples/flat/a.sol new file mode 100644 index 000000000..d252e04ba --- /dev/null +++ b/examples/flat/a.sol @@ -0,0 +1,3 @@ +contract A{ + +} diff --git a/examples/flat/b.sol b/examples/flat/b.sol new file mode 100644 index 000000000..74b4d78ce --- /dev/null +++ b/examples/flat/b.sol @@ -0,0 +1,5 @@ +import "./a.sol"; + +contract B is A{ + +} diff --git a/scripts/ci_test_flat.sh b/scripts/ci_test_flat.sh new file mode 100755 index 000000000..cdc40ddbe --- /dev/null +++ b/scripts/ci_test_flat.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +### Test slither-prop + +cd examples/flat || exit 1 +slither-flat b.sol + +if [ $? -eq 0 ] +then + exit 0 +fi + +echo "slither-flat failed" +exit -1 From b89e290e04fe363cc5b3eef6626417146b6fb7fe Mon Sep 17 00:00:00 2001 From: Josselin Date: Sun, 28 Mar 2021 12:23:13 +0200 Subject: [PATCH 2/2] minor --- scripts/ci_test_flat.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/scripts/ci_test_flat.sh b/scripts/ci_test_flat.sh index cdc40ddbe..e3a837a03 100755 --- a/scripts/ci_test_flat.sh +++ b/scripts/ci_test_flat.sh @@ -3,12 +3,10 @@ ### Test slither-prop cd examples/flat || exit 1 -slither-flat b.sol -if [ $? -eq 0 ] -then - exit 0 +if ! slither-flat b.sol; then + echo "slither-flat failed" + exit 1 fi -echo "slither-flat failed" -exit -1 +exit 0