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
cc8ad2c3
Commit
cc8ad2c3
authored
Aug 31, 2020
by
aniket-engg
Committed by
Aniket
Aug 31, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
process test file count
parent
85804ad1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
compiler.ts
libs/remix-tests/src/compiler.ts
+6
-6
run.ts
libs/remix-tests/src/run.ts
+2
-2
No files found.
libs/remix-tests/src/compiler.ts
View file @
cc8ad2c3
...
@@ -103,19 +103,19 @@ export function compileFileOrFiles(filename: string, isDirectory: boolean, opts:
...
@@ -103,19 +103,19 @@ export function compileFileOrFiles(filename: string, isDirectory: boolean, opts:
}
}
}
else
{
}
else
{
// walkSync only if it is a directory
// walkSync only if it is a directory
let
sol
FileCount
=
0
;
let
test
FileCount
=
0
;
fs
.
walkSync
(
filepath
,
(
foundpath
:
string
)
=>
{
fs
.
walkSync
(
filepath
,
(
foundpath
:
string
)
=>
{
// only process .sol files
// only process .sol files
if
(
foundpath
.
split
(
'.'
).
pop
()
===
'sol'
)
{
if
(
foundpath
.
split
(
'.'
).
pop
()
===
'sol'
&&
foundpath
.
endsWith
(
'_test.sol'
)
)
{
sol
FileCount
++
;
test
FileCount
++
;
processFile
(
foundpath
,
sources
,
true
)
processFile
(
foundpath
,
sources
,
true
)
}
}
})
})
if
(
sol
FileCount
>
0
)
{
if
(
test
FileCount
>
0
)
{
log
.
info
(
`
${
solFileCount
}
Solidity files
found`
)
log
.
info
(
`
${
testFileCount
}
Solidity test file
${
testFileCount
===
1
?
''
:
's'
}
found`
)
}
}
else
{
else
{
log
.
error
(
`No Solidity
files found
`
)
log
.
error
(
`No Solidity
test file found. Make sure your test file ends with '_test.sol'
`
)
process
.
exit
()
process
.
exit
()
}
}
}
}
...
...
libs/remix-tests/src/run.ts
View file @
cc8ad2c3
...
@@ -37,10 +37,10 @@ commander.command('help').description('output usage information').action(functio
...
@@ -37,10 +37,10 @@ commander.command('help').description('output usage information').action(functio
commander
commander
.
option
(
'-v, --verbose <level>'
,
'run with verbosity'
,
mapVerbosity
)
.
option
(
'-v, --verbose <level>'
,
'run with verbosity'
,
mapVerbosity
)
.
action
(
async
(
testsPath
)
=>
{
.
action
(
async
(
testsPath
)
=>
{
// Check if path exists
// Check if path exists
if
(
!
fs
.
existsSync
(
testsPath
))
{
if
(
!
fs
.
existsSync
(
testsPath
))
{
console
.
error
(
testsPath
+
' not found'
)
log
.
error
(
testsPath
+
' not found'
)
process
.
exit
(
1
)
process
.
exit
(
1
)
}
}
...
...
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