check for execution from releng/

This commit is contained in:
George Danchev 2011-07-13 11:24:32 +00:00
parent 0dee6a5bb5
commit 42fec11080
7 changed files with 44 additions and 6 deletions

View File

@ -5,8 +5,13 @@
# set -e # set -e
not_in_releng_exit() {
printf "\nPlease execute the tests from releng directory.\n\n"
exit 1
}
# Include common bits # Include common bits
. inc/releng_getopts.inc . inc/releng_getopts.inc || not_in_releng_exit
# Each releng_ test should decide whether or not it needs # Each releng_ test should decide whether or not it needs
# a xorriso binary to test, since some do compilations only. # a xorriso binary to test, since some do compilations only.

View File

@ -5,7 +5,12 @@
set -e set -e
. inc/releng_getopts.inc not_in_releng_exit() {
printf "\nPlease execute the tests from releng directory.\n\n"
exit 1
}
. inc/releng_getopts.inc || not_in_releng_exit
# xorriso binary is not needed for that particular test # xorriso binary is not needed for that particular test

View File

@ -7,7 +7,12 @@
# Test the correct handling of hardlinks by xorriso options # Test the correct handling of hardlinks by xorriso options
# -update_r , -hardlinks perform_update , and -extract # -update_r , -hardlinks perform_update , and -extract
. inc/releng_getopts.inc not_in_releng_exit() {
printf "\nPlease execute the tests from releng directory.\n\n"
exit 1
}
. inc/releng_getopts.inc || not_in_releng_exit
if [ ! -x $RELENG_XORRISO ]; then if [ ! -x $RELENG_XORRISO ]; then
print_help print_help

View File

@ -6,7 +6,12 @@
set -e set -e
. inc/releng_getopts.inc not_in_releng_exit() {
printf "\nPlease execute the tests from releng directory.\n\n"
exit 1
}
. inc/releng_getopts.inc || not_in_releng_exit
if [ ! -x $RELENG_XORRISO ]; then if [ ! -x $RELENG_XORRISO ]; then
print_help print_help

View File

@ -5,8 +5,13 @@
set -e set -e
not_in_releng_exit() {
printf "\nPlease execute the tests from releng directory.\n\n"
exit 1
}
# Include common bits # Include common bits
. inc/releng_getopts.inc . inc/releng_getopts.inc || not_in_releng_exit
# Each releng_ test should decide whether or not it needs # Each releng_ test should decide whether or not it needs
# a xorriso binary to test, since some do compilations only. # a xorriso binary to test, since some do compilations only.

View File

@ -5,9 +5,17 @@
set -e set -e
not_in_releng_exit() {
printf "\nPlease execute the tests from releng directory.\n\n"
exit 1
}
# It is not a good idea to include inc/releng_getopts.inc with the # It is not a good idea to include inc/releng_getopts.inc with the
# master script as it calls the subordinate scripts and they include # master script as it calls the subordinate scripts and they include
# this file too, and we want to avoid sharing variable with subshells # this file too, and we want to avoid sharing variable with subshells
if [ ! -f inc/releng_getopts.inc ]; then
not_in_releng_exit
fi
SELF=$(basename "$0") SELF=$(basename "$0")
GEN_DATA_DIR=releng_generated_data GEN_DATA_DIR=releng_generated_data

View File

@ -3,10 +3,15 @@
# Copyright 2011 George Danchev <danchev@spnet.net> # Copyright 2011 George Danchev <danchev@spnet.net>
# Licensed under GNU GPL version 2 # Licensed under GNU GPL version 2
not_in_releng_exit() {
printf "\nPlease execute the tests from releng directory.\n\n"
exit 1
}
set -e set -e
# Include common bits # Include common bits
. inc/releng_getopts.inc . inc/releng_getopts.inc || not_in_releng_exit
printf "\n$0: FAIL: === TEPLATE === RENAME ME TO releng_<title>\n" printf "\n$0: FAIL: === TEPLATE === RENAME ME TO releng_<title>\n"