Skip to content

Commit

Permalink
test debug
Browse files Browse the repository at this point in the history
  • Loading branch information
shmocz committed Jul 6, 2023
1 parent d1aa0c6 commit 202394f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function debug_integration_test() {
# non-debug option
# CARGS="--abort-on-container-exit"
TOOLCHAIN="$(echo $CMAKE_TOOLCHAIN_FILE | sed -E 's/.+\/(.+)\.cmake/\1/g')-${CMAKE_BUILD_TYPE}"
EXE="$HOMEDIR/$BUILDDIR/$TOOLCHAIN/pkg/bin/test_multi_client.exe --gtest_filter=*HTTP*"
EXE="$HOMEDIR/$BUILDDIR/$TOOLCHAIN/pkg/bin/test_instrumentation_service.exe --gtest_filter=*FetchManySize* --gtest_repeat=-1"

function debug_integration() {
WINE_CMD="wine" $COMPOSE_CMD up --abort-on-container-exit $BUILDER
Expand All @@ -54,7 +54,7 @@ function debug_testcase() {
docker-compose down --remove-orphans -t 1
# FIXME: put abort stuff to cargs

COMMAND="$WINE_CMD $EXE --gtest_filter='*RegisterAndRun*'" docker-compose up $CARGS vnc "$BUILDER"
COMMAND="$WINE_CMD $EXE" docker-compose up $CARGS vnc "$BUILDER"
if [[ "$CARGS" == "-d" ]]; then
sleep 2
P='x86_64-w64-mingw32-gdb '"$EXE"' -ex "set solib-search-path "'"$HOMEDIR/$BUILDDIR/$TOOLCHAIN"'/pkg/bin"" -ex "target extended-remote localhost:12340"'
Expand Down Expand Up @@ -100,8 +100,8 @@ function debug_simple() {
# }
#
# debug_simple
# debug_testcase
debug_t1
debug_testcase
# debug_t1

# gdb_connect
# dcmd_gen "$@"
Expand Down
4 changes: 4 additions & 0 deletions tests/test_instrumentation_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,13 @@ void InstrumentationServiceTest::SetUp() {
}

void InstrumentationServiceTest::TearDown() {
iprintf("tear down client");
client = nullptr;
iprintf("tear down conn");
conn = nullptr;
iprintf("tear down iservice");
I = nullptr;
iprintf("exiting");
}

class IServiceTest : public InstrumentationServiceTest {
Expand Down
3 changes: 3 additions & 0 deletions tests/test_multi_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,12 @@ class MultiClientTest : public ::testing::Test {
}

void TearDown() override {
iprintf("tear down ctx");
ctx = nullptr;
iprintf("tear down iservice");
I = nullptr;
network::Deinit();
iprintf("exit");
}

// FIXME: need to ensure websocketproxy is properly setup before starting
Expand Down

0 comments on commit 202394f

Please sign in to comment.