mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-21 19:30:03 +02:00
remove the check for localhost being used in rx_hostname for python test for simulators, run rx_arping test only if hostname is not 'localhost'
This commit is contained in:
parent
c32732b22e
commit
3a99f43f12
@ -445,23 +445,25 @@ TEST_CASE("rx_arping", "[.cmdcall][.rx]") {
|
|||||||
Detector det;
|
Detector det;
|
||||||
Caller caller(&det);
|
Caller caller(&det);
|
||||||
auto prev_val = det.getRxArping();
|
auto prev_val = det.getRxArping();
|
||||||
{
|
if (det.getDestinationUDPIP()[0].str() != "127.0.0.1") {
|
||||||
std::ostringstream oss;
|
{
|
||||||
caller.call("rx_arping", {"1"}, -1, PUT, oss);
|
std::ostringstream oss;
|
||||||
REQUIRE(oss.str() == "rx_arping 1\n");
|
caller.call("rx_arping", {"1"}, -1, PUT, oss);
|
||||||
}
|
REQUIRE(oss.str() == "rx_arping 1\n");
|
||||||
{
|
}
|
||||||
std::ostringstream oss;
|
{
|
||||||
caller.call("rx_arping", {}, -1, GET, oss);
|
std::ostringstream oss;
|
||||||
REQUIRE(oss.str() == "rx_arping 1\n");
|
caller.call("rx_arping", {}, -1, GET, oss);
|
||||||
}
|
REQUIRE(oss.str() == "rx_arping 1\n");
|
||||||
{
|
}
|
||||||
std::ostringstream oss;
|
{
|
||||||
caller.call("rx_arping", {"0"}, -1, PUT, oss);
|
std::ostringstream oss;
|
||||||
REQUIRE(oss.str() == "rx_arping 0\n");
|
caller.call("rx_arping", {"0"}, -1, PUT, oss);
|
||||||
}
|
REQUIRE(oss.str() == "rx_arping 0\n");
|
||||||
for (int i = 0; i != det.size(); ++i) {
|
}
|
||||||
det.setRxArping(prev_val[i], {i});
|
for (int i = 0; i != det.size(); ++i) {
|
||||||
|
det.setRxArping(prev_val[i], {i});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,8 +174,8 @@ parser.add_argument('rx_hostname', help = 'hostname/ip of the current machine')
|
|||||||
parser.add_argument('settingspath', help = 'Relative or absolut path to the settingspath')
|
parser.add_argument('settingspath', help = 'Relative or absolut path to the settingspath')
|
||||||
parser.add_argument('-s', '--servers', help='Detector servers to run', nargs='*')
|
parser.add_argument('-s', '--servers', help='Detector servers to run', nargs='*')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
if args.rx_hostname == 'localhost':
|
#if args.rx_hostname == 'localhost':
|
||||||
raise RuntimeException('Cannot use localhost for rx_hostname for the tests (fails for rx_arping for eg.)')
|
# raise RuntimeException('Cannot use localhost for rx_hostname for the tests (fails for rx_arping for eg.)')
|
||||||
|
|
||||||
if args.servers is None:
|
if args.servers is None:
|
||||||
servers = [
|
servers = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user