mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 16:46:47 +00:00
Add session id to DDS commands in dds/qc examples
This commit is contained in:
parent
e221242f9a
commit
fcd1022997
|
@ -42,6 +42,7 @@ if(DDS_FOUND)
|
||||||
add_test(NAME Example.DDS.localhost COMMAND ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-dds.sh localhost)
|
add_test(NAME Example.DDS.localhost COMMAND ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-dds.sh localhost)
|
||||||
set_tests_properties(Example.DDS.localhost PROPERTIES
|
set_tests_properties(Example.DDS.localhost PROPERTIES
|
||||||
TIMEOUT 15
|
TIMEOUT 15
|
||||||
|
RUN_SERIAL true
|
||||||
PASS_REGULAR_EXPRESSION "Example successful"
|
PASS_REGULAR_EXPRESSION "Example successful"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -32,22 +32,22 @@ trap "cleanup ${FAIRMQ_DDS_SESSION_ID}" EXIT
|
||||||
|
|
||||||
requiredNofSlots=12
|
requiredNofSlots=12
|
||||||
if [[ "$plugin" == "ssh" ]]; then
|
if [[ "$plugin" == "ssh" ]]; then
|
||||||
dds-submit -r ${plugin} -c @DATA_DIR@/ex-dds-hosts.cfg
|
dds-submit -r ${plugin} -c @DATA_DIR@/ex-dds-hosts.cfg -s ${FAIRMQ_DDS_SESSION_ID}
|
||||||
else
|
else
|
||||||
dds-submit -r ${plugin} --slots ${requiredNofSlots}
|
dds-submit -r ${plugin} --slots ${requiredNofSlots} -s ${FAIRMQ_DDS_SESSION_ID}
|
||||||
fi
|
fi
|
||||||
echo "...waiting for ${requiredNofSlots} idle slots..."
|
echo "...waiting for ${requiredNofSlots} idle slots..."
|
||||||
dds-info --idle-count --wait ${requiredNofSlots}
|
dds-info --idle-count --wait ${requiredNofSlots} -s ${FAIRMQ_DDS_SESSION_ID}
|
||||||
|
|
||||||
export FAIRMQ_DDS_TOPO_FILE=@DATA_DIR@/ex-dds-topology.xml
|
export FAIRMQ_DDS_TOPO_FILE=@DATA_DIR@/ex-dds-topology.xml
|
||||||
echo "TOPOLOGY FILE: ${FAIRMQ_DDS_TOPO_FILE}"
|
echo "TOPOLOGY FILE: ${FAIRMQ_DDS_TOPO_FILE}"
|
||||||
echo "TOPOLOGY NAME: $(dds-topology --disable-validation --topology-name ${FAIRMQ_DDS_TOPO_FILE})"
|
echo "TOPOLOGY NAME: $(dds-topology --disable-validation --topology-name ${FAIRMQ_DDS_TOPO_FILE})"
|
||||||
|
|
||||||
dds-info --active-topology
|
dds-info --active-topology -s ${FAIRMQ_DDS_SESSION_ID}
|
||||||
dds-topology --activate ${FAIRMQ_DDS_TOPO_FILE}
|
dds-topology --activate ${FAIRMQ_DDS_TOPO_FILE} -s ${FAIRMQ_DDS_SESSION_ID}
|
||||||
dds-info --active-topology
|
dds-info --active-topology -s ${FAIRMQ_DDS_SESSION_ID}
|
||||||
echo "...waiting for ${requiredNofSlots} executing slots..."
|
echo "...waiting for ${requiredNofSlots} executing slots..."
|
||||||
dds-info --executing-count --wait ${requiredNofSlots}
|
dds-info --executing-count --wait ${requiredNofSlots} -s ${FAIRMQ_DDS_SESSION_ID}
|
||||||
|
|
||||||
echo "------------------------"
|
echo "------------------------"
|
||||||
echo "...waiting for Topology to finish..."
|
echo "...waiting for Topology to finish..."
|
||||||
|
@ -67,14 +67,14 @@ fairmq-dds-command-ui -c t
|
||||||
fairmq-dds-command-ui -c d
|
fairmq-dds-command-ui -c d
|
||||||
fairmq-dds-command-ui -c q
|
fairmq-dds-command-ui -c q
|
||||||
echo "...waiting for ${requiredNofSlots} idle slots..."
|
echo "...waiting for ${requiredNofSlots} idle slots..."
|
||||||
dds-info --idle-count --wait ${requiredNofSlots}
|
dds-info --idle-count --wait ${requiredNofSlots} -s ${FAIRMQ_DDS_SESSION_ID}
|
||||||
echo "------------------------"
|
echo "------------------------"
|
||||||
|
|
||||||
dds-info --active-topology
|
dds-info --active-topology -s ${FAIRMQ_DDS_SESSION_ID}
|
||||||
dds-topology --stop
|
dds-topology --stop -s ${FAIRMQ_DDS_SESSION_ID}
|
||||||
dds-info --active-topology
|
dds-info --active-topology -s ${FAIRMQ_DDS_SESSION_ID}
|
||||||
|
|
||||||
dds-agent-cmd getlog -a
|
dds-agent-cmd getlog -a -s ${FAIRMQ_DDS_SESSION_ID}
|
||||||
logDir="${wrkDir}/logs"
|
logDir="${wrkDir}/logs"
|
||||||
for file in $(find "${logDir}" -name "*.tar.gz"); do tar -xf ${file} -C "${logDir}" ; done
|
for file in $(find "${logDir}" -name "*.tar.gz"); do tar -xf ${file} -C "${logDir}" ; done
|
||||||
echo "AGENT LOG FILES IN: ${logDir}"
|
echo "AGENT LOG FILES IN: ${logDir}"
|
||||||
|
|
|
@ -30,7 +30,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fairmq-start-ex-qc.sh.in ${CMAKE_CURR
|
||||||
# test
|
# test
|
||||||
if(DDS_FOUND)
|
if(DDS_FOUND)
|
||||||
add_test(NAME Example.QC.localhost COMMAND ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-qc.sh localhost)
|
add_test(NAME Example.QC.localhost COMMAND ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-qc.sh localhost)
|
||||||
set_tests_properties(Example.QC.localhost PROPERTIES TIMEOUT 15 PASS_REGULAR_EXPRESSION "Example successful")
|
set_tests_properties(Example.QC.localhost PROPERTIES TIMEOUT 15 RUN_SERIAL true PASS_REGULAR_EXPRESSION "Example successful")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# install
|
# install
|
||||||
|
|
|
@ -28,19 +28,19 @@ echo "SESSION ID: ${FAIRMQ_DDS_SESSION_ID}"
|
||||||
trap "cleanup ${FAIRMQ_DDS_SESSION_ID}" EXIT
|
trap "cleanup ${FAIRMQ_DDS_SESSION_ID}" EXIT
|
||||||
|
|
||||||
requiredNofSlots=4
|
requiredNofSlots=4
|
||||||
dds-submit -r localhost --slots ${requiredNofSlots}
|
dds-submit -r localhost --slots ${requiredNofSlots} -s ${FAIRMQ_DDS_SESSION_ID}
|
||||||
echo "...waiting for ${requiredNofSlots} idle slots..."
|
echo "...waiting for ${requiredNofSlots} idle slots..."
|
||||||
dds-info --idle-count --wait ${requiredNofSlots}
|
dds-info --idle-count --wait ${requiredNofSlots} -s ${FAIRMQ_DDS_SESSION_ID}
|
||||||
|
|
||||||
export FAIRMQ_DDS_TOPO_FILE=@DATA_DIR@/ex-qc-topology.xml
|
export FAIRMQ_DDS_TOPO_FILE=@DATA_DIR@/ex-qc-topology.xml
|
||||||
echo "TOPOLOGY FILE: ${FAIRMQ_DDS_TOPO_FILE}"
|
echo "TOPOLOGY FILE: ${FAIRMQ_DDS_TOPO_FILE}"
|
||||||
echo "TOPOLOGY NAME: $(dds-topology --disable-validation --topology-name ${FAIRMQ_DDS_TOPO_FILE})"
|
echo "TOPOLOGY NAME: $(dds-topology --disable-validation --topology-name ${FAIRMQ_DDS_TOPO_FILE})"
|
||||||
|
|
||||||
dds-info --active-topology
|
dds-info --active-topology -s ${FAIRMQ_DDS_SESSION_ID}
|
||||||
dds-topology --activate ${FAIRMQ_DDS_TOPO_FILE}
|
dds-topology --activate ${FAIRMQ_DDS_TOPO_FILE} -s ${FAIRMQ_DDS_SESSION_ID}
|
||||||
dds-info --active-topology
|
dds-info --active-topology -s ${FAIRMQ_DDS_SESSION_ID}
|
||||||
echo "...waiting for ${requiredNofSlots} executing slots..."
|
echo "...waiting for ${requiredNofSlots} executing slots..."
|
||||||
dds-info --executing-count --wait ${requiredNofSlots}
|
dds-info --executing-count --wait ${requiredNofSlots} -s ${FAIRMQ_DDS_SESSION_ID}
|
||||||
|
|
||||||
echo "------------------------"
|
echo "------------------------"
|
||||||
echo "...waiting for Topology to finish..."
|
echo "...waiting for Topology to finish..."
|
||||||
|
@ -60,14 +60,14 @@ fairmq-dds-command-ui -c t
|
||||||
fairmq-dds-command-ui -c d
|
fairmq-dds-command-ui -c d
|
||||||
fairmq-dds-command-ui -c q
|
fairmq-dds-command-ui -c q
|
||||||
echo "...waiting for ${requiredNofSlots} idle slots..."
|
echo "...waiting for ${requiredNofSlots} idle slots..."
|
||||||
dds-info --idle-count --wait ${requiredNofSlots}
|
dds-info --idle-count --wait ${requiredNofSlots} -s ${FAIRMQ_DDS_SESSION_ID}
|
||||||
echo "------------------------"
|
echo "------------------------"
|
||||||
|
|
||||||
dds-info --active-topology
|
dds-info --active-topology -s ${FAIRMQ_DDS_SESSION_ID}
|
||||||
dds-topology --stop
|
dds-topology --stop -s ${FAIRMQ_DDS_SESSION_ID}
|
||||||
dds-info --active-topology
|
dds-info --active-topology -s ${FAIRMQ_DDS_SESSION_ID}
|
||||||
|
|
||||||
dds-agent-cmd getlog -a
|
dds-agent-cmd getlog -a -s ${FAIRMQ_DDS_SESSION_ID}
|
||||||
logDir="${wrkDir}/logs"
|
logDir="${wrkDir}/logs"
|
||||||
for file in $(find "${logDir}" -name "*.tar.gz"); do tar -xf ${file} -C "${logDir}" ; done
|
for file in $(find "${logDir}" -name "*.tar.gz"); do tar -xf ${file} -C "${logDir}" ; done
|
||||||
echo "AGENT LOG FILES IN: ${logDir}"
|
echo "AGENT LOG FILES IN: ${logDir}"
|
||||||
|
|
|
@ -428,18 +428,6 @@ class BasicTopology : public AsioBase<Executor, Allocator>
|
||||||
|
|
||||||
auto StateEqualsTo(DeviceState state) const -> bool { return sdk::StateEqualsTo(GetCurrentState(), state); }
|
auto StateEqualsTo(DeviceState state) const -> bool { return sdk::StateEqualsTo(GetCurrentState(), state); }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
using WaitForStateCompletionSignature = void(std::error_code);
|
using WaitForStateCompletionSignature = void(std::error_code);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -576,8 +564,6 @@ class BasicTopology : public AsioBase<Executor, Allocator>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG(info) << fDDSTopo.GetTasks(path).size();
|
|
||||||
|
|
||||||
auto p = fWaitForStateOps.emplace(
|
auto p = fWaitForStateOps.emplace(
|
||||||
std::piecewise_construct,
|
std::piecewise_construct,
|
||||||
std::forward_as_tuple(id),
|
std::forward_as_tuple(id),
|
||||||
|
@ -627,19 +613,6 @@ class BasicTopology : public AsioBase<Executor, Allocator>
|
||||||
return WaitForState(DeviceState::Ok, targetCurrentState, path, timeout);
|
return WaitForState(DeviceState::Ok, targetCurrentState, path, timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
using GetPropertiesCompletionSignature = void(std::error_code, GetPropertiesResult);
|
using GetPropertiesCompletionSignature = void(std::error_code, GetPropertiesResult);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user