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
4fc4cf3b
Commit
4fc4cf3b
authored
2 years ago
by
Jens Georg
Browse files
Options
Downloads
Patches
Plain Diff
Fix AllParameters test after CSA API change
parent
d909d949
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
+9
-8
9 additions, 8 deletions
tests/executable_src/testAllParameters.cc
with
9 additions
and
8 deletions
tests/executable_src/testAllParameters.cc
+
9
−
8
View file @
4fc4cf3b
...
...
@@ -39,13 +39,14 @@ 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"
);
...
...
@@ -56,18 +57,18 @@ BOOST_FIXTURE_TEST_CASE(testControlSystemVariables, Fixture_t) {
// if this variable exists, it has to be
try
{
pv
=
pvManager
->
getProcessVariable
(
"/TecModule/"
+
params
.
pvName
+
"_enaPeriodicRead"
);
pv
=
pvManager
->
getProcessVariable
(
"/TecModule/"
+
params
.
pvName
+
"_enaPeriodicRead"
);
if
(
pv
!
=
nullptr
)
{
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
);
}
catch
(
ChimeraTK
::
logic_error
&
)
{
}
else
{
// If this variable does not exist, the parameter has to be read-only
BOOST_CHECK
(
params
.
direction
==
Direction
::
ReadWrite
);
}
try
{
pv
=
pvManager
->
getProcessVariable
(
"/TecModule/"
+
params
.
pvName
+
"_wr"
);
pv
=
pvManager
->
getProcessVariable
(
"/TecModule/"
+
params
.
pvName
+
"_wr"
);
if
(
pv
!
=
nullptr
){
BOOST_CHECK
(
params
.
direction
==
Direction
::
ReadWrite
);
BOOST_CHECK
(
pv
->
isWriteable
());
if
(
params
.
valueType
==
ValueType
::
Int
)
...
...
@@ -77,7 +78,7 @@ BOOST_FIXTURE_TEST_CASE(testControlSystemVariables, Fixture_t) {
else
BOOST_ASSERT
(
false
);
}
catch
(
ChimeraTK
::
logic_error
&
)
{
else
{
// If this variable does not exist, the parameter has to be read-only
BOOST_CHECK
(
params
.
direction
==
Direction
::
Read
);
}
...
...
@@ -86,8 +87,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.
Jens Georg
@jens.georg
mentioned in commit
2881a9e9
·
2 years ago
mentioned in commit
2881a9e9
mentioned in commit 2881a9e909839f8baa11011f2c09276a566cd0de
Toggle commit list
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