From 21f63053cfd8615fb8748b2c632a37c54fb9244b Mon Sep 17 00:00:00 2001 From: George Danchev Date: Mon, 11 Jul 2011 09:24:57 +0000 Subject: [PATCH] check devices, to be run manually, for now --- libisoburn/trunk/releng/README.core | 1 + libisoburn/trunk/releng/README.list | 2 +- libisoburn/trunk/releng/manual_devices | 58 ++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100755 libisoburn/trunk/releng/manual_devices diff --git a/libisoburn/trunk/releng/README.core b/libisoburn/trunk/releng/README.core index 7c601614..e715f3e2 100644 --- a/libisoburn/trunk/releng/README.core +++ b/libisoburn/trunk/releng/README.core @@ -11,6 +11,7 @@ Release Engineering libisoburn source tree. There is a 'master' script called run_all_releng, which runs all scripts prefixed with releng_*. + Any releng_* script can be run on its own, regardless. + + Any manual_* script is to be run on its own, i.e. by hand. + All scripts support -h, -help, --help and print usage help when run without options. diff --git a/libisoburn/trunk/releng/README.list b/libisoburn/trunk/releng/README.list index 1e6bb71c..de086a2a 100644 --- a/libisoburn/trunk/releng/README.list +++ b/libisoburn/trunk/releng/README.list @@ -2,7 +2,7 @@ Release Engineering Che[at|ck] List ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Automated tests ~~~~~~~~~~~~~~~ - TEST: Tests starting with releng_* are runnable by run_all_releng + TEST: All automated tests (releng_*) are runnable by ./run_all_releng FILE: libisoburn/releng/releng_* FILE: http://people.debian.org/~danchev/libburnia/logs/releng/ WHO: george, thomas diff --git a/libisoburn/trunk/releng/manual_devices b/libisoburn/trunk/releng/manual_devices new file mode 100755 index 00000000..0c00af2f --- /dev/null +++ b/libisoburn/trunk/releng/manual_devices @@ -0,0 +1,58 @@ +#!/bin/bash + +# set -e + +# Include common bits +. inc/releng_getopts.inc + +# Each releng_ test should decide whether or not it needs +# a xorriso binary to test, since some do compilations only. +if [ ! -x $RELENG_XORRISO ]; then + print_help + printf "\n${SELF}: -x absolute or relative path to binary to be run.\n\n" + exit 31 +fi + +# +get_speeds() { + echo -e "\n${SELF}: Running: ${RELENG_XORRISO} -outdev ${1} -list_speeds" + ${RELENG_XORRISO} -outdev ${1} -list_speeds +} + +get_devices() { + DEVICES=`$RELENG_XORRISO -devices 2>/dev/null | grep "\-dev"` + NUM_DEV=`echo ${DEVICES} | wc -l` + + case "${NUM_DEV}" in + 0) + echo -e "\n${SELF}: No drives found." + exit 1 + ;; + 1) + echo -e "\n${SELF}: Single drive found:\n${DEVICES}" + OUTDEV=`${RELENG_XORRISO} -devices 2>/dev/null | perl -pe "s#^\d+\s+\-dev\s+\'## and s#\'.*##"` + get_speeds ${OUTDEV} + ;; + *) + echo -e "\n${SELF}: Multiple drives found. NOT FINISHED YET." + ;; + esac +} + +# main +echo -e "\n${SELF}: Running: $RELENG_XORRISO -devices..." +$RELENG_XORRISO -devices +RET="$?" +case ${RET} in + 0) + get_devices + ;; + *) + boldify + echo -ne "\n${SELF}: ${RELENG_XORRISO} -devices returned ${RET}." + unboldify + echo -e "\n${SELF}: Already mounted?" + df -kh +esac + +exit 0