got test path config working
authorFred T. Hamster <fred@feistymeow.org>
Sun, 8 Feb 2026 19:14:41 +0000 (14:14 -0500)
committerFred T. Hamster <fred@feistymeow.org>
Sun, 8 Feb 2026 19:14:41 +0000 (14:14 -0500)
more goodness!

nucleus/library/makefile
nucleus/library/tests_application/makefile
nucleus/library/tests_application/test_break_signal.cpp
nucleus/library/tests_application/test_command_line.cpp
nucleus/library/tests_application/test_path_configuration.cpp

index c96ec24a8eaa1e824803739cd39f98aa304ba40d..5aa3847763c35810b8b6ff7de589ddf074e736af 100644 (file)
@@ -23,6 +23,7 @@ BUILD_BEFORE = algorithms \
   tests_textual \
   tests_timely \
   tests_configuration \
+  tests_application \
   versions \
   crypto \
   tests_crypto 
index 154328e51eaa01c4c1d81f5828edce6ab4028ebc..52e2f2ef40b29d55bc0541211d770b854709d482 100644 (file)
@@ -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
-
index 7b4dae48519271acfe1f212d491c6934dbe35dc1..1582c1232373663c1dd38aff72129960f1bbb86d 100644 (file)
@@ -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;
 }
 
index 963b7d9dbf408eb3e4a887de2c6bf2c13dfb07a4..15ccc09ee9121b1e48e960a845f918eac3a79aa0 100644 (file)
@@ -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;
 }
 
index 1382c05e9d1f5a091fa21d25edacf413ac6a0c52..93b40feeac35b0a0411cb03b3ac6164bc3894f00 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************\
 *                                                                             *
-*  Name   : test_path_configuration                                           *
+*  Name   : test_application_configuration                                           *
 *  Author : Chris Koeritz                                                     *
 *                                                                             *
 *******************************************************************************
 * Please send any updates to: fred@gruntose.com                               *
 \*****************************************************************************/
 
+#include <application/hoople_main.h>
 #include <basis/guards.h>
-#include <basis/istring.h>
+#include <basis/astring.h>
 #include <loggers/console_logger.h>
-#include <opsystem/path_configuration.h>
-#include <data_struct/static_memory_gremlin.h>
+#include <configuration/application_configuration.h>
+#include <structures/static_memory_gremlin.h>
+//#include <unit_test/unit_base.h>
+
+//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;
 }