Changeset 13971


Ignore:
Timestamp:
Nov 7, 2019 8:39:03 AM (12 days ago)
Author:
randersson
Message:

#5819 Reverted all changes from jm_tests.in

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev-5819/jm_tests.in

    r13909 r13971  
    2121
    2222# Memory allocation for the ant process
    23 ANT_OPTS="-Xmx4g"
     23ANT_OPTS="-Xmx2g"
    2424
    2525# Default tests - run if no tests are chosen
     
    172172
    173173function optimica_tests() {
    174   echo "in optimica_tests()"
    175174  junit_test Optimica
    176175}
     
    184183
    185184function python_tests() {
    186   TEST_DIR="$(pwd)/tests_$(date "+%F_%H-%M-%S")"
    187   mkdir ${TEST_DIR}
     185  if [ "${KEEP_PYTHON}" == 1 ]; then
     186    TEST_DIR="$(pwd)/tests_$(date "+%F_%H-%M-%S")"
     187    mkdir ${TEST_DIR}
     188  else
     189    TEST_DIR=$(mktemp -dq /tmp/jm_tests.XXXXXX)
     190  fi
    188191  print_name Python
    189192  res=0
    190   echo "in python_tests OUTPUT=${OUTPUT}"
    191   echo "in python_tests  TEST_DIR=${TEST_DIR}"
    192193  case ${OUTPUT} in
    193194    v)
     
    209210    n)
    210211      if [[ "${NO_BUILD_JMODELICA}" != "1" ]]; then
    211         echo "OUTPUT=${OUTPUT}"
    212         echo "NO_BUILD_JMODELICA=${NO_BUILD_JMODELICA}"
    213212        echo Building...
    214213      fi
     
    263262    for TEST in ${TESTS}; do
    264263      echo ""
    265       echo "Running ${TEST}"
    266       # echo ${TEST} | sed -e 's!^.*jmodelica.!Running !'
     264      echo ${TEST} | sed -e 's!^.*jmodelica.!Running !'
    267265      nose_test ${TEST} \
    268266      | log \
     
    342340  print_name $1
    343341  cd ${BUILD}/java
    344   echo "doing ls..."
    345   ls -la
    346342  res=0
    347343  case ${OUTPUT} in
     
    387383
    388384function junit_test_n() {
    389     echo "in junit_test_n"
    390385    res=0
    391386    ant_test $1 \
     
    401396
    402397function ant_test() {
    403   echo "MC_ANT_ARGS=${MC_ANT_ARGS}"
    404   echo "OC_ANT_ARGS=${OC_ANT_ARGS}"
    405   echo "BUILD=${BUILD}"
    406   echo "CLEAN_JUNIT=${CLEAN_JUNIT}"
    407     if [[ "$1" == "Modelica" ]]; then
    408         ant -f ${MC_ANT_ARGS} -Dtarget=${BUILD} ${CLEAN_JUNIT} test
    409     else
    410         ant -f ${OC_ANT_ARGS} -Dtarget=${BUILD} ${CLEAN_JUNIT} test
    411     fi
    412   echo "about to ls"
    413   ls -la ${BUILD}
     398  if [[ "$1" == "Modelica" ]]; then
     399    ant -f ${MC_ANT_ARGS} -Dtarget=${BUILD} ${CLEAN_JUNIT} test
     400  else
     401    ant -f ${OC_ANT_ARGS} -Dtarget=${BUILD} ${CLEAN_JUNIT} test
     402  fi
    414403}
    415404
     
    453442  TESTS64=
    454443  ARG_TYPE=flag
    455   echo "DEFAULT_ARGS=${DEFAULT_ARGS}"
    456444  for a in ${DEFAULT_ARGS} "$@"; do
    457     echo a=$a
    458445    if [[ "$(echo $a | head -c1)" == "-" ]]; then
    459446      ARG_TYPE=flag
     
    463450      flag)
    464451        FLAG=1
    465         echo FLAG=$FLAG
    466452        ;;
    467453      tag)
     
    499485    esac
    500486    if [[ ${FLAG} == 1 ]]; then
    501       echo "In flag == 1 with a=${a}"
    502       a_split=""
    503       for ((i=0; i<${#a}; i++)); do a_split="$a_split ${a:$i:1}"; done
    504       echo a_split="$a_split"
    505       for b in $a_split; do
    506         HAVE_READ_ARGS=1
    507         echo b=${b}
     487      for b in $(echo "" ${a}|sed 's!\(.\)!\1 !g'); do
    508488        case ${b} in
    509489          -)
     
    618598        esac
    619599      done
    620     else
    621       HAVE_READ_ARGS=1
    622600    fi
    623601  done
     
    636614TIME=$(date +%s)
    637615
    638 echo "TIME = ${TIME}"
    639 echo "before read_args"
    640 HAVE_READ_ARGS=0
    641 echo "PATH=${PATH}"
    642 echo "args $@"
    643616read_args "$@"
    644 if [[ $HAVE_READ_ARGS == 0 ]]; then
    645 echo "Reading args to jm_tests failed, retrying..."
    646 read_args "$@"
    647 fi
    648 echo "after read_args"
    649 echo "Writing to LOGFILE=${LOGFILE}"
     617
    650618if [[ $ERROR_ON_TEST_FAIL == 1 ]]; then
    651619    if [[ -z $XML_RES_PATH ]]; then
     
    657625if [ "${LOG}" == 1 ]; then
    658626  echo "Log of jm_tests $(date):" > "${LOGFILE}"
    659   echo "Finished writing log..."
    660627fi
    661628
     
    666633  fi
    667634done
    668 
    669 echo "ANY_ON=${ANY_ON}"
    670 echo "DEFAULT_TESTS=${DEFAULT_TESTS}"
    671635if [[ "${ANY_ON}" == 0 ]]; then
    672636  switch_test_flags ${DEFAULT_TESTS}
     
    679643
    680644res=0
    681 
    682645for a in ${tests}; do
    683646  if [[ "${test[${!a}]}" == 1 ]]; then
    684     echo "Printing going with ${a}_tests"
    685   fi
    686 done
    687 for a in ${tests}; do
    688   if [[ "${test[${!a}]}" == 1 ]]; then
    689     echo "going with ${a}_tests"
    690647    ${a}_tests || res=1
    691648  fi
Note: See TracChangeset for help on using the changeset viewer.