From 9fcaca9232709831e9374e7af3f62b5c60d31f91 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com>
Date: Thu, 31 Mar 2022 17:17:27 -0400
Subject: [PATCH] build/dev: add tests to vscode tasks

---
 .vscode/launch.json | 17 +++++++++++++++++
 .vscode/tasks.json  |  1 +
 2 files changed, 18 insertions(+)

diff --git a/.vscode/launch.json b/.vscode/launch.json
index f0d80452..8b975f91 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -18,6 +18,23 @@
                 }
             ],
             "preLaunchTask": "build"
+        },
+        {
+            "name": "tests",
+            "type": "cppdbg",
+            "request": "launch",
+            "program": "${workspaceFolder}/build/opendht_unit_tests",
+            "cwd": "${workspaceFolder}/build",
+            "environment": [],
+            "MIMode": "gdb",
+            "setupCommands": [
+                {
+                    "description": "Enable pretty-printing for gdb",
+                    "text": "-enable-pretty-printing",
+                    "ignoreFailures": true
+                }
+            ],
+            "preLaunchTask": "build"
         }
     ]
 }
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index 90624d9f..e8574d91 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -23,6 +23,7 @@
                 "-DCMAKE_BUILD_TYPE=Debug",
                 "-DOPENDHT_PROXY_CLIENT=On",
                 "-DOPENDHT_PROXY_SERVER=On",
+                "-DOPENDHT_TESTS=On",
                 "-DOPENDHT_C=On"
             ],
             "dependsOn": "builddir"
-- 
GitLab