Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ApplicationCore
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ChimeraTK Mirror
ApplicationCore
Commits
91edf41d
Commit
91edf41d
authored
3 years ago
by
Martin Killenberg
Browse files
Options
Downloads
Patches
Plain Diff
finished tests in circle resolving.
parent
df156ab4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/executables_src/testCircularDependencyFaultyFlags.cc
+92
-0
92 additions, 0 deletions
tests/executables_src/testCircularDependencyFaultyFlags.cc
with
92 additions
and
0 deletions
tests/executables_src/testCircularDependencyFaultyFlags.cc
+
92
−
0
View file @
91edf41d
...
...
@@ -231,10 +231,19 @@ BOOST_FIXTURE_TEST_CASE(OneInvalidVariable, CircularAppTestFixcture<TestApplicat
a
.
write
();
C_trigger
.
write
();
test
.
stepApplication
();
readAllLatest
();
checkAllDataValidity
(
ctk
::
DataValidity
::
faulty
);
// getting a valid variable in the same module does not resolve the flag
b
.
write
();
C_trigger
.
write
();
test
.
stepApplication
();
readAllLatest
();
checkAllDataValidity
(
ctk
::
DataValidity
::
faulty
);
// now resolve the faulty condition
a
.
setDataValidity
(
ctk
::
DataValidity
::
ok
);
a
.
write
();
test
.
stepApplication
();
...
...
@@ -262,3 +271,86 @@ BOOST_FIXTURE_TEST_CASE(OneInvalidVariable, CircularAppTestFixcture<TestApplicat
checkAllDataValidity
(
ctk
::
DataValidity
::
ok
);
}
BOOST_FIXTURE_TEST_CASE
(
TwoFaultyInOneModule
,
CircularAppTestFixcture
<
TestApplication1
>
)
{
a
.
setDataValidity
(
ctk
::
DataValidity
::
faulty
);
a
.
write
();
C_trigger
.
write
();
test
.
stepApplication
();
// new in this test: an additional variable comes in while the internal and other external inputs are invalid
b
.
setDataValidity
(
ctk
::
DataValidity
::
faulty
);
b
.
write
();
C_trigger
.
write
();
test
.
stepApplication
();
// just a cross check
readAllLatest
();
checkAllDataValidity
(
ctk
::
DataValidity
::
faulty
);
a
.
setDataValidity
(
ctk
::
DataValidity
::
ok
);
a
.
write
();
C_trigger
.
write
();
test
.
stepApplication
();
// everything still faulty as b is faulty
readAllLatest
();
checkAllDataValidity
(
ctk
::
DataValidity
::
faulty
);
b
.
setDataValidity
(
ctk
::
DataValidity
::
ok
);
b
.
write
();
C_trigger
.
write
();
test
.
stepApplication
();
readAllLatest
();
checkAllDataValidity
(
ctk
::
DataValidity
::
ok
);
}
BOOST_FIXTURE_TEST_CASE
(
TwoFaultyInTwoModules
,
CircularAppTestFixcture
<
TestApplication1
>
)
{
a
.
setDataValidity
(
ctk
::
DataValidity
::
faulty
);
a
.
write
();
C_trigger
.
write
();
test
.
stepApplication
();
// new in this test: the trigger in C bring an additional invalidity flag.
a
.
write
();
C_trigger
.
setDataValidity
(
ctk
::
DataValidity
::
faulty
);
C_trigger
.
write
();
test
.
stepApplication
();
// just a cross check
readAllLatest
();
checkAllDataValidity
(
ctk
::
DataValidity
::
faulty
);
a
.
setDataValidity
(
ctk
::
DataValidity
::
ok
);
a
.
write
();
C_trigger
.
write
();
test
.
stepApplication
();
// everything still faulty as b is faulty
readAllLatest
();
checkAllDataValidity
(
ctk
::
DataValidity
::
faulty
);
a
.
write
();
C_trigger
.
setDataValidity
(
ctk
::
DataValidity
::
ok
);
C_trigger
.
write
();
test
.
stepApplication
();
readAllLatest
();
// the first half of the circle is not OK yet because no external triggers have arrived at A since
// the faultly condition was resolved
BOOST_CHECK
(
A_out1
.
dataValidity
()
==
ctk
::
DataValidity
::
faulty
);
BOOST_CHECK
(
B_out1
.
dataValidity
()
==
ctk
::
DataValidity
::
faulty
);
BOOST_CHECK
(
B_in2
.
dataValidity
()
==
ctk
::
DataValidity
::
faulty
);
BOOST_CHECK
(
C_in2
.
dataValidity
()
==
ctk
::
DataValidity
::
faulty
);
// the outputs of C, D and the circularResult have not been written yet
BOOST_CHECK
(
C_out1
.
dataValidity
()
==
ctk
::
DataValidity
::
ok
);
BOOST_CHECK
(
D_out1
.
dataValidity
()
==
ctk
::
DataValidity
::
ok
);
BOOST_CHECK
(
A_in2
.
dataValidity
()
==
ctk
::
DataValidity
::
ok
);
BOOST_CHECK
(
D_in2
.
dataValidity
()
==
ctk
::
DataValidity
::
ok
);
BOOST_CHECK
(
circleResult
.
dataValidity
()
==
ctk
::
DataValidity
::
ok
);
// writing a resolves the remainging variables
a
.
write
();
test
.
stepApplication
();
readAllLatest
();
checkAllDataValidity
(
ctk
::
DataValidity
::
ok
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment