File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -71,15 +71,23 @@ function setup_solc
71
71
local binary_path=" $3 "
72
72
local solcjs_branch=" ${4:- master} "
73
73
local install_dir=" ${5:- solc/ } "
74
+ local solcjs_dir=" $6 "
74
75
75
76
[[ $binary_type == native || $binary_type == solcjs ]] || assertFail
77
+ [[ $binary_type == solcjs || $solcjs_dir == " " ]] || assertFail
76
78
77
79
cd " $test_dir "
78
80
79
81
if [[ $binary_type == solcjs ]]
80
82
then
81
83
printLog " Setting up solc-js..."
82
- git clone --depth 1 -b " $solcjs_branch " https://github.com/ethereum/solc-js.git " $install_dir "
84
+ if [[ $solcjs_dir == " " ]]; then
85
+ printLog " Cloning branch ${solcjs_branch} ..."
86
+ git clone --depth 1 -b " $solcjs_branch " https://github.com/ethereum/solc-js.git " $install_dir "
87
+ else
88
+ printLog " Using local solc-js from ${solcjs_dir} ..."
89
+ cp -ra " $solcjs_dir " solc
90
+ fi
83
91
84
92
pushd " $install_dir "
85
93
npm install
Original file line number Diff line number Diff line change @@ -26,16 +26,17 @@ source test/externalTests/common.sh
26
26
27
27
SOLJSON=" $1 "
28
28
VERSION=" $2 "
29
+ SOLCJS_CHECKOUT=" $3 " # optional
29
30
30
- [[ $SOLJSON != " " && -f " $SOLJSON " && $VERSION != " " ]] || fail " Usage: $0 <path to soljson.js> <version>"
31
+ [[ $SOLJSON != " " && -f " $SOLJSON " && $VERSION != " " ]] || fail " Usage: $0 <path to soljson.js> <version> [<path to solc-js>] "
31
32
32
33
function solcjs_test
33
34
{
34
35
TEST_DIR=$( pwd)
35
36
SOLCJS_INPUT_DIR=" $TEST_DIR " /test/externalTests/solc-js
36
37
37
38
# set up solc-js on the branch specified
38
- setup_solc " $DIR " solcjs " $SOLJSON " master solc/
39
+ setup_solc " $DIR " solcjs " $SOLJSON " master solc/ " $SOLCJS_CHECKOUT "
39
40
cd solc/
40
41
41
42
printLog " Updating index.js file..."
You can’t perform that action at this time.
0 commit comments