summaryrefslogtreecommitdiff
path: root/TAO/performance-tests/CSD_Strategy/TestInf/TestAppMain.h
diff options
context:
space:
mode:
authordai_y <dai_y@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-10-19 00:27:51 +0000
committerdai_y <dai_y@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-10-19 00:27:51 +0000
commitb29e5800752ecefbe4e9317ac908e40d9c6eded0 (patch)
tree3bdec835860a692ca76bdcd5baa5f069645bf248 /TAO/performance-tests/CSD_Strategy/TestInf/TestAppMain.h
parent189f1baf20ea719b1724adef186b8699706eb065 (diff)
downloadATCD-b29e5800752ecefbe4e9317ac908e40d9c6eded0.tar.gz
Tue Oct 18 17:24:26 MST 2005 Yan Dai <dai_y@ociweb.com>
Diffstat (limited to 'TAO/performance-tests/CSD_Strategy/TestInf/TestAppMain.h')
-rw-r--r--TAO/performance-tests/CSD_Strategy/TestInf/TestAppMain.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/TAO/performance-tests/CSD_Strategy/TestInf/TestAppMain.h b/TAO/performance-tests/CSD_Strategy/TestInf/TestAppMain.h
new file mode 100644
index 00000000000..062b6fc0c8e
--- /dev/null
+++ b/TAO/performance-tests/CSD_Strategy/TestInf/TestAppMain.h
@@ -0,0 +1,49 @@
+// $Id$
+#ifndef TESTAPPMAIN_H
+#define TESTAPPMAIN_H
+
+#include "ace/Log_Msg.h"
+#include "ace/SString.h"
+#include "tao/Exception.h"
+#include "tao/Environment.h"
+
+#define TEST_APP_MAIN(APP_TYPE) \
+int \
+main(int argc, char* argv[]) \
+{ \
+ ACE_LOG_MSG->priority_mask(LM_TRACE | \
+ LM_DEBUG | \
+ LM_INFO | \
+ LM_NOTICE | \
+ LM_WARNING | \
+ LM_ERROR | \
+ LM_CRITICAL | \
+ LM_ALERT | \
+ LM_EMERGENCY, \
+ ACE_Log_Msg::PROCESS); \
+\
+ APP_TYPE app; \
+\
+ ACE_TRY_NEW_ENV \
+ { \
+ int ret = app.run(argc,argv ACE_ENV_ARG_PARAMETER); \
+ ACE_TRY_CHECK; \
+ return ret; \
+ } \
+ ACE_CATCHANY \
+ { \
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, \
+ "Caught exception:"); \
+ } \
+ ACE_CATCHALL \
+ { \
+ ACE_ERROR((LM_ERROR, \
+ "(%P|%t) Unknown (...) exception caught in main() " \
+ "for App [%d].\n", app.name())); \
+ } \
+ ACE_ENDTRY; \
+ \
+ return 1; \
+}
+
+#endif