PageRenderTime 51ms CodeModel.GetById 12ms RepoModel.GetById 1ms app.codeStats 0ms

/ri-clients/jbi-admin-common/regress/regress_defs.ksh

https://bitbucket.org/openesb/openesb-core
Korn Shell | 117 lines | 58 code | 16 blank | 43 comment | 3 complexity | ee4eaf1d505bef8e97d66ce6e3aadc3b MD5 | raw file
  1. #
  2. # BEGIN_HEADER - DO NOT EDIT
  3. #
  4. # The contents of this file are subject to the terms
  5. # of the Common Development and Distribution License
  6. # (the "License"). You may not use this file except
  7. # in compliance with the License.
  8. #
  9. # You can obtain a copy of the license at
  10. # https://open-esb.dev.java.net/public/CDDLv1.0.html.
  11. # See the License for the specific language governing
  12. # permissions and limitations under the License.
  13. #
  14. # When distributing Covered Code, include this CDDL
  15. # HEADER in each file and include the License file at
  16. # https://open-esb.dev.java.net/public/CDDLv1.0.html.
  17. # If applicable add the following below this CDDL HEADER,
  18. # with the fields enclosed by brackets "[]" replaced with
  19. # your own identifying information: Portions Copyright
  20. # [year] [name of copyright owner]
  21. #
  22. #
  23. # @(#)regress_defs.ksh
  24. # Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
  25. #
  26. # END_HEADER - DO NOT EDIT
  27. #
  28. #common definitions for regression tests.
  29. #set this prop to the test domain. default is JBITest
  30. #my_test_domain=domain1
  31. #use global regress setup:
  32. . $SRCROOT/antbld/regress/common_defs.ksh
  33. #override the variable or define other common scripts here
  34. #JBI_DOMAIN_NAME=JBITest
  35. #JBI_ADMIN_HOST=localhost
  36. #JBI_ADMIN_PORT=1962
  37. #JBI_DOMAIN_ROOT=$AS8BASE/domains/$JBI_DOMAIN_NAME
  38. # my module level test variables
  39. #DEV_TEST=false
  40. # MY_COMP_DIST=$SRCROOT/ui/bld/regress/dist
  41. # JBIANT_COMM_OPT="-emacs -q -f $JBI_ADMIN_XML $USR_OPT -Djbi.password=$AS_ADMIN_PASSWD -Djbi.port=$JBI_ADMIN_PORT"
  42. export UI_REGRESS_DIST_DIR JV_SVC_TEST_CLASSES
  43. JV_SVC_TEST_CLASSES=$JV_SVC_BLD/regress
  44. if [ $OPENESB_BUILD -eq 1 ]; then
  45. UI_REGRESS_DIST_DIR=$JV_SVC_TEST_CLASSES/testdata
  46. else
  47. UI_REGRESS_DIST_DIR=$JV_SVC_TEST_CLASSES/dist
  48. fi
  49. JBI_TARGET_NAME=server
  50. JMX4ANT_JAR=`find $MAVEN_REPOSITORY/jmx4ant -name \*.jar -print`
  51. export REGRESS_CLASSPATH
  52. REGRESS_CLASSPATH="$JV_JBI_DOMAIN_ROOT/lib/jbi.jar\
  53. ${JBI_PS}$AS_INSTALL/lib/jmxremote_optional.jar\
  54. ${JBI_PS}$AS_INSTALL/lib/appserv-rt.jar\
  55. ${JBI_PS}$AS_INSTALL/lib/j2ee.jar\
  56. ${JBI_PS}$JMX4ANT_JAR\
  57. ${JBI_PS}$ANT_HOME/lib/canonxml.jar\
  58. ${JBI_PS}$JV_SVC_TEST_CLASSES\
  59. "
  60. # Calls ant with jbi.task.fail.on.error=false so that we can track negative
  61. # test case output in the .out file
  62. export JBI_ANT_NEG
  63. JBI_ANT_NEG="$JBI_ANT -Djbi.task.fail.on.error=false -propertyfile $JV_JBI_DOMAIN_PROPS -lib $REGRESS_CLASSPATH"
  64. clean_jbi_install()
  65. {
  66. rm $JBI_DOMAIN_ROOT/logs/server.log
  67. rm $JBI_DOMAIN_ROOT/logs/.jbi_admin*
  68. rm -rf $JBI_DOMAIN_ROOT/jbi/engines
  69. rm -rf $JBI_DOMAIN_ROOT/jbi/bindings
  70. rm -rf $JBI_DOMAIN_ROOT/jbi/sharedlibraries
  71. rm -rf $JBI_DOMAIN_ROOT/jbi/repository
  72. rm -rf $JBI_DOMAIN_ROOT/jbi/schemaorg_apache_xmlbeans.system/deployment
  73. rm -rf $JBI_DOMAIN_ROOT/jbi/Trash
  74. mkdir $JBI_DOMAIN_ROOT/jbi/repository
  75. mkdir $JBI_DOMAIN_ROOT/jbi/schemaorg_apache_xmlbeans.system/deployment
  76. return 0;
  77. }
  78. # only used in module level testing
  79. start_appserver()
  80. {
  81. clean_jbi_install
  82. asadmin start-domain -t -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --domaindir "$JV_JBI_DOMAIN_DIR" $JBI_DOMAIN_NAME
  83. sleep 10
  84. return 0
  85. }
  86. stop_appserver() {
  87. $AS8BASE/bin/asadmin stop-domain $JBI_DOMAIN_NAME
  88. return 0
  89. }
  90. local_test_setup() {
  91. if [ "$DEV_TEST" = "true" ]; then
  92. start_appserver
  93. fi
  94. return 0
  95. }
  96. local_test_cleanup() {
  97. if [ "$DEV_TEST" = "true" ]; then
  98. stop_appserver
  99. fi
  100. return 0
  101. }