(file) Return to omitestcli.cpp CVS log (file) (dir) Up to [OMI] / omi / ut

 1 krisbash 1.1 /*
 2              **==============================================================================
 3              **
 4              ** Open Management Infrastructure (OMI)
 5              **
 6              ** Copyright (c) Microsoft Corporation
 7              ** 
 8              ** Licensed under the Apache License, Version 2.0 (the "License"); you may not 
 9              ** use this file except in compliance with the License. You may obtain a copy 
10              ** of the License at 
11              **
12              **     http://www.apache.org/licenses/LICENSE-2.0 
13              **
14              ** THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15              ** KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED 
16              ** WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, 
17              ** MERCHANTABLITY OR NON-INFRINGEMENT. 
18              **
19              ** See the Apache 2 License for the specific language governing permissions 
20              ** and limitations under the License.
21              **
22 krisbash 1.1 **==============================================================================
23              */
24              
25              #include "ut.h"
26              #include <base/log.h>
27              #include <base/paths.h>
28              #include <pal/strings.h>
29              
30              using namespace TestSystem;
31              
32              using namespace TestSystem;
33              #include <base/log.h>
34              
35              // client tests run over MI API and do not use the OMITestSetup defined in omitestcommon.cpp
36              // since the MI dll has its own logging story where it opens the log
37              // and closes it in the end; so the NitsModuleSetup should not interfere with that
38              // only thing needed is to set the loglevel as passed in
39              // additionally; it does not let you set the logstderr at the module level since
40              // the log is open and closed on every application open/close which overwrites output redirection to stderr
41              NitsModuleSetup(OMICliTestSetup)
42                  NitsTrace(PAL_T("MIApiTestSetup being run"));
43 krisbash 1.1 
44                  const PAL_Char *loglevelParam = NitsTestGetParam(PAL_T("loglevel"));
45                  if(loglevelParam && Log_SetLevelFromPalCharString(loglevelParam) != 0)
46                  {
47                      NitsTrace(PAL_T("loglevel parameter invalid; not setting loglevel"));
48                      NitsAssert(PAL_FALSE, PAL_T("loglevel parameter invalid"));
49                  }
50              
51                  NitsAssert(PAL_TRUE, PAL_T(""));
52              NitsEndModuleSetup

ViewCVS 0.9.2