From 42fec11080f832b271a90fe189b69693f8b84ae4 Mon Sep 17 00:00:00 2001 From: George Danchev Date: Wed, 13 Jul 2011 11:24:32 +0000 Subject: [PATCH] check for execution from releng/ --- libisoburn/trunk/releng/manual_devices | 7 ++++++- libisoburn/trunk/releng/releng_cxx | 7 ++++++- libisoburn/trunk/releng/releng_isocontent | 7 ++++++- libisoburn/trunk/releng/releng_isojigdo | 7 ++++++- libisoburn/trunk/releng/releng_printsize | 7 ++++++- libisoburn/trunk/releng/run_all_releng | 8 ++++++++ libisoburn/trunk/releng/template_new_releng | 7 ++++++- 7 files changed, 44 insertions(+), 6 deletions(-) diff --git a/libisoburn/trunk/releng/manual_devices b/libisoburn/trunk/releng/manual_devices index 37175284..4bbbbe4b 100755 --- a/libisoburn/trunk/releng/manual_devices +++ b/libisoburn/trunk/releng/manual_devices @@ -5,8 +5,13 @@ # set -e +not_in_releng_exit() { + printf "\nPlease execute the tests from releng directory.\n\n" + exit 1 +} + # 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 # a xorriso binary to test, since some do compilations only. diff --git a/libisoburn/trunk/releng/releng_cxx b/libisoburn/trunk/releng/releng_cxx index 57b22760..dd92253c 100755 --- a/libisoburn/trunk/releng/releng_cxx +++ b/libisoburn/trunk/releng/releng_cxx @@ -5,7 +5,12 @@ 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 diff --git a/libisoburn/trunk/releng/releng_isocontent b/libisoburn/trunk/releng/releng_isocontent index 7e19ef63..322684ad 100755 --- a/libisoburn/trunk/releng/releng_isocontent +++ b/libisoburn/trunk/releng/releng_isocontent @@ -7,7 +7,12 @@ # Test the correct handling of hardlinks by xorriso options # -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 print_help diff --git a/libisoburn/trunk/releng/releng_isojigdo b/libisoburn/trunk/releng/releng_isojigdo index 8dfe5f7f..0f7d50c4 100755 --- a/libisoburn/trunk/releng/releng_isojigdo +++ b/libisoburn/trunk/releng/releng_isojigdo @@ -6,7 +6,12 @@ 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 print_help diff --git a/libisoburn/trunk/releng/releng_printsize b/libisoburn/trunk/releng/releng_printsize index b7bbee87..0d299c76 100755 --- a/libisoburn/trunk/releng/releng_printsize +++ b/libisoburn/trunk/releng/releng_printsize @@ -5,8 +5,13 @@ set -e +not_in_releng_exit() { + printf "\nPlease execute the tests from releng directory.\n\n" + exit 1 +} + # 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 # a xorriso binary to test, since some do compilations only. diff --git a/libisoburn/trunk/releng/run_all_releng b/libisoburn/trunk/releng/run_all_releng index d9828ed1..6b60eee2 100755 --- a/libisoburn/trunk/releng/run_all_releng +++ b/libisoburn/trunk/releng/run_all_releng @@ -5,9 +5,17 @@ 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 # master script as it calls the subordinate scripts and they include # 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") GEN_DATA_DIR=releng_generated_data diff --git a/libisoburn/trunk/releng/template_new_releng b/libisoburn/trunk/releng/template_new_releng index cdbd543a..e4cda3eb 100755 --- a/libisoburn/trunk/releng/template_new_releng +++ b/libisoburn/trunk/releng/template_new_releng @@ -3,10 +3,15 @@ # Copyright 2011 George Danchev # Licensed under GNU GPL version 2 +not_in_releng_exit() { + printf "\nPlease execute the tests from releng directory.\n\n" + exit 1 +} + set -e # Include common bits -. inc/releng_getopts.inc +. inc/releng_getopts.inc || not_in_releng_exit printf "\n$0: FAIL: === TEPLATE === RENAME ME TO releng_\n"