fixed annoying bug for test section manager
authorChris Koeritz <fred@gruntose.com>
Thu, 1 Nov 2018 14:59:49 +0000 (10:59 -0400)
committerChris Koeritz <fred@gruntose.com>
Thu, 1 Nov 2018 14:59:49 +0000 (10:59 -0400)
where the test would create a dir /feisty_meow if run as root, for storing the ini file.
do need to reevaluate the all users dir option; it makes no sense on linux, although at least we drive it by a simple environment variable.  is there even a unix equivalent to that concept of storing for all users?  not really, except sort of /etc dir.

nucleus/library/tests_configuration/test_section_manager.cpp

index c8358237a86dc2b575dec790558bacc0cad3ebfa..72acd84e95bfb810b064f9546d5aed7fbece77fc 100644 (file)
@@ -17,6 +17,7 @@
 
 #include <application/hoople_main.h>
 #include <basis/astring.h>
+#include <basis/environment.h>
 #include <basis/guards.h>
 #include <configuration/ini_configurator.h>
 #include <configuration/section_manager.h>
@@ -55,6 +56,10 @@ public:
 int test_section_manager::execute()
 {
   FUNCDEF("execute");
+
+  // prepare the storage area for ini config.
+  environment::set("ALLUSERSPROFILE", environment::get("TEMPORARIES_PILE"));
+
   {
     astring TEST = "First Test";
     ini_configurator ini("t_section_manager_1.ini", ini_configurator::AUTO_STORE);