Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xs-test
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Patrick Chen
xs-test
Commits
8d530c1b
Commit
8d530c1b
authored
Aug 30, 2018
by
Patrick Chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
exit with failure if one of the script fails
parent
1fbd1b19
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
Tester.h
include/test/Tester.h
+1
-1
Tester.cc
src/test/Tester.cc
+5
-1
xs-test.cc
src/xs-test.cc
+3
-1
No files found.
include/test/Tester.h
View file @
8d530c1b
...
...
@@ -34,7 +34,7 @@ namespace xs { namespace test
explicit
Tester
(
const
boost
::
filesystem
::
path
&
file
);
void
run
()
noexcept
;
bool
run
()
noexcept
;
private
:
std
::
string
onCommand
(
const
std
::
string
&
name
,
const
std
::
string
&
params
)
noexcept
;
...
...
src/test/Tester.cc
View file @
8d530c1b
...
...
@@ -134,7 +134,7 @@ void Tester::onEvent(const std::string& name, const std::string& params) noexcep
receivedEventCount_
[
name
]
++
;
}
void
Tester
::
run
()
noexcept
bool
Tester
::
run
()
noexcept
{
for
(
const
auto
&
expectation
:
config_
.
getExpectations
())
{
resetCounters
();
...
...
@@ -166,7 +166,11 @@ void Tester::run() noexcept
%
boost
::
algorithm
::
join
(
report
.
missedEvents
,
", "
)
<<
std
::
endl
;
}
return
false
;
}
return
true
;
}
}
}
src/xs-test.cc
View file @
8d530c1b
...
...
@@ -32,5 +32,7 @@ int main(int argc, char* argv[]) {
std
::
chrono
::
seconds
(
testDelay
)
);
tester
.
run
();
if
(
!
tester
.
run
())
{
return
EXIT_FAILURE
;
}
}
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