Skip to content

Commit b925250

Browse files
committed
Make solc-js.sh run its tests directly
- Its structure has diverged a lot from other external tests and there's not point in keeping it abstracted like this.
1 parent afc3d72 commit b925250

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

test/externalTests/common.sh

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -323,20 +323,6 @@ function hardhat_clean
323323
rm -rf artifacts/ cache/
324324
}
325325

326-
function run_test
327-
{
328-
local compile_fn="$1"
329-
local test_fn="$2"
330-
331-
replace_version_pragmas
332-
333-
printLog "Running compile function..."
334-
time $compile_fn
335-
336-
printLog "Running test function..."
337-
$test_fn
338-
}
339-
340326
function settings_from_preset
341327
{
342328
local preset="$1"

test/externalTests/solc-js/solc-js.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ VERSION="$2"
2929

3030
[[ $SOLJSON != "" && -f "$SOLJSON" && $VERSION != "" ]] || fail "Usage: $0 <path to soljson.js> <version>"
3131

32-
function compile_fn { echo "Nothing to compile."; }
33-
function test_fn { npm test; }
34-
3532
function solcjs_test
3633
{
3734
TEST_DIR=$(pwd)
@@ -60,7 +57,10 @@ function solcjs_test
6057
echo "Updating package.json to version $VERSION"
6158
npm version --allow-same-version --no-git-tag-version "$VERSION"
6259

63-
run_test compile_fn test_fn
60+
replace_version_pragmas
61+
62+
printLog "Running test function..."
63+
npm test
6464
}
6565

6666
external_test solc-js solcjs_test

0 commit comments

Comments
 (0)