diff options
author | Adrian Likins <alikins@grimlock.devel.redhat.com> | 2008-01-29 17:37:18 -0500 |
---|---|---|
committer | Adrian Likins <alikins@grimlock.devel.redhat.com> | 2008-01-29 17:37:18 -0500 |
commit | d3edd527c9fff9878745204d4f0e5f191d883810 (patch) | |
tree | bf1a444d21b450bbb166b4686b92a0a4c828996a /test/test-it.sh | |
parent | 09f0681ca270396533165aabd075ee61cfb33b24 (diff) | |
download | third_party-func-d3edd527c9fff9878745204d4f0e5f191d883810.tar.gz third_party-func-d3edd527c9fff9878745204d4f0e5f191d883810.tar.xz third_party-func-d3edd527c9fff9878745204d4f0e5f191d883810.zip |
make testing from a src checkout work again
default to building from local checkout, and "make install"
instead of using an rpm
Diffstat (limited to 'test/test-it.sh')
-rwxr-xr-x | test/test-it.sh | 44 |
1 files changed, 33 insertions, 11 deletions
diff --git a/test/test-it.sh b/test/test-it.sh index fd93d62..6660739 100755 --- a/test/test-it.sh +++ b/test/test-it.sh @@ -22,7 +22,10 @@ RPM_PATH=`pwd` BUILD=Y # do we do a fresh pull from git to build -BUILD_FROM_FRESH_CHECKOUT=Y +BUILD_FROM_FRESH_CHECKOUT=N + +# do we build/uninstall via rpms? +INSTALL_VIA_RPMS=N # should we backup existing func pki setup, since # we are going to be deleting it from the normal spot? @@ -57,6 +60,8 @@ check_out_code() build_rpm() { + + PKG=$1 BRT=$2 echo;echo;echo @@ -82,20 +87,29 @@ build_rpm() fi } -uninstall_the_func() +uninstall_the_func_rpm() { + msg "Removing the func rpm, if there is one" # just one package for now, easy enough rpm -e func } -install_the_func() +install_the_func_rpm() { + msg "Installing the func rpm" rpm -Uvh $RPM_PATH/rpms/func* STATUS=$? # do something with the status } +install_the_func() +{ + msg "Installing func directly" + pushd $1 + make install +} + find_the_func() { INSTALLED_FUNC=`rpm -q func` @@ -229,22 +243,30 @@ if [ "$BUILD" == "Y" ] ; then check_out_code else # assume we are running from the test dir - BUILD_PATH="`pwd`/../../" + BUILD_PATH="`pwd`/../" fi - # FIXME: red hat specifc - build_rpm func $BUILD_PATH - #if we are building, then we should remove the installed - # versiones as well, and install the new - uninstall_the_func + if [ "$INSTALL_VIA_RPMS" == "Y" ] ; then + # FIXME: red hat specifc + build_rpm func $BUILD_PATH - install_the_func + #if we are building, then we should remove the installed + # versiones as well, and install the new + uninstall_the_func_rpm + + install_the_func_rpm + else + uninstall_the_func_rpm + install_the_func $BUILD_PATH + fi fi # see if func is install # see if funcd is install -find_the_func +if [ "$INSTALL_VIA_RPMS" == "Y" ] ; then + find_the_func +fi if [ "$BACKUP_FUNC_PKI" == "Y" ] ; then backup_the_secret_of_the_func |