run_all_samples.sh
上传用户:xfwatch
上传日期:2020-12-14
资源大小:872k
文件大小:3k
源码类别:

中间件编程

开发平台:

Java

  1. # ALLOW JOBS TO BE BACKGROUNDED
  2. set -m
  3. # RUN THE FOOAPP SERVER
  4. cd $BLACKTIE_HOME/examples/xatmi/fooapp
  5. generate_server.sh -Dservice.names=BAR -Dserver.includes=BarService.c
  6. if [ "$?" != "0" ]; then
  7. exit -1
  8. fi
  9. export BLACKTIE_CONFIGURATION=linux
  10. btadmin startup
  11. if [ "$?" != "0" ]; then
  12. exit -1
  13. fi
  14. unset BLACKTIE_CONFIGURATION
  15. # RUN THE JAVA CLIENT
  16. cd $BLACKTIE_HOME/examples/jab
  17. echo hello | mvn test
  18. if [ "$?" != "0" ]; then
  19. exit -1
  20. fi
  21. # RUN THE C CLIENT
  22. cd $BLACKTIE_HOME/examples/xatmi/fooapp
  23. generate_client.sh -Dclient.includes=client.c
  24. ./client
  25. if [ "$?" != "0" ]; then
  26. killall -9 server
  27. exit -1
  28. fi
  29. # RUN THE ADMIN JMX CLIENT
  30. cd $BLACKTIE_HOME/examples/admin/jmx
  31. echo '0
  32. 0
  33. 0
  34. 0
  35. 1' | mvn test
  36. if [ "$?" != "0" ]; then
  37. exit -1
  38. fi
  39. # RUN THE ADMIN JMX CLIENT
  40. cd $BLACKTIE_HOME/examples/admin/jmx
  41. echo '0
  42. 0
  43. 0
  44. 0
  45. 2' | mvn test
  46. if [ "$?" != "0" ]; then
  47. exit -1
  48. fi
  49. # PICK UP THE CLOSING SERVER
  50. sleep 3
  51. # RUN THE FOOAPP SERVER AGAIN
  52. cd $BLACKTIE_HOME/examples/xatmi/fooapp
  53. export BLACKTIE_CONFIGURATION=linux
  54. btadmin startup
  55. if [ "$?" != "0" ]; then
  56. exit -1
  57. fi
  58. unset BLACKTIE_CONFIGURATION
  59. # SHUTDOWN THE SERVER RUNNING THE XATMI ADMIN CLIENT
  60. cd $BLACKTIE_HOME/examples/admin/xatmi
  61. generate_client.sh -Dclient.includes=client.c
  62. echo '0
  63. 0
  64. 0
  65. 0
  66. 1' | ./client
  67. # SHUTDOWN THE SERVER RUNNING THE XATMI ADMIN CLIENT
  68. cd $BLACKTIE_HOME/examples/admin/xatmi
  69. generate_client.sh -Dclient.includes=client.c
  70. echo '0
  71. 0
  72. 0
  73. 0
  74. 2' | ./client
  75. # PICK UP THE CLOSING SERVER
  76. sleep 3
  77. # RUN THE SECURE SERVER
  78. cd $BLACKTIE_HOME/examples/security
  79. generate_server.sh -Dservice.names=SECURE -Dserver.includes=BarService.c
  80. if [ "$?" != "0" ]; then
  81. exit -1
  82. fi
  83. export BLACKTIE_CONFIGURATION_DIR=serv
  84. export BLACKTIE_CONFIGURATION=linux
  85. btadmin startup secure
  86. if [ "$?" != "0" ]; then
  87. exit -1
  88. fi
  89. unset BLACKTIE_CONFIGURATION
  90. unset BLACKTIE_CONFIGURATION_DIR
  91. # RUN THE "guest" USER CLIENT
  92. generate_client.sh -Dclient.includes=client.c
  93. export BLACKTIE_CONFIGURATION_DIR=guest
  94. ./client
  95. # This test is expected to fail so make sure the exit status was not 0
  96. if [ "$?" == "0" ]; then
  97. exit -1
  98. fi
  99. unset BLACKTIE_CONFIGURATION_DIR
  100. # RUN THE "dynsub" USER CLIENT
  101. export BLACKTIE_CONFIGURATION_DIR=dynsub
  102. ./client
  103. if [ "$?" != "0" ]; then
  104. exit -1
  105. fi
  106. unset BLACKTIE_CONFIGURATION_DIR
  107. # SHUTDOWN THE SERVER RUNNING THE btadmin TOOL
  108. export BLACKTIE_CONFIGURATION_DIR=serv
  109. export BLACKTIE_CONFIGURATION=linux
  110. btadmin shutdown secure
  111. if [ "$?" != "0" ]; then
  112. exit -1
  113. fi
  114. unset BLACKTIE_CONFIGURATION
  115. unset BLACKTIE_CONFIGURATION_DIR
  116. # RUN THE MDB EXAMPLE
  117. cd $BLACKTIE_HOME/examples/mdb
  118. mvn install
  119. if [ "$?" != "0" ]; then
  120. exit -1
  121. fi
  122. # LET THE USER KNOW THE OUTPUT
  123. echo "All samples ran OK"