From 2542c0dab51cf735496699fbec29f387fadfb894 Mon Sep 17 00:00:00 2001 From: Jaby Date: Mon, 12 Sep 2022 22:18:56 +0200 Subject: [PATCH] Add test makefile for easy execution --- src/Tools/Tests/Test.mk | 7 +++++++ src/Tools/Tools.code-workspace | 11 +++++++++++ 2 files changed, 18 insertions(+) create mode 100644 src/Tools/Tests/Test.mk diff --git a/src/Tools/Tests/Test.mk b/src/Tools/Tests/Test.mk new file mode 100644 index 00000000..ef1e1c84 --- /dev/null +++ b/src/Tools/Tests/Test.mk @@ -0,0 +1,7 @@ +export PATH := $(HOME)/.cargo/bin/:$(PATH) + +test_cpp_out: always + @cargo build --manifest-path ../cpp_out/Cargo.toml --release + @./../cpp_out/target/release/cpp_out + +always: ; \ No newline at end of file diff --git a/src/Tools/Tools.code-workspace b/src/Tools/Tools.code-workspace index a60b4deb..40a493f8 100644 --- a/src/Tools/Tools.code-workspace +++ b/src/Tools/Tools.code-workspace @@ -23,6 +23,17 @@ "group": { "kind": "build", } + }, + { + "label": "run test make", + "type": "shell", + "command": "wsl make -f Test.mk test_${input:project}", + "group": { + "kind": "build", + }, + "options": { + "cwd": "${workspaceFolder}/Tests" + } } ], "inputs": [