Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
c84029a0
Commit
c84029a0
authored
Nov 15, 2019
by
aniket-engg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sequence of tests from IDE
parent
0b77de3c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
compiler.ts
remix-tests/src/compiler.ts
+1
-1
runTestSources.ts
remix-tests/src/runTestSources.ts
+8
-3
No files found.
remix-tests/src/compiler.ts
View file @
c84029a0
...
@@ -172,6 +172,6 @@ export function compileContractSources(sources: SrcIfc, versionUrl: any, usingWo
...
@@ -172,6 +172,6 @@ export function compileContractSources(sources: SrcIfc, versionUrl: any, usingWo
if
(
!
isBrowser
)
require
(
'signale'
).
fatal
(
errors
)
if
(
!
isBrowser
)
require
(
'signale'
).
fatal
(
errors
)
return
cb
(
errors
)
return
cb
(
errors
)
}
}
cb
(
err
,
result
.
contracts
)
cb
(
err
,
result
.
contracts
,
result
.
sources
)
})
})
}
}
remix-tests/src/runTestSources.ts
View file @
c84029a0
...
@@ -20,6 +20,7 @@ const createWeb3Provider = async function () {
...
@@ -20,6 +20,7 @@ const createWeb3Provider = async function () {
export
async
function
runTestSources
(
contractSources
,
versionUrl
,
usingWorker
,
testCallback
,
resultCallback
,
finalCallback
,
importFileCb
,
opts
)
{
export
async
function
runTestSources
(
contractSources
,
versionUrl
,
usingWorker
,
testCallback
,
resultCallback
,
finalCallback
,
importFileCb
,
opts
)
{
opts
=
opts
||
{}
opts
=
opts
||
{}
let
sourceASTs
:
any
=
{}
let
web3
=
opts
.
web3
||
await
createWeb3Provider
()
let
web3
=
opts
.
web3
||
await
createWeb3Provider
()
let
accounts
=
opts
.
accounts
||
null
let
accounts
=
opts
.
accounts
||
null
async
.
waterfall
([
async
.
waterfall
([
...
@@ -33,7 +34,12 @@ export async function runTestSources(contractSources, versionUrl, usingWorker, t
...
@@ -33,7 +34,12 @@ export async function runTestSources(contractSources, versionUrl, usingWorker, t
function
compile
(
next
)
{
function
compile
(
next
)
{
compileContractSources
(
contractSources
,
versionUrl
,
usingWorker
,
importFileCb
,
{
accounts
},
next
)
compileContractSources
(
contractSources
,
versionUrl
,
usingWorker
,
importFileCb
,
{
accounts
},
next
)
},
},
function
deployAllContracts
(
compilationResult
,
next
)
{
function
deployAllContracts
(
compilationResult
,
asts
,
next
)
{
for
(
const
filename
in
asts
)
{
if
(
filename
.
includes
(
'_test.sol'
))
sourceASTs
[
filename
]
=
asts
[
filename
].
ast
}
deployAll
(
compilationResult
,
web3
,
(
err
,
contracts
)
=>
{
deployAll
(
compilationResult
,
web3
,
(
err
,
contracts
)
=>
{
if
(
err
)
{
if
(
err
)
{
next
(
err
)
next
(
err
)
...
@@ -79,8 +85,7 @@ export async function runTestSources(contractSources, versionUrl, usingWorker, t
...
@@ -79,8 +85,7 @@ export async function runTestSources(contractSources, versionUrl, usingWorker, t
}
}
async
.
eachOfLimit
(
contractsToTest
,
1
,
(
contractName
:
string
,
index
:
string
|
number
,
cb
:
ErrorCallback
)
=>
{
async
.
eachOfLimit
(
contractsToTest
,
1
,
(
contractName
:
string
,
index
:
string
|
number
,
cb
:
ErrorCallback
)
=>
{
// todo: pass AST
runTest
(
contractName
,
contracts
[
contractName
],
contractsToTestDetails
[
index
],
sourceASTs
[
contracts
[
contractName
][
'filename'
]],
{
accounts
},
_testCallback
,
(
err
,
result
)
=>
{
runTest
(
contractName
,
contracts
[
contractName
],
contractsToTestDetails
[
index
],
[],
{
accounts
},
_testCallback
,
(
err
,
result
)
=>
{
if
(
err
)
{
if
(
err
)
{
return
cb
(
err
)
return
cb
(
err
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment