From: Fred T. Hamster Date: Sun, 8 Feb 2026 19:14:41 +0000 (-0500) Subject: got test path config working X-Git-Tag: 2.140.190^2~19 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=b629f13e87ccbc4eda10d6f398b2a089715b6b23;p=feisty_meow.git got test path config working more goodness! --- diff --git a/nucleus/library/makefile b/nucleus/library/makefile index c96ec24a..5aa38477 100644 --- a/nucleus/library/makefile +++ b/nucleus/library/makefile @@ -23,6 +23,7 @@ BUILD_BEFORE = algorithms \ tests_textual \ tests_timely \ tests_configuration \ + tests_application \ versions \ crypto \ tests_crypto diff --git a/nucleus/library/tests_application/makefile b/nucleus/library/tests_application/makefile index 154328e5..52e2f2ef 100644 --- a/nucleus/library/tests_application/makefile +++ b/nucleus/library/tests_application/makefile @@ -4,12 +4,10 @@ include cpp/variables.def PROJECT = tests_application TYPE = test -TARGETS = test_break_signal.exe test_command_line.exe +TARGETS = test_break_signal.exe test_command_line.exe test_path_configuration.exe -#test_byte_filer.exe -# test_directory.exe test_directory_tree.exe test_dirtree_fcopy.exe test_filename.exe \ -# test_huge_file.exe test_ini_configurator.exe test_ini_parser.exe test_logger.exe \ -# test_path_configuration.exe test_registry_configurator.exe test_redirection.exe \ +# test_logger.exe \ +# test_registry_configurator.exe test_redirection.exe \ # test_rendezvous.exe test_system_values.exe test_timer_driver.exe #ifeq "$(findstring EMBEDDED_BUILD, $(DEFINITIONS))" "" # TARGETS += test_shared_memory.exe @@ -18,21 +16,11 @@ TARGETS = test_break_signal.exe test_command_line.exe DEFINITIONS += USE_FEISTY_MEOW_DLLS LOCAL_LIBS_USED = unit_test application configuration filesystem loggers \ mathematics nodes processes structures textual timely structures basis +RUN_TARGETS = $(ACTUAL_TARGETS) -#VCPP_USE_GUI=t -#USE_HOOPLE_DLLS=t - -LAST_TARGETS += test_break_signal_special -RUN_TARGETS = $(EXECUTABLE_DIR)/test_command_line - -# test_filename.exe \ -# test_huge_file.exe test_ini_configurator.exe test_ini_parser.exe test_logger.exe \ +# test_logger.exe \ # test_path_configuration.exe test_registry_configurator.exe \ # test_system_values.exe test_timer_driver.exe include cpp/rules.def -# run the break signal tester with a short timeout, since generally no one's watching the build to hit break. -test_break_signal_special: - $(EXECUTABLE_DIR)/test_break_signal 1 - diff --git a/nucleus/library/tests_application/test_break_signal.cpp b/nucleus/library/tests_application/test_break_signal.cpp index 7b4dae48..1582c123 100644 --- a/nucleus/library/tests_application/test_break_signal.cpp +++ b/nucleus/library/tests_application/test_break_signal.cpp @@ -41,7 +41,7 @@ using namespace unit_test; static bool _leave_now = false; -const int DEFAULT_PAUSE_TIME = 20; // how long we'll wait, unless told a different time. +const int DEFAULT_PAUSE_TIME = 1; // how long we'll wait, unless told a different time. class test_break_signal : virtual public unit_base, virtual public application_shell { @@ -80,9 +80,10 @@ int test_break_signal::execute() } // we jump to here when catching the signal. - astring to_print("break_signal:: works for those functions tested."); - critical_events::alert_message(to_print.s()); fflush(NULL_POINTER); + + critical_events::alert_message(astring(class_name()) + ": works for those functions tested."); + return 0; } diff --git a/nucleus/library/tests_application/test_command_line.cpp b/nucleus/library/tests_application/test_command_line.cpp index 963b7d9d..15ccc09e 100644 --- a/nucleus/library/tests_application/test_command_line.cpp +++ b/nucleus/library/tests_application/test_command_line.cpp @@ -136,7 +136,8 @@ int test_command_line::execute() //more tests! - critical_events::alert_message("command_line:: works for those functions tested."); + critical_events::alert_message(astring(class_name()) + ": works for those functions tested."); + return 0; } diff --git a/nucleus/library/tests_application/test_path_configuration.cpp b/nucleus/library/tests_application/test_path_configuration.cpp index 1382c05e..93b40fee 100644 --- a/nucleus/library/tests_application/test_path_configuration.cpp +++ b/nucleus/library/tests_application/test_path_configuration.cpp @@ -1,6 +1,6 @@ /*****************************************************************************\ * * -* Name : test_path_configuration * +* Name : test_application_configuration * * Author : Chris Koeritz * * * ******************************************************************************* @@ -12,27 +12,44 @@ * Please send any updates to: fred@gruntose.com * \*****************************************************************************/ +#include #include -#include +#include #include -#include -#include +#include +#include +//#include + +//using namespace application; +using namespace basis; +using namespace configuration; +//using namespace mathematics; +//using namespace filesystem; +using namespace loggers; +//using namespace structures; +//using namespace textual; +//using namespace timely; +//using namespace unit_test; + +#define LOG(s) CLASS_EMERGENCY_LOG(program_wide_logger::get(), s) + +//hmmm: ugly old main() without using the hoople machinery. ack. +astring static_class_name() { return "test_path_configuration"; } HOOPLE_STARTUP_CODE; int main(int argc, char *argv[]) { - console_logger out; - - istring jammed; + FUNCDEF("main") + astring jammed; for (int i = 0; i < argc; i++) - jammed += istring(argv[i]) + " "; - out.log(istring("command line=") + jammed); + jammed += astring(argv[i]) + " "; + LOG(astring("command line=") + jammed); - istring app_dir = path_configuration::application_directory(); - out.log(istring("app dir is: ") + app_dir); + astring app_dir = application_configuration::application_directory(); + LOG(astring("app dir is: ") + app_dir); - guards::alert_message("path_configuration:: works for those functions tested."); + critical_events::alert_message(astring(static_class_name()) + ": works for those functions tested."); return 0; }