summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SConstruct17
-rw-r--r--main/tests/test_gdscript.cpp5
-rw-r--r--main/tests/test_image.cpp69
-rw-r--r--main/tests/test_image.h45
-rw-r--r--main/tests/test_main.cpp8
-rw-r--r--misc/dist/linux/godot.66
6 files changed, 18 insertions, 132 deletions
diff --git a/SConstruct b/SConstruct
index 3db429d0f9..2c79665465 100644
--- a/SConstruct
+++ b/SConstruct
@@ -88,13 +88,6 @@ env_base.split_modules = False
env_base.module_version_string = ""
env_base.msvc = False
-# To decide whether to rebuild a file, use the MD5 sum only if the timestamp has changed.
-# http://scons.org/doc/production/HTML/scons-user/ch06.html#idm139837621851792
-env_base.Decider('MD5-timestamp')
-# Use cached implicit dependencies by default. Can be overridden by specifying `--implicit-deps-changed` in the command line.
-# http://scons.org/doc/production/HTML/scons-user/ch06s04.html
-env_base.SetOption('implicit_cache', 1)
-
env_base.__class__.android_add_maven_repository = methods.android_add_maven_repository
env_base.__class__.android_add_flat_dir = methods.android_add_flat_dir
env_base.__class__.android_add_dependency = methods.android_add_dependency
@@ -234,6 +227,16 @@ env_base.platform_apis = platform_apis
if (env_base['target'] == 'debug'):
env_base.Append(CPPDEFINES=['DEBUG_MEMORY_ALLOC','DISABLE_FORCED_INLINE'])
+ # The two options below speed up incremental builds, but reduce the certainty that all files
+ # will properly be rebuilt. As such, we only enable them for debug (dev) builds, not release.
+
+ # To decide whether to rebuild a file, use the MD5 sum only if the timestamp has changed.
+ # http://scons.org/doc/production/HTML/scons-user/ch06.html#idm139837621851792
+ env_base.Decider('MD5-timestamp')
+ # Use cached implicit dependencies by default. Can be overridden by specifying `--implicit-deps-changed` in the command line.
+ # http://scons.org/doc/production/HTML/scons-user/ch06s04.html
+ env_base.SetOption('implicit_cache', 1)
+
if (env_base['no_editor_splash']):
env_base.Append(CPPDEFINES=['NO_EDITOR_SPLASH'])
diff --git a/main/tests/test_gdscript.cpp b/main/tests/test_gdscript.cpp
index 60f9568fbd..27ff2addf3 100644
--- a/main/tests/test_gdscript.cpp
+++ b/main/tests/test_gdscript.cpp
@@ -911,11 +911,14 @@ MainLoop *test(TestType p_type) {
List<String> cmdlargs = OS::get_singleton()->get_cmdline_args();
if (cmdlargs.empty()) {
- //try editor!
return NULL;
}
String test = cmdlargs.back()->get();
+ if (!test.ends_with(".gd") && !test.ends_with(".gdc")) {
+ print_line("This test expects a path to a GDScript file as its last parameter. Got: " + test);
+ return NULL;
+ }
FileAccess *fa = FileAccess::open(test, FileAccess::READ);
diff --git a/main/tests/test_image.cpp b/main/tests/test_image.cpp
deleted file mode 100644
index ee4f43bae0..0000000000
--- a/main/tests/test_image.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/*************************************************************************/
-/* test_image.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#include "test_image.h"
-
-#include "core/io/image_loader.h"
-#include "core/math/math_funcs.h"
-#include "core/os/main_loop.h"
-#include "core/print_string.h"
-
-namespace TestImage {
-
-class TestMainLoop : public MainLoop {
-
- bool quit;
-
-public:
- virtual void input_event(const Ref<InputEvent> &p_event) {
- }
-
- virtual void init() {
-
- quit = false;
- }
- virtual bool iteration(float p_time) {
-
- return quit;
- }
-
- virtual bool idle(float p_time) {
- return quit;
- }
-
- virtual void finish() {
- }
-};
-
-MainLoop *test() {
-
- return memnew(TestMainLoop);
-}
-} // namespace TestImage
diff --git a/main/tests/test_image.h b/main/tests/test_image.h
deleted file mode 100644
index b9b3c0cb48..0000000000
--- a/main/tests/test_image.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*************************************************************************/
-/* test_image.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef TEST_IMAGE_H
-#define TEST_IMAGE_H
-
-/**
- @author Juan Linietsky <reduzio@gmail.com>
-*/
-
-#include "core/os/main_loop.h"
-
-namespace TestImage {
-
-MainLoop *test();
-}
-
-#endif
diff --git a/main/tests/test_main.cpp b/main/tests/test_main.cpp
index 49f5cc5a18..22f1d7319f 100644
--- a/main/tests/test_main.cpp
+++ b/main/tests/test_main.cpp
@@ -36,7 +36,6 @@
#include "test_astar.h"
#include "test_gdscript.h"
#include "test_gui.h"
-#include "test_image.h"
#include "test_math.h"
#include "test_oa_hash_map.h"
#include "test_ordered_hash_map.h"
@@ -61,7 +60,6 @@ const char **tests_get_names() {
"gd_parser",
"gd_compiler",
"gd_bytecode",
- "image",
"ordered_hash_map",
"astar",
NULL
@@ -134,11 +132,6 @@ MainLoop *test_main(String p_test, const List<String> &p_args) {
return TestGDScript::test(TestGDScript::TEST_BYTECODE);
}
- if (p_test == "image") {
-
- return TestImage::test();
- }
-
if (p_test == "ordered_hash_map") {
return TestOrderedHashMap::test();
@@ -149,6 +142,7 @@ MainLoop *test_main(String p_test, const List<String> &p_args) {
return TestAStar::test();
}
+ print_line("Unknown test: " + p_test);
return NULL;
}
diff --git a/misc/dist/linux/godot.6 b/misc/dist/linux/godot.6
index e6fd1b9991..078f8bcf91 100644
--- a/misc/dist/linux/godot.6
+++ b/misc/dist/linux/godot.6
@@ -56,7 +56,7 @@ Remote filesystem (<host/IP>[:<port>] address).
Password for remote filesystem.
.TP
\fB\-\-audio\-driver\fR <driver>
-Audio driver ('PulseAudio', 'ALSA').
+Audio driver ('PulseAudio', 'ALSA', 'Dummy').
.TP
\fB\-\-video\-driver\fR <driver>
Video driver ('GLES3', 'GLES2').
@@ -133,7 +133,7 @@ Only parse for errors and quit (use with --script).
\fB\-\-export\fR <target>
Export the project using the given export target. Export only main pack if path ends with .pck or .zip.
.TP
-\fB\-\-export\-debug\fR
+\fB\-\-export\-debug\fR <target>
Like \-\-export, but use debug template.
.TP
\fB\-\-doctool\fR <path>
@@ -149,7 +149,7 @@ Build the scripting solutions (e.g. for C# projects).
Generate JSON dump of the Godot API for GDNative bindings.
.TP
\fB\-\-test\fR <test>
-Run a unit test ('string', 'math', 'physics', 'physics_2d', 'render', 'oa_hash_map', 'gui', 'shaderlang', 'gd_tokenizer', 'gd_parser', 'gd_compiler', 'gd_bytecode', 'image', 'ordered_hash_map').
+Run a unit test ('string', 'math', 'physics', 'physics_2d', 'render', 'oa_hash_map', 'gui', 'shaderlang', 'gd_tokenizer', 'gd_parser', 'gd_compiler', 'gd_bytecode', 'ordered_hash_map', 'astar').
.SH FILES
XDG_DATA_CONFIG/godot/ or ~/.config/godot/
.RS