Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TEC ApplicationModule
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
MSK-SW
Infrastructure and Support
TEC
TEC ApplicationModule
Commits
2881a9e9
Commit
2881a9e9
authored
2 years ago
by
Jens Georg
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Fix AllParameters test after CSA API change"
This reverts commit
4fc4cf3b
.
parent
6a01d8b0
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/executable_src/testAllParameters.cc
+8
-9
8 additions, 9 deletions
tests/executable_src/testAllParameters.cc
with
8 additions
and
9 deletions
tests/executable_src/testAllParameters.cc
+
8
−
9
View file @
2881a9e9
...
...
@@ -39,14 +39,13 @@ BOOST_FIXTURE_TEST_CASE(testControlSystemVariables, Fixture_t) {
auto
pvManager
=
testFacility
.
getPvManager
();
for
(
auto
&
params
:
descriptors
)
{
std
::
cout
<<
"Testing parameter "
<<
params
.
pvName
<<
std
::
endl
;
if
(
not
params
.
readGroup
.
empty
())
readGroups
.
insert
(
params
.
readGroup
);
if
(
not
params
.
writeGroup
.
empty
())
writeGroups
.
insert
(
params
.
writeGroup
);
if
(
not
params
.
writeToFlashGroup
.
empty
())
writeToFlashGroups
.
insert
(
params
.
writeToFlashGroup
);
// This variable has to exist
BOOST_CHECK_NO_THROW
(
pvManager
->
getProcessVariable
(
"/TecModule/"
+
params
.
pvName
+
"_rd"
));
auto
pv
=
pvManager
->
getProcessVariable
(
"/TecModule/"
+
params
.
pvName
+
"_rd"
);
BOOST_CHECK
(
pv
!=
nullptr
);
BOOST_CHECK
(
pv
->
isReadOnly
());
if
(
params
.
valueType
==
ValueType
::
Int
)
BOOST_CHECK_MESSAGE
(
pv
->
getValueType
()
==
typeid
(
int
),
"Check if _rd valueType is integer"
);
...
...
@@ -57,18 +56,18 @@ BOOST_FIXTURE_TEST_CASE(testControlSystemVariables, Fixture_t) {
// if this variable exists, it has to be
pv
=
pvManager
->
getProcessVariable
(
"/TecModule/"
+
params
.
pvName
+
"_enaPeriodicRead"
);
if
(
pv
!
=
nullptr
)
{
try
{
pv
=
pvManager
->
getProcessVariable
(
"/TecModule/"
+
params
.
pvName
+
"_enaPeriodicRead"
);
BOOST_CHECK
(
pv
->
isWriteable
());
BOOST_CHECK_MESSAGE
(
pv
->
getValueType
()
==
typeid
(
int32_t
),
"Check if _enaPeriodicRead valueType is int32_t"
);
BOOST_CHECK
(
params
.
direction
==
Direction
::
Read
);
}
else
{
}
catch
(
ChimeraTK
::
logic_error
&
)
{
// If this variable does not exist, the parameter has to be read-only
BOOST_CHECK
(
params
.
direction
==
Direction
::
ReadWrite
);
}
pv
=
pvManager
->
getProcessVariable
(
"/TecModule/"
+
params
.
pvName
+
"_wr"
);
if
(
pv
!
=
nullptr
){
try
{
pv
=
pvManager
->
getProcessVariable
(
"/TecModule/"
+
params
.
pvName
+
"_wr"
);
BOOST_CHECK
(
params
.
direction
==
Direction
::
ReadWrite
);
BOOST_CHECK
(
pv
->
isWriteable
());
if
(
params
.
valueType
==
ValueType
::
Int
)
...
...
@@ -78,7 +77,7 @@ BOOST_FIXTURE_TEST_CASE(testControlSystemVariables, Fixture_t) {
else
BOOST_ASSERT
(
false
);
}
else
{
catch
(
ChimeraTK
::
logic_error
&
)
{
// If this variable does not exist, the parameter has to be read-only
BOOST_CHECK
(
params
.
direction
==
Direction
::
Read
);
}
...
...
@@ -87,8 +86,8 @@ BOOST_FIXTURE_TEST_CASE(testControlSystemVariables, Fixture_t) {
// Check if the group accessors exist
for
(
auto
&
group
:
{
readGroups
,
writeGroups
,
writeToFlashGroups
})
{
for
(
auto
&
entry
:
group
)
{
BOOST_REQUIRE_NO_THROW
(
pvManager
->
getProcessVariable
(
"/TecModule/"
+
entry
+
"_wr"
));
auto
pv
=
pvManager
->
getProcessVariable
(
"/TecModule/"
+
entry
+
"_wr"
);
BOOST_REQUIRE
(
pv
!=
nullptr
);
BOOST_CHECK
(
pv
->
isWriteable
());
}
}
...
...
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