From 12dfdd546fa8bbd8eb544b383d21d57ad6f2167a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Resul=20=C3=87elik?= Date: Mon, 22 Mar 2021 22:09:19 +0100 Subject: [PATCH] SCons: Pass tests configuration to the MSVC solution Test sources and build parameter were not supplied to the visual studio project. This resulted in a build that was not able to be test using the --test command. Adding build parameter ensures we can test, and supplying the sources ensures we have all files to write new tests and edit existing ones. --- methods.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/methods.py b/methods.py index 725fb36caa9..6f1e7a72794 100644 --- a/methods.py +++ b/methods.py @@ -646,6 +646,9 @@ def generate_vs_project(env, num_jobs): "-j%s" % num_jobs, ] + if env["tests"]: + common_build_postfix.append("tests=yes") + if env["custom_modules"]: common_build_postfix.append("custom_modules=%s" % env["custom_modules"]) @@ -658,6 +661,8 @@ def generate_vs_project(env, num_jobs): add_to_vs_project(env, env.modules_sources) add_to_vs_project(env, env.scene_sources) add_to_vs_project(env, env.servers_sources) + if env["tests"]: + add_to_vs_project(env, env.tests_sources) add_to_vs_project(env, env.editor_sources) for header in glob_recursive("**/*.h"):