Ignore:
Timestamp:
Jul 26, 2011, 4:34:35 AM (10 years ago)
Author:
Peter
Message:

prefer function exit_fail over exit 77

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/common_defs.sh.in

    r2527 r2528  
    3131            :;;
    3232        63)
    33             exit 77;;
     33            exit_skip;;
    3434        *)
    3535            exit $res;;
     
    6363echo "=== Running $me ==="
    6464
    65 # if required tool is not available, exit 77 to skip test
     65# if required tool is not available, exit_skip
    6666if test -n "$required"; then
    6767  for tool in $required; do
     
    6969      automake)
    7070      echo "$me: running $tool --version"
    71       ($tool --version) || exit 77;
     71      ($tool --version) || exit_skip;
    7272      # skip test if automake older than v1.10
    7373      version_am=`$tool --version | head -n 1 | cut -f 2 -d ')'`
    7474      ver_major=`echo ${version_am} | cut -f 1 -d '.'`
    75       test ${ver_major} -ge 1 || exit 77
     75      test ${ver_major} -ge 1 || exit_skip
    7676      ver_minor=`echo ${version_am} | cut -f 2 -d '.'`
    77       test ${ver_major} -gt 1 || test ${ver_minor} -ge 10 || exit 77
     77      test ${ver_major} -gt 1 || test ${ver_minor} -ge 10 || exit_skip
    7878      ;;
    7979      doxygen)
     
    8383      # GNU libtool comes as glibtool on Mac OS
    8484      (echo "$me: running libtool --version" && libtool --version) || \
    85       (echo "$me: running glibtool --version" && glibtool --version) || exit 77
     85      (echo "$me: running glibtool --version" && glibtool --version) || \
     86       exit_skip
    8687      ;;
    8788      static)
    8889      if (test "x@enable_static@" = "xno"); then
    8990        echo static libyat disabled;
    90         exit 77;
     91        exit_skip;
    9192      fi
    9293      ;;
    9394      *)
    9495      echo "$me: running $tool --version"
    95       ($tool --version) || exit 77
     96      ($tool --version) || exit_skip
    9697    esac
    9798  done
Note: See TracChangeset for help on using the changeset viewer.