Added CDSTEST_CFG envvar for stress test.
authorkhizmax <libcds.dev@gmail.com>
Wed, 1 Jun 2016 20:14:38 +0000 (23:14 +0300)
committerkhizmax <libcds.dev@gmail.com>
Wed, 1 Jun 2016 20:14:38 +0000 (23:14 +0300)
This enavar contains filename of test configuration

projects/Win/vc14/stress-framework.vcxproj
test/stress/framework/config.cpp

index f4de7a0..0d255bc 100644 (file)
       <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">4267</DisableSpecificWarnings>\r
       <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4267</DisableSpecificWarnings>\r
     </ClCompile>\r
-    <ClCompile Include="..\..\..\test\stress\framework\config.cpp" />\r
+    <ClCompile Include="..\..\..\test\stress\framework\config.cpp">\r
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+    </ClCompile>\r
     <ClCompile Include="..\..\..\test\stress\framework\ellen_bintree_update_desc_pool.cpp" />\r
     <ClCompile Include="..\..\..\test\stress\framework\michael_alloc.cpp" />\r
     <ClCompile Include="..\..\..\test\stress\framework\stress_test.cpp" />\r
index 14505c0..2ba8ce2 100644 (file)
@@ -133,7 +133,12 @@ namespace cds_test {
             }
         }
 
-        if ( !cfg_file )
+        if ( !cfg_file ) {
+            // Get cfg filename from environment variable
+            cfg_file = getenv( "CDSTEST_CFG" );
+        }
+
+        if ( !cfg_file || *cfg_file == 0 )
             cfg_file = default_cfg_file;
 
         ::testing::Test::RecordProperty( "config_file", cfg_file );