Skip to content

Commit

Permalink
mvlc_ctrl_tests: lower repeated test iterations from 10k to 1k to spe…
Browse files Browse the repository at this point in the history
…ed things up
  • Loading branch information
flueke committed Dec 4, 2024
1 parent 3037499 commit 31606b3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion extras/mvlc-ctrl-tests/mvlc_ctrl_test_basic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ TEST_P(MVLCTestBase, TestRegisterReadWrite)
TEST_P(MVLCTestBase, TestRegisterReadWriteMultiThreaded)
{
static const unsigned ThreadCount = 4; // total number of threads to spawn
static const unsigned LoopCount = 10000; // total number of loops each thread performs
static const unsigned LoopCount = 1000; // total number of loops each thread performs

//mesytec::mvlc::get_logger("cmd_pipe_reader")->set_level(spdlog::level::trace);

Expand Down
4 changes: 1 addition & 3 deletions extras/mvlc-ctrl-tests/mvlc_ctrl_test_eth.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "gtest/gtest.h"
#include <spdlog/spdlog.h>
#include <mesytec-mvlc/mesytec-mvlc.h>
#include <mesytec-mvlc/mvlc_impl_eth.h>

Expand Down Expand Up @@ -29,14 +28,13 @@ class MvlcEthTestBase: public ::testing::TestWithParam<const char *>

TEST_P(MvlcEthTestBase, ReadRegister)
{
//spdlog::set_level(spdlog::level::trace);
// TODO: move this into a setUp routine
auto &mvlc = *impl;
auto ec = mvlc.connect();
ASSERT_FALSE(ec) << ec.message();
ASSERT_TRUE(mvlc.isConnected());

for (size_t i=0; i<10000; ++i)
for (size_t i=0; i<1000; ++i)
{
SuperCommandBuilder cmdList;
cmdList.addReferenceWord(i); // XXX: Makes the response one word larger. 15 bytes in total now!
Expand Down
3 changes: 1 addition & 2 deletions extras/mvlc-ctrl-tests/mvlc_ctrl_test_usb.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "gtest/gtest.h"
#include <spdlog/spdlog.h>
#include <ftd3xx.h>
#include <mesytec-mvlc/mesytec-mvlc.h>
#include <mesytec-mvlc/mvlc_impl_usb.h>
Expand Down Expand Up @@ -85,7 +84,7 @@ TEST(MvlcUsb, ReadRegister)
ASSERT_FALSE(ec) << ec.message();
ASSERT_TRUE(mvlc.isConnected());

for (size_t i = 0; i < 10000; ++i)
for (size_t i = 0; i < 1000; ++i)
{
SuperCommandBuilder cmdList;
cmdList.addReferenceWord(i); // XXX: Makes the response one word larger. 15 bytes in total now!
Expand Down

0 comments on commit 31606b3

Please sign in to comment.