PageRenderTime 62ms CodeModel.GetById 33ms RepoModel.GetById 0ms app.codeStats 0ms

/test/java/rmi/reliability/scripts/run_juicer.ksh

https://github.com/ikeji/openjdk7-jdk
Korn Shell | 79 lines | 37 code | 13 blank | 29 comment | 0 complexity | 149070271e77a5a87d094e7e6e2df6e7 MD5 | raw file
  1. #
  2. # Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
  3. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  4. #
  5. # This code is free software; you can redistribute it and/or modify it
  6. # under the terms of the GNU General Public License version 2 only, as
  7. # published by the Free Software Foundation.
  8. #
  9. # This code is distributed in the hope that it will be useful, but WITHOUT
  10. # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  12. # version 2 for more details (a copy is included in the LICENSE file that
  13. # accompanied this code).
  14. #
  15. # You should have received a copy of the GNU General Public License version
  16. # 2 along with this work; if not, write to the Free Software Foundation,
  17. # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18. #
  19. # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20. # or visit www.oracle.com if you need additional information or have any
  21. # questions.
  22. #
  23. #!/bin/ksh
  24. #
  25. # Script to build and launch the juicer test as part of
  26. # the RMI reliability test. This script is used to run
  27. # the juicer test for a certain number of hours. This
  28. # script is NOT used when running the juicer test as part
  29. # of the jtreg regression suite.
  30. WORK_DIR=$1
  31. RES_DIR=$2
  32. JAVA_HOME=$3
  33. SUITE_DIR=$4
  34. NHOURS=$5
  35. shift 5
  36. VMOPTS=$*
  37. echo " ######### run_juicer script ##########"
  38. echo " WORK_DIR : $WORK_DIR "
  39. echo " RES_DIR : $RES_DIR "
  40. echo " JAVA_HOME : $JAVA_HOME "
  41. echo " SUITE_DIR : $SUITE_DIR "
  42. echo " NHOURS : $NHOURS "
  43. echo " VMOPTS : $VMOPTS "
  44. ${JAVA_HOME}/bin/javac \
  45. -d $WORK_DIR \
  46. ${SUITE_DIR}/juicer/*.java
  47. echo " Starting ApplicationServer "
  48. ${JAVA_HOME}/bin/java \
  49. $VMOPTS \
  50. -cp $WORK_DIR \
  51. -Djava.security.policy=${SUITE_DIR}/juicer/security.policy \
  52. ApplicationServer \
  53. > ${RES_DIR}/log.juicer.appserver 2>&1 &
  54. pid1=$!
  55. echo " Starting AppleUserImpl"
  56. ${JAVA_HOME}/bin/java \
  57. $VMOPTS \
  58. -cp $WORK_DIR \
  59. -Djava.security.policy=${SUITE_DIR}/juicer/security.policy \
  60. AppleUserImpl \
  61. -maxLevel 9 -hours ${NHOURS} -othervm -exit \
  62. > ${RES_DIR}/log.juicer.appleuser 2>&1
  63. RETVAL=$?
  64. kill -9 $pid1
  65. echo " Juicer test finished with exit value ${RETVAL}"
  66. exit ${RETVAL}