Prechádzať zdrojové kódy

Merge pull request #40709 from Xrayez/move-tests

Move `tests` to the top-level directory
Rémi Verschelde 5 rokov pred
rodič
commit
4f5615e423

+ 4 - 3
SConstruct

@@ -661,8 +661,7 @@ if selected_platform in platform_list:
 
     Export("env")
 
-    # build subdirs, the build order is dependent on link order.
-
+    # Build subdirs, the build order is dependent on link order.
     SConscript("core/SCsub")
     SConscript("servers/SCsub")
     SConscript("scene/SCsub")
@@ -671,9 +670,11 @@ if selected_platform in platform_list:
 
     SConscript("platform/SCsub")
     SConscript("modules/SCsub")
+    if env["tests"]:
+        SConscript("tests/SCsub")
     SConscript("main/SCsub")
 
-    SConscript("platform/" + selected_platform + "/SCsub")  # build selected platform
+    SConscript("platform/" + selected_platform + "/SCsub")  # Build selected platform.
 
     # Microsoft Visual Studio Project Generation
     if env["vsproj"]:

+ 0 - 3
main/SCsub

@@ -20,8 +20,5 @@ env.CommandNoCache(
 env.Depends("#main/app_icon.gen.h", "#main/app_icon.png")
 env.CommandNoCache("#main/app_icon.gen.h", "#main/app_icon.png", run_in_subprocess(main_builders.make_app_icon))
 
-if env["tests"]:
-    SConscript("tests/SCsub")
-
 lib = env.add_library("main", env.main_sources)
 env.Prepend(LIBS=[lib])

+ 1 - 1
main/main.cpp

@@ -75,7 +75,7 @@
 #include "servers/xr_server.h"
 
 #ifdef TESTS_ENABLED
-#include "main/tests/test_main.h"
+#include "tests/test_main.h"
 #endif
 
 #ifdef TOOLS_ENABLED

+ 0 - 0
main/tests/SCsub → tests/SCsub


+ 0 - 0
main/tests/test_astar.cpp → tests/test_astar.cpp


+ 0 - 0
main/tests/test_astar.h → tests/test_astar.h


+ 0 - 0
main/tests/test_basis.cpp → tests/test_basis.cpp


+ 0 - 0
main/tests/test_basis.h → tests/test_basis.h


+ 0 - 0
main/tests/test_class_db.cpp → tests/test_class_db.cpp


+ 0 - 0
main/tests/test_class_db.h → tests/test_class_db.h


+ 0 - 0
main/tests/test_gdscript.cpp → tests/test_gdscript.cpp


+ 0 - 0
main/tests/test_gdscript.h → tests/test_gdscript.h


+ 0 - 0
main/tests/test_gui.cpp → tests/test_gui.cpp


+ 0 - 0
main/tests/test_gui.h → tests/test_gui.h


+ 0 - 0
main/tests/test_main.cpp → tests/test_main.cpp


+ 0 - 0
main/tests/test_main.h → tests/test_main.h


+ 0 - 0
main/tests/test_math.cpp → tests/test_math.cpp


+ 0 - 0
main/tests/test_math.h → tests/test_math.h


+ 0 - 0
main/tests/test_oa_hash_map.cpp → tests/test_oa_hash_map.cpp


+ 0 - 0
main/tests/test_oa_hash_map.h → tests/test_oa_hash_map.h


+ 0 - 0
main/tests/test_ordered_hash_map.cpp → tests/test_ordered_hash_map.cpp


+ 0 - 0
main/tests/test_ordered_hash_map.h → tests/test_ordered_hash_map.h


+ 0 - 0
main/tests/test_physics_2d.cpp → tests/test_physics_2d.cpp


+ 0 - 0
main/tests/test_physics_2d.h → tests/test_physics_2d.h


+ 0 - 0
main/tests/test_physics_3d.cpp → tests/test_physics_3d.cpp


+ 0 - 0
main/tests/test_physics_3d.h → tests/test_physics_3d.h


+ 0 - 0
main/tests/test_render.cpp → tests/test_render.cpp


+ 0 - 0
main/tests/test_render.h → tests/test_render.h


+ 0 - 0
main/tests/test_shader_lang.cpp → tests/test_shader_lang.cpp


+ 0 - 0
main/tests/test_shader_lang.h → tests/test_shader_lang.h


+ 0 - 0
main/tests/test_string.h → tests/test_string.h


+ 0 - 0
main/tests/test_validate_testing.h → tests/test_validate_testing.h