diff --git a/.circleci/config.yml b/.circleci/config.yml index d23ced2..7e3c233 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -49,7 +49,7 @@ jobs: - run: name: Zeppelin E2E command: | - ./scripts/run-zeppelin.sh + ./scripts/zeppelin.sh e2e-nomiclabs: machine: true steps: @@ -58,7 +58,7 @@ jobs: - run: name: Hardhat E2E command: | - ./scripts/run-nomiclabs.sh + ./scripts/nomiclabs.sh workflows: version: 2 build: diff --git a/package.json b/package.json index bfd0065..1bec788 100644 --- a/package.json +++ b/package.json @@ -10,11 +10,9 @@ "test": "test" }, "scripts": { - "nyc": "SILENT=true nyc --exclude '**/sc_temp/**' --exclude '**/test/**'", - "test": "SILENT=true node --max-old-space-size=4096 ./node_modules/.bin/nyc --exclude '**/sc_temp/**' --exclude '**/test/**/' -- mocha test/units/* --timeout 100000 --no-warnings --exit", - "test:ci": "SILENT=true node --max-old-space-size=4096 ./node_modules/.bin/nyc --reporter=lcov --exclude '**/sc_temp/**' --exclude '**/test/**/' --exclude 'plugins/resources/matrix.js' -- mocha test/units/* --timeout 100000 --no-warnings --exit", - "test:debug": "node --max-old-space-size=4096 ./node_modules/.bin/mocha test/units/* --timeout 100000 --no-warnings --exit", - "netlify": "./scripts/run-netlify.sh" + "test:unit": "./scripts/unit.sh", + "test:integration": "./scripts/integration.sh", + "test:ci": "./scripts/ci.sh" }, "homepage": "https://github.com/sc-forks/solidity-coverage", "repository": { diff --git a/scripts/ci.sh b/scripts/ci.sh new file mode 100755 index 0000000..e5a2c6e --- /dev/null +++ b/scripts/ci.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +SILENT=true node --max-old-space-size=4096 \ + ./node_modules/.bin/nyc \ + --reporter=lcov \ + --exclude '**/sc_temp/**' \ + --exclude '**/test/**/' \ + --exclude 'plugins/resources/matrix.js' \ + -- \ + mocha \ + test/units/* test/integration/* \ + --timeout 100000 \ + --no-warnings \ + --exit \ diff --git a/scripts/integration.sh b/scripts/integration.sh new file mode 100755 index 0000000..c9d080a --- /dev/null +++ b/scripts/integration.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +node --max-old-space-size=4096 \ + ./node_modules/.bin/nyc \ + --exclude '**/sc_temp/**' \ + --exclude '**/test/**/' \ + -- \ + mocha test/integration/* \ + --timeout 100000 \ + --no-warnings \ + --exit diff --git a/scripts/run-nomiclabs.sh b/scripts/nomiclabs.sh similarity index 100% rename from scripts/run-nomiclabs.sh rename to scripts/nomiclabs.sh diff --git a/scripts/run-netlify.sh b/scripts/run-netlify.sh deleted file mode 100755 index 095f3e5..0000000 --- a/scripts/run-netlify.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash -# -# E2E: runs sc-forks/hegic/contracts-v1 coverage and publishes html report in netlify -# for CI deployment preview. This is the netlify "build" step. -# - -set -o errexit - -# Clone target -rm -rf contracts-v1 -git clone https://github.com/sc-forks/contracts-v1.git -cd contracts-v1 - -# Install solidity-coverage @ current commit -yarn -yarn add --dev https://github.com/sc-forks/solidity-coverage.git#$COMMIT_REF - -cat package.json - -npm run coverage diff --git a/scripts/unit.sh b/scripts/unit.sh new file mode 100755 index 0000000..098315c --- /dev/null +++ b/scripts/unit.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +node --max-old-space-size=4096 \ + ./node_modules/.bin/nyc \ + --exclude '**/sc_temp/**' \ + --exclude '**/test/**/' \ + -- \ + mocha test/units/* \ + --timeout 100000 \ + --no-warnings \ + --exit diff --git a/scripts/run-zeppelin.sh b/scripts/zeppelin.sh similarity index 100% rename from scripts/run-zeppelin.sh rename to scripts/zeppelin.sh diff --git a/test/units/hardhat/errors.js b/test/integration/errors.js similarity index 98% rename from test/units/hardhat/errors.js rename to test/integration/errors.js index e9fb47d..f1f4ca7 100644 --- a/test/units/hardhat/errors.js +++ b/test/integration/errors.js @@ -5,8 +5,8 @@ const pify = require('pify') const shell = require('shelljs'); const ganache = require('ganache-cli') -const verify = require('../../util/verifiers') -const mock = require('../../util/integration'); +const verify = require('./../util/verifiers') +const mock = require('./../util/integration'); // ======= // Errors diff --git a/test/units/hardhat/flags.js b/test/integration/flags.js similarity index 98% rename from test/units/hardhat/flags.js rename to test/integration/flags.js index 10e01ad..95f2bed 100644 --- a/test/units/hardhat/flags.js +++ b/test/integration/flags.js @@ -3,8 +3,8 @@ const fs = require('fs'); const path = require('path') const shell = require('shelljs'); -const verify = require('../../util/verifiers') -const mock = require('../../util/integration'); +const verify = require('./../util/verifiers') +const mock = require('./../util/integration'); // ======================= // CLI Options / Flags diff --git a/test/units/hardhat/standard.js b/test/integration/standard.js similarity index 99% rename from test/units/hardhat/standard.js rename to test/integration/standard.js index 2cb13bc..9f700d7 100644 --- a/test/units/hardhat/standard.js +++ b/test/integration/standard.js @@ -3,8 +3,8 @@ const fs = require('fs'); const path = require('path') const shell = require('shelljs'); -const verify = require('../../util/verifiers') -const mock = require('../../util/integration'); +const verify = require('./../util/verifiers') +const mock = require('./../util/integration'); // ======================= // Standard Use-case Tests diff --git a/test/integration/generic/assets/SimpleError.sol b/test/sources/generic/assets/SimpleError.sol similarity index 100% rename from test/integration/generic/assets/SimpleError.sol rename to test/sources/generic/assets/SimpleError.sol diff --git a/test/integration/generic/assets/asset.js b/test/sources/generic/assets/asset.js similarity index 100% rename from test/integration/generic/assets/asset.js rename to test/sources/generic/assets/asset.js diff --git a/test/integration/generic/contracts/.marker b/test/sources/generic/contracts/.marker similarity index 100% rename from test/integration/generic/contracts/.marker rename to test/sources/generic/contracts/.marker diff --git a/test/integration/generic/test/.marker b/test/sources/generic/test/.marker similarity index 100% rename from test/integration/generic/test/.marker rename to test/sources/generic/test/.marker diff --git a/test/integration/projects/bad-solcoverjs/.solcover.js b/test/sources/projects/bad-solcoverjs/.solcover.js similarity index 100% rename from test/integration/projects/bad-solcoverjs/.solcover.js rename to test/sources/projects/bad-solcoverjs/.solcover.js diff --git a/test/integration/projects/bad-solcoverjs/hardhat.config.js b/test/sources/projects/bad-solcoverjs/hardhat.config.js similarity index 100% rename from test/integration/projects/bad-solcoverjs/hardhat.config.js rename to test/sources/projects/bad-solcoverjs/hardhat.config.js diff --git a/test/integration/projects/contract-subfolders/.solcover.js b/test/sources/projects/contract-subfolders/.solcover.js similarity index 100% rename from test/integration/projects/contract-subfolders/.solcover.js rename to test/sources/projects/contract-subfolders/.solcover.js diff --git a/test/integration/projects/contract-subfolders/contracts/A/ContractA2.sol b/test/sources/projects/contract-subfolders/contracts/A/ContractA2.sol similarity index 100% rename from test/integration/projects/contract-subfolders/contracts/A/ContractA2.sol rename to test/sources/projects/contract-subfolders/contracts/A/ContractA2.sol diff --git a/test/integration/projects/contract-subfolders/contracts/B/ContractB2.sol b/test/sources/projects/contract-subfolders/contracts/B/ContractB2.sol similarity index 100% rename from test/integration/projects/contract-subfolders/contracts/B/ContractB2.sol rename to test/sources/projects/contract-subfolders/contracts/B/ContractB2.sol diff --git a/test/integration/projects/contract-subfolders/hardhat.config.js b/test/sources/projects/contract-subfolders/hardhat.config.js similarity index 100% rename from test/integration/projects/contract-subfolders/hardhat.config.js rename to test/sources/projects/contract-subfolders/hardhat.config.js diff --git a/test/integration/projects/contract-subfolders/test/contracta2.js b/test/sources/projects/contract-subfolders/test/contracta2.js similarity index 100% rename from test/integration/projects/contract-subfolders/test/contracta2.js rename to test/sources/projects/contract-subfolders/test/contracta2.js diff --git a/test/integration/projects/ganache-solcoverjs/.gitignore b/test/sources/projects/ganache-solcoverjs/.gitignore similarity index 100% rename from test/integration/projects/ganache-solcoverjs/.gitignore rename to test/sources/projects/ganache-solcoverjs/.gitignore diff --git a/test/integration/projects/ganache-solcoverjs/.solcover.js b/test/sources/projects/ganache-solcoverjs/.solcover.js similarity index 100% rename from test/integration/projects/ganache-solcoverjs/.solcover.js rename to test/sources/projects/ganache-solcoverjs/.solcover.js diff --git a/test/integration/projects/ganache-solcoverjs/contracts/ContractA.sol b/test/sources/projects/ganache-solcoverjs/contracts/ContractA.sol similarity index 100% rename from test/integration/projects/ganache-solcoverjs/contracts/ContractA.sol rename to test/sources/projects/ganache-solcoverjs/contracts/ContractA.sol diff --git a/test/integration/projects/ganache-solcoverjs/contracts/ContractB.sol b/test/sources/projects/ganache-solcoverjs/contracts/ContractB.sol similarity index 100% rename from test/integration/projects/ganache-solcoverjs/contracts/ContractB.sol rename to test/sources/projects/ganache-solcoverjs/contracts/ContractB.sol diff --git a/test/integration/projects/ganache-solcoverjs/contracts/ContractC.sol b/test/sources/projects/ganache-solcoverjs/contracts/ContractC.sol similarity index 100% rename from test/integration/projects/ganache-solcoverjs/contracts/ContractC.sol rename to test/sources/projects/ganache-solcoverjs/contracts/ContractC.sol diff --git a/test/integration/projects/ganache-solcoverjs/contracts/Migrations.sol b/test/sources/projects/ganache-solcoverjs/contracts/Migrations.sol similarity index 100% rename from test/integration/projects/ganache-solcoverjs/contracts/Migrations.sol rename to test/sources/projects/ganache-solcoverjs/contracts/Migrations.sol diff --git a/test/integration/projects/ganache-solcoverjs/hardhat.config.js b/test/sources/projects/ganache-solcoverjs/hardhat.config.js similarity index 100% rename from test/integration/projects/ganache-solcoverjs/hardhat.config.js rename to test/sources/projects/ganache-solcoverjs/hardhat.config.js diff --git a/test/integration/projects/ganache-solcoverjs/test/contracta.js b/test/sources/projects/ganache-solcoverjs/test/contracta.js similarity index 100% rename from test/integration/projects/ganache-solcoverjs/test/contracta.js rename to test/sources/projects/ganache-solcoverjs/test/contracta.js diff --git a/test/integration/projects/ganache-solcoverjs/test/contractb.js b/test/sources/projects/ganache-solcoverjs/test/contractb.js similarity index 100% rename from test/integration/projects/ganache-solcoverjs/test/contractb.js rename to test/sources/projects/ganache-solcoverjs/test/contractb.js diff --git a/test/integration/projects/ganache-solcoverjs/test/contractc.js b/test/sources/projects/ganache-solcoverjs/test/contractc.js similarity index 100% rename from test/integration/projects/ganache-solcoverjs/test/contractc.js rename to test/sources/projects/ganache-solcoverjs/test/contractc.js diff --git a/test/integration/projects/hardhat-compile-config/.solcover.js b/test/sources/projects/hardhat-compile-config/.solcover.js similarity index 100% rename from test/integration/projects/hardhat-compile-config/.solcover.js rename to test/sources/projects/hardhat-compile-config/.solcover.js diff --git a/test/integration/projects/hardhat-compile-config/contracts/ContractA1.sol b/test/sources/projects/hardhat-compile-config/contracts/ContractA1.sol similarity index 100% rename from test/integration/projects/hardhat-compile-config/contracts/ContractA1.sol rename to test/sources/projects/hardhat-compile-config/contracts/ContractA1.sol diff --git a/test/integration/projects/hardhat-compile-config/contracts/ContractB1.sol b/test/sources/projects/hardhat-compile-config/contracts/ContractB1.sol similarity index 100% rename from test/integration/projects/hardhat-compile-config/contracts/ContractB1.sol rename to test/sources/projects/hardhat-compile-config/contracts/ContractB1.sol diff --git a/test/integration/projects/hardhat-compile-config/contracts/ContractC1.sol b/test/sources/projects/hardhat-compile-config/contracts/ContractC1.sol similarity index 100% rename from test/integration/projects/hardhat-compile-config/contracts/ContractC1.sol rename to test/sources/projects/hardhat-compile-config/contracts/ContractC1.sol diff --git a/test/integration/projects/hardhat-compile-config/hardhat.config.js b/test/sources/projects/hardhat-compile-config/hardhat.config.js similarity index 100% rename from test/integration/projects/hardhat-compile-config/hardhat.config.js rename to test/sources/projects/hardhat-compile-config/hardhat.config.js diff --git a/test/integration/projects/hardhat-compile-config/test/contracta1.js b/test/sources/projects/hardhat-compile-config/test/contracta1.js similarity index 100% rename from test/integration/projects/hardhat-compile-config/test/contracta1.js rename to test/sources/projects/hardhat-compile-config/test/contracta1.js diff --git a/test/integration/projects/hardhat-compile-config/test/contractb1.js b/test/sources/projects/hardhat-compile-config/test/contractb1.js similarity index 100% rename from test/integration/projects/hardhat-compile-config/test/contractb1.js rename to test/sources/projects/hardhat-compile-config/test/contractb1.js diff --git a/test/integration/projects/hardhat-compile-config/test/contractc1.js b/test/sources/projects/hardhat-compile-config/test/contractc1.js similarity index 100% rename from test/integration/projects/hardhat-compile-config/test/contractc1.js rename to test/sources/projects/hardhat-compile-config/test/contractc1.js diff --git a/test/integration/projects/hardhat-gas-reporter/contracts/ContractA.sol b/test/sources/projects/hardhat-gas-reporter/contracts/ContractA.sol similarity index 100% rename from test/integration/projects/hardhat-gas-reporter/contracts/ContractA.sol rename to test/sources/projects/hardhat-gas-reporter/contracts/ContractA.sol diff --git a/test/integration/projects/hardhat-gas-reporter/hardhat.config.js b/test/sources/projects/hardhat-gas-reporter/hardhat.config.js similarity index 100% rename from test/integration/projects/hardhat-gas-reporter/hardhat.config.js rename to test/sources/projects/hardhat-gas-reporter/hardhat.config.js diff --git a/test/integration/projects/hardhat-gas-reporter/test/test.js b/test/sources/projects/hardhat-gas-reporter/test/test.js similarity index 100% rename from test/integration/projects/hardhat-gas-reporter/test/test.js rename to test/sources/projects/hardhat-gas-reporter/test/test.js diff --git a/test/integration/projects/hardhat-reset/.solcover.js b/test/sources/projects/hardhat-reset/.solcover.js similarity index 100% rename from test/integration/projects/hardhat-reset/.solcover.js rename to test/sources/projects/hardhat-reset/.solcover.js diff --git a/test/integration/projects/hardhat-reset/contracts/ContractAReset.sol b/test/sources/projects/hardhat-reset/contracts/ContractAReset.sol similarity index 100% rename from test/integration/projects/hardhat-reset/contracts/ContractAReset.sol rename to test/sources/projects/hardhat-reset/contracts/ContractAReset.sol diff --git a/test/integration/projects/hardhat-reset/hardhat.config.js b/test/sources/projects/hardhat-reset/hardhat.config.js similarity index 100% rename from test/integration/projects/hardhat-reset/hardhat.config.js rename to test/sources/projects/hardhat-reset/hardhat.config.js diff --git a/test/integration/projects/hardhat-reset/test/testReset.js b/test/sources/projects/hardhat-reset/test/testReset.js similarity index 100% rename from test/integration/projects/hardhat-reset/test/testReset.js rename to test/sources/projects/hardhat-reset/test/testReset.js diff --git a/test/integration/projects/import-paths/.gitignore b/test/sources/projects/import-paths/.gitignore similarity index 100% rename from test/integration/projects/import-paths/.gitignore rename to test/sources/projects/import-paths/.gitignore diff --git a/test/integration/projects/import-paths/.solcover.js b/test/sources/projects/import-paths/.solcover.js similarity index 100% rename from test/integration/projects/import-paths/.solcover.js rename to test/sources/projects/import-paths/.solcover.js diff --git a/test/integration/projects/import-paths/assets/RelativePathImport.sol b/test/sources/projects/import-paths/assets/RelativePathImport.sol similarity index 100% rename from test/integration/projects/import-paths/assets/RelativePathImport.sol rename to test/sources/projects/import-paths/assets/RelativePathImport.sol diff --git a/test/integration/projects/import-paths/contracts/OnlyUsesImports.sol b/test/sources/projects/import-paths/contracts/OnlyUsesImports.sol similarity index 100% rename from test/integration/projects/import-paths/contracts/OnlyUsesImports.sol rename to test/sources/projects/import-paths/contracts/OnlyUsesImports.sol diff --git a/test/integration/projects/import-paths/contracts/UsesImports.sol b/test/sources/projects/import-paths/contracts/UsesImports.sol similarity index 100% rename from test/integration/projects/import-paths/contracts/UsesImports.sol rename to test/sources/projects/import-paths/contracts/UsesImports.sol diff --git a/test/integration/projects/import-paths/hardhat.config.js b/test/sources/projects/import-paths/hardhat.config.js similarity index 100% rename from test/integration/projects/import-paths/hardhat.config.js rename to test/sources/projects/import-paths/hardhat.config.js diff --git a/test/integration/projects/import-paths/node_modules/package/AnotherImport.sol b/test/sources/projects/import-paths/node_modules/package/AnotherImport.sol similarity index 100% rename from test/integration/projects/import-paths/node_modules/package/AnotherImport.sol rename to test/sources/projects/import-paths/node_modules/package/AnotherImport.sol diff --git a/test/integration/projects/import-paths/node_modules/package/NodeModulesImport.sol b/test/sources/projects/import-paths/node_modules/package/NodeModulesImport.sol similarity index 100% rename from test/integration/projects/import-paths/node_modules/package/NodeModulesImport.sol rename to test/sources/projects/import-paths/node_modules/package/NodeModulesImport.sol diff --git a/test/integration/projects/import-paths/node_modules/package/package.json b/test/sources/projects/import-paths/node_modules/package/package.json similarity index 100% rename from test/integration/projects/import-paths/node_modules/package/package.json rename to test/sources/projects/import-paths/node_modules/package/package.json diff --git a/test/integration/projects/import-paths/test/uses_imports.js b/test/sources/projects/import-paths/test/uses_imports.js similarity index 100% rename from test/integration/projects/import-paths/test/uses_imports.js rename to test/sources/projects/import-paths/test/uses_imports.js diff --git a/test/integration/projects/libraries/contracts/CLibrary.sol b/test/sources/projects/libraries/contracts/CLibrary.sol similarity index 100% rename from test/integration/projects/libraries/contracts/CLibrary.sol rename to test/sources/projects/libraries/contracts/CLibrary.sol diff --git a/test/integration/projects/libraries/contracts/Migrations.sol b/test/sources/projects/libraries/contracts/Migrations.sol similarity index 100% rename from test/integration/projects/libraries/contracts/Migrations.sol rename to test/sources/projects/libraries/contracts/Migrations.sol diff --git a/test/integration/projects/libraries/contracts/PureView.sol b/test/sources/projects/libraries/contracts/PureView.sol similarity index 100% rename from test/integration/projects/libraries/contracts/PureView.sol rename to test/sources/projects/libraries/contracts/PureView.sol diff --git a/test/integration/projects/libraries/contracts/UsesPure.sol b/test/sources/projects/libraries/contracts/UsesPure.sol similarity index 100% rename from test/integration/projects/libraries/contracts/UsesPure.sol rename to test/sources/projects/libraries/contracts/UsesPure.sol diff --git a/test/integration/projects/libraries/contracts/_Interface.sol b/test/sources/projects/libraries/contracts/_Interface.sol similarity index 100% rename from test/integration/projects/libraries/contracts/_Interface.sol rename to test/sources/projects/libraries/contracts/_Interface.sol diff --git a/test/integration/projects/libraries/hardhat.config.js b/test/sources/projects/libraries/hardhat.config.js similarity index 100% rename from test/integration/projects/libraries/hardhat.config.js rename to test/sources/projects/libraries/hardhat.config.js diff --git a/test/integration/projects/libraries/test/libraries.js b/test/sources/projects/libraries/test/libraries.js similarity index 100% rename from test/integration/projects/libraries/test/libraries.js rename to test/sources/projects/libraries/test/libraries.js diff --git a/test/integration/projects/matrix/.solcover.js b/test/sources/projects/matrix/.solcover.js similarity index 100% rename from test/integration/projects/matrix/.solcover.js rename to test/sources/projects/matrix/.solcover.js diff --git a/test/integration/projects/matrix/contracts/MatrixA.sol b/test/sources/projects/matrix/contracts/MatrixA.sol similarity index 100% rename from test/integration/projects/matrix/contracts/MatrixA.sol rename to test/sources/projects/matrix/contracts/MatrixA.sol diff --git a/test/integration/projects/matrix/contracts/MatrixB.sol b/test/sources/projects/matrix/contracts/MatrixB.sol similarity index 100% rename from test/integration/projects/matrix/contracts/MatrixB.sol rename to test/sources/projects/matrix/contracts/MatrixB.sol diff --git a/test/integration/projects/matrix/expectedMochaOutput.json b/test/sources/projects/matrix/expectedMochaOutput.json similarity index 100% rename from test/integration/projects/matrix/expectedMochaOutput.json rename to test/sources/projects/matrix/expectedMochaOutput.json diff --git a/test/integration/projects/matrix/expectedTestMatrixHardhat.json b/test/sources/projects/matrix/expectedTestMatrixHardhat.json similarity index 100% rename from test/integration/projects/matrix/expectedTestMatrixHardhat.json rename to test/sources/projects/matrix/expectedTestMatrixHardhat.json diff --git a/test/integration/projects/matrix/expectedTestMatrixTruffle.json b/test/sources/projects/matrix/expectedTestMatrixTruffle.json similarity index 100% rename from test/integration/projects/matrix/expectedTestMatrixTruffle.json rename to test/sources/projects/matrix/expectedTestMatrixTruffle.json diff --git a/test/integration/projects/matrix/hardhat.config.js b/test/sources/projects/matrix/hardhat.config.js similarity index 100% rename from test/integration/projects/matrix/hardhat.config.js rename to test/sources/projects/matrix/hardhat.config.js diff --git a/test/integration/projects/matrix/test/matrix_a.js b/test/sources/projects/matrix/test/matrix_a.js similarity index 100% rename from test/integration/projects/matrix/test/matrix_a.js rename to test/sources/projects/matrix/test/matrix_a.js diff --git a/test/integration/projects/matrix/test/matrix_a_b.js b/test/sources/projects/matrix/test/matrix_a_b.js similarity index 100% rename from test/integration/projects/matrix/test/matrix_a_b.js rename to test/sources/projects/matrix/test/matrix_a_b.js diff --git a/test/integration/projects/matrix/truffle-config.js b/test/sources/projects/matrix/truffle-config.js similarity index 100% rename from test/integration/projects/matrix/truffle-config.js rename to test/sources/projects/matrix/truffle-config.js diff --git a/test/integration/projects/modifiers/.solcover.js b/test/sources/projects/modifiers/.solcover.js similarity index 100% rename from test/integration/projects/modifiers/.solcover.js rename to test/sources/projects/modifiers/.solcover.js diff --git a/test/integration/projects/modifiers/contracts/ModifiersA.sol b/test/sources/projects/modifiers/contracts/ModifiersA.sol similarity index 100% rename from test/integration/projects/modifiers/contracts/ModifiersA.sol rename to test/sources/projects/modifiers/contracts/ModifiersA.sol diff --git a/test/integration/projects/modifiers/contracts/ModifiersB.sol b/test/sources/projects/modifiers/contracts/ModifiersB.sol similarity index 100% rename from test/integration/projects/modifiers/contracts/ModifiersB.sol rename to test/sources/projects/modifiers/contracts/ModifiersB.sol diff --git a/test/integration/projects/modifiers/contracts/ModifiersC.sol b/test/sources/projects/modifiers/contracts/ModifiersC.sol similarity index 100% rename from test/integration/projects/modifiers/contracts/ModifiersC.sol rename to test/sources/projects/modifiers/contracts/ModifiersC.sol diff --git a/test/integration/projects/modifiers/hardhat.config.js b/test/sources/projects/modifiers/hardhat.config.js similarity index 100% rename from test/integration/projects/modifiers/hardhat.config.js rename to test/sources/projects/modifiers/hardhat.config.js diff --git a/test/integration/projects/modifiers/test/modifiers.js b/test/sources/projects/modifiers/test/modifiers.js similarity index 100% rename from test/integration/projects/modifiers/test/modifiers.js rename to test/sources/projects/modifiers/test/modifiers.js diff --git a/test/integration/projects/modifiers/truffle-config.js b/test/sources/projects/modifiers/truffle-config.js similarity index 100% rename from test/integration/projects/modifiers/truffle-config.js rename to test/sources/projects/modifiers/truffle-config.js diff --git a/test/integration/projects/multiple-suites/.solcover.js b/test/sources/projects/multiple-suites/.solcover.js similarity index 100% rename from test/integration/projects/multiple-suites/.solcover.js rename to test/sources/projects/multiple-suites/.solcover.js diff --git a/test/integration/projects/multiple-suites/contracts/ContractA.sol b/test/sources/projects/multiple-suites/contracts/ContractA.sol similarity index 100% rename from test/integration/projects/multiple-suites/contracts/ContractA.sol rename to test/sources/projects/multiple-suites/contracts/ContractA.sol diff --git a/test/integration/projects/multiple-suites/contracts/ContractB.sol b/test/sources/projects/multiple-suites/contracts/ContractB.sol similarity index 100% rename from test/integration/projects/multiple-suites/contracts/ContractB.sol rename to test/sources/projects/multiple-suites/contracts/ContractB.sol diff --git a/test/integration/projects/multiple-suites/contracts/ContractC.sol b/test/sources/projects/multiple-suites/contracts/ContractC.sol similarity index 100% rename from test/integration/projects/multiple-suites/contracts/ContractC.sol rename to test/sources/projects/multiple-suites/contracts/ContractC.sol diff --git a/test/integration/projects/multiple-suites/hardhat.config.js b/test/sources/projects/multiple-suites/hardhat.config.js similarity index 100% rename from test/integration/projects/multiple-suites/hardhat.config.js rename to test/sources/projects/multiple-suites/hardhat.config.js diff --git a/test/integration/projects/multiple-suites/test/contracta.js b/test/sources/projects/multiple-suites/test/contracta.js similarity index 100% rename from test/integration/projects/multiple-suites/test/contracta.js rename to test/sources/projects/multiple-suites/test/contracta.js diff --git a/test/integration/projects/multiple-suites/test/contractb.js b/test/sources/projects/multiple-suites/test/contractb.js similarity index 100% rename from test/integration/projects/multiple-suites/test/contractb.js rename to test/sources/projects/multiple-suites/test/contractb.js diff --git a/test/integration/projects/multiple-suites/test/contractc.js b/test/sources/projects/multiple-suites/test/contractc.js similarity index 100% rename from test/integration/projects/multiple-suites/test/contractc.js rename to test/sources/projects/multiple-suites/test/contractc.js diff --git a/test/integration/projects/no-sources/hardhat.config.js b/test/sources/projects/no-sources/hardhat.config.js similarity index 100% rename from test/integration/projects/no-sources/hardhat.config.js rename to test/sources/projects/no-sources/hardhat.config.js diff --git a/test/integration/projects/parallel/.solcover.js b/test/sources/projects/parallel/.solcover.js similarity index 100% rename from test/integration/projects/parallel/.solcover.js rename to test/sources/projects/parallel/.solcover.js diff --git a/test/integration/projects/parallel/contracts/ContractA.sol b/test/sources/projects/parallel/contracts/ContractA.sol similarity index 100% rename from test/integration/projects/parallel/contracts/ContractA.sol rename to test/sources/projects/parallel/contracts/ContractA.sol diff --git a/test/integration/projects/parallel/hardhat.config.js b/test/sources/projects/parallel/hardhat.config.js similarity index 100% rename from test/integration/projects/parallel/hardhat.config.js rename to test/sources/projects/parallel/hardhat.config.js diff --git a/test/integration/projects/skipping/.solcover.js b/test/sources/projects/skipping/.solcover.js similarity index 100% rename from test/integration/projects/skipping/.solcover.js rename to test/sources/projects/skipping/.solcover.js diff --git a/test/integration/projects/skipping/contracts/ContractA.sol b/test/sources/projects/skipping/contracts/ContractA.sol similarity index 100% rename from test/integration/projects/skipping/contracts/ContractA.sol rename to test/sources/projects/skipping/contracts/ContractA.sol diff --git a/test/integration/projects/skipping/contracts/skipped-folder/ContractB.sol b/test/sources/projects/skipping/contracts/skipped-folder/ContractB.sol similarity index 100% rename from test/integration/projects/skipping/contracts/skipped-folder/ContractB.sol rename to test/sources/projects/skipping/contracts/skipped-folder/ContractB.sol diff --git a/test/integration/projects/skipping/hardhat.config.js b/test/sources/projects/skipping/hardhat.config.js similarity index 100% rename from test/integration/projects/skipping/hardhat.config.js rename to test/sources/projects/skipping/hardhat.config.js diff --git a/test/integration/projects/skipping/test/contract.js b/test/sources/projects/skipping/test/contract.js similarity index 100% rename from test/integration/projects/skipping/test/contract.js rename to test/sources/projects/skipping/test/contract.js diff --git a/test/integration/projects/solc-8/.solcover.js b/test/sources/projects/solc-8/.solcover.js similarity index 100% rename from test/integration/projects/solc-8/.solcover.js rename to test/sources/projects/solc-8/.solcover.js diff --git a/test/integration/projects/solc-8/contracts/Abstract_solc8.sol b/test/sources/projects/solc-8/contracts/Abstract_solc8.sol similarity index 100% rename from test/integration/projects/solc-8/contracts/Abstract_solc8.sol rename to test/sources/projects/solc-8/contracts/Abstract_solc8.sol diff --git a/test/integration/projects/solc-8/contracts/Contract_solc8.sol b/test/sources/projects/solc-8/contracts/Contract_solc8.sol similarity index 100% rename from test/integration/projects/solc-8/contracts/Contract_solc8.sol rename to test/sources/projects/solc-8/contracts/Contract_solc8.sol diff --git a/test/integration/projects/solc-8/contracts/Library_solc8.sol b/test/sources/projects/solc-8/contracts/Library_solc8.sol similarity index 100% rename from test/integration/projects/solc-8/contracts/Library_solc8.sol rename to test/sources/projects/solc-8/contracts/Library_solc8.sol diff --git a/test/integration/projects/solc-8/hardhat.config.js b/test/sources/projects/solc-8/hardhat.config.js similarity index 100% rename from test/integration/projects/solc-8/hardhat.config.js rename to test/sources/projects/solc-8/hardhat.config.js diff --git a/test/integration/projects/solc-8/test/test_solc8.js b/test/sources/projects/solc-8/test/test_solc8.js similarity index 100% rename from test/integration/projects/solc-8/test/test_solc8.js rename to test/sources/projects/solc-8/test/test_solc8.js diff --git a/test/integration/projects/ternary-and-logical-or/.solcover.js b/test/sources/projects/ternary-and-logical-or/.solcover.js similarity index 100% rename from test/integration/projects/ternary-and-logical-or/.solcover.js rename to test/sources/projects/ternary-and-logical-or/.solcover.js diff --git a/test/integration/projects/ternary-and-logical-or/contracts/Contract_OR.sol b/test/sources/projects/ternary-and-logical-or/contracts/Contract_OR.sol similarity index 100% rename from test/integration/projects/ternary-and-logical-or/contracts/Contract_OR.sol rename to test/sources/projects/ternary-and-logical-or/contracts/Contract_OR.sol diff --git a/test/integration/projects/ternary-and-logical-or/contracts/Contract_ternary.sol b/test/sources/projects/ternary-and-logical-or/contracts/Contract_ternary.sol similarity index 100% rename from test/integration/projects/ternary-and-logical-or/contracts/Contract_ternary.sol rename to test/sources/projects/ternary-and-logical-or/contracts/Contract_ternary.sol diff --git a/test/integration/projects/ternary-and-logical-or/hardhat.config.js b/test/sources/projects/ternary-and-logical-or/hardhat.config.js similarity index 100% rename from test/integration/projects/ternary-and-logical-or/hardhat.config.js rename to test/sources/projects/ternary-and-logical-or/hardhat.config.js diff --git a/test/integration/projects/ternary-and-logical-or/test/test_or.js b/test/sources/projects/ternary-and-logical-or/test/test_or.js similarity index 100% rename from test/integration/projects/ternary-and-logical-or/test/test_or.js rename to test/sources/projects/ternary-and-logical-or/test/test_or.js diff --git a/test/integration/projects/ternary-and-logical-or/test/test_ternary.js b/test/sources/projects/ternary-and-logical-or/test/test_ternary.js similarity index 100% rename from test/integration/projects/ternary-and-logical-or/test/test_ternary.js rename to test/sources/projects/ternary-and-logical-or/test/test_ternary.js diff --git a/test/integration/projects/test-files/.solcover.js b/test/sources/projects/test-files/.solcover.js similarity index 100% rename from test/integration/projects/test-files/.solcover.js rename to test/sources/projects/test-files/.solcover.js diff --git a/test/integration/projects/test-files/contracts/ContractA.sol b/test/sources/projects/test-files/contracts/ContractA.sol similarity index 100% rename from test/integration/projects/test-files/contracts/ContractA.sol rename to test/sources/projects/test-files/contracts/ContractA.sol diff --git a/test/integration/projects/test-files/contracts/ContractB.sol b/test/sources/projects/test-files/contracts/ContractB.sol similarity index 100% rename from test/integration/projects/test-files/contracts/ContractB.sol rename to test/sources/projects/test-files/contracts/ContractB.sol diff --git a/test/integration/projects/test-files/contracts/ContractC.sol b/test/sources/projects/test-files/contracts/ContractC.sol similarity index 100% rename from test/integration/projects/test-files/contracts/ContractC.sol rename to test/sources/projects/test-files/contracts/ContractC.sol diff --git a/test/integration/projects/test-files/contracts/Migrations.sol b/test/sources/projects/test-files/contracts/Migrations.sol similarity index 100% rename from test/integration/projects/test-files/contracts/Migrations.sol rename to test/sources/projects/test-files/contracts/Migrations.sol diff --git a/test/integration/projects/test-files/contracts/otherContracts/OtherContractA.sol b/test/sources/projects/test-files/contracts/otherContracts/OtherContractA.sol similarity index 100% rename from test/integration/projects/test-files/contracts/otherContracts/OtherContractA.sol rename to test/sources/projects/test-files/contracts/otherContracts/OtherContractA.sol diff --git a/test/integration/projects/test-files/hardhat.config.js b/test/sources/projects/test-files/hardhat.config.js similarity index 100% rename from test/integration/projects/test-files/hardhat.config.js rename to test/sources/projects/test-files/hardhat.config.js diff --git a/test/integration/projects/test-files/test/globby_b.js b/test/sources/projects/test-files/test/globby_b.js similarity index 100% rename from test/integration/projects/test-files/test/globby_b.js rename to test/sources/projects/test-files/test/globby_b.js diff --git a/test/integration/projects/test-files/test/globby_c.js b/test/sources/projects/test-files/test/globby_c.js similarity index 100% rename from test/integration/projects/test-files/test/globby_c.js rename to test/sources/projects/test-files/test/globby_c.js diff --git a/test/integration/projects/test-files/test/other_contract_a.js b/test/sources/projects/test-files/test/other_contract_a.js similarity index 100% rename from test/integration/projects/test-files/test/other_contract_a.js rename to test/sources/projects/test-files/test/other_contract_a.js diff --git a/test/integration/projects/test-files/test/specific_a.js b/test/sources/projects/test-files/test/specific_a.js similarity index 100% rename from test/integration/projects/test-files/test/specific_a.js rename to test/sources/projects/test-files/test/specific_a.js diff --git a/test/integration/projects/tests-folder/.solcover.js b/test/sources/projects/tests-folder/.solcover.js similarity index 100% rename from test/integration/projects/tests-folder/.solcover.js rename to test/sources/projects/tests-folder/.solcover.js diff --git a/test/integration/projects/tests-folder/contracts/ContractA.sol b/test/sources/projects/tests-folder/contracts/ContractA.sol similarity index 100% rename from test/integration/projects/tests-folder/contracts/ContractA.sol rename to test/sources/projects/tests-folder/contracts/ContractA.sol diff --git a/test/integration/projects/tests-folder/contracts/ContractB.sol b/test/sources/projects/tests-folder/contracts/ContractB.sol similarity index 100% rename from test/integration/projects/tests-folder/contracts/ContractB.sol rename to test/sources/projects/tests-folder/contracts/ContractB.sol diff --git a/test/integration/projects/tests-folder/contracts/ContractC.sol b/test/sources/projects/tests-folder/contracts/ContractC.sol similarity index 100% rename from test/integration/projects/tests-folder/contracts/ContractC.sol rename to test/sources/projects/tests-folder/contracts/ContractC.sol diff --git a/test/integration/projects/tests-folder/hardhat.config.js b/test/sources/projects/tests-folder/hardhat.config.js similarity index 100% rename from test/integration/projects/tests-folder/hardhat.config.js rename to test/sources/projects/tests-folder/hardhat.config.js diff --git a/test/integration/projects/tests-folder/test/contracta.js b/test/sources/projects/tests-folder/test/contracta.js similarity index 100% rename from test/integration/projects/tests-folder/test/contracta.js rename to test/sources/projects/tests-folder/test/contracta.js diff --git a/test/integration/projects/tests-folder/test/folder/contractb.js b/test/sources/projects/tests-folder/test/folder/contractb.js similarity index 100% rename from test/integration/projects/tests-folder/test/folder/contractb.js rename to test/sources/projects/tests-folder/test/folder/contractb.js diff --git a/test/integration/projects/tests-folder/test/folder/contractc.js b/test/sources/projects/tests-folder/test/folder/contractc.js similarity index 100% rename from test/integration/projects/tests-folder/test/folder/contractc.js rename to test/sources/projects/tests-folder/test/folder/contractc.js diff --git a/test/util/integration.js b/test/util/integration.js index 68d9680..4d749a8 100644 --- a/test/util/integration.js +++ b/test/util/integration.js @@ -17,8 +17,8 @@ const hardhatConfigName = 'hardhat.config.js'; const configPath = `${temp}/.solcover.js`; const testPath = './test/sources/js/'; const sourcesPath = './test/sources/solidity/contracts/app/'; -const templatePath = './test/integration/generic/*'; -const projectPath = './test/integration/projects/' +const templatePath = './test/sources/generic/*'; +const projectPath = './test/sources/projects/' let previousCWD;