[Xen-devel,OSSTEST] cri-args-hostlists: Allow environment to control OSSTEST_CONFIG

Message ID 1390408763-16035-1-git-send-email-ian.campbell@citrix.com
State New
Headers show

Commit Message

Ian Campbell Jan. 22, 2014, 4:39 p.m.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 cri-args-hostlists | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ian Campbell March 17, 2014, 1:02 p.m. | #1
ping.

On Wed, 2014-01-22 at 16:39 +0000, Ian Campbell wrote:
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> ---
>  cri-args-hostlists | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/cri-args-hostlists b/cri-args-hostlists
> index 9f34e4a..4f7ddf2 100644
> --- a/cri-args-hostlists
> +++ b/cri-args-hostlists
> @@ -17,7 +17,7 @@
>  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
>  
> 
> -export OSSTEST_CONFIG=production-config
> +export OSSTEST_CONFIG=${OSSTEST_CONFIG:-production-config}
>  
>  check_stop_core () {
>  	if [ "x$OSSTEST_IGNORE_STOP" = xy ]; then return; fi
Ian Jackson March 17, 2014, 3:45 p.m. | #2
Ian Campbell writes ("Re: [PATCH OSSTEST] cri-args-hostlists: Allow environment to control OSSTEST_CONFIG"):
> ping.
> 
> On Wed, 2014-01-22 at 16:39 +0000, Ian Campbell wrote:
> > -export OSSTEST_CONFIG=production-config
> > +export OSSTEST_CONFIG=${OSSTEST_CONFIG:-production-config}

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell March 21, 2014, 11:25 a.m. | #3
On Wed, 2014-01-22 at 16:39 +0000, Ian Campbell wrote:
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>

Actually, it turns out that this is still kind of annoying since I need
to explicitly say OSSTEST_CONFIG=~/.xen-osstest/config, which is
different to all the other scripts (at least the ones I've used)

Would it be safe to change this default (or better yet, libraryize it)?
Something would need to set OSSTEST_CONFIG=production-config for the
cronjobs, not sure where best to do it though (in crontab?)

> ---
>  cri-args-hostlists | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/cri-args-hostlists b/cri-args-hostlists
> index 9f34e4a..4f7ddf2 100644
> --- a/cri-args-hostlists
> +++ b/cri-args-hostlists
> @@ -17,7 +17,7 @@
>  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
>  
> 
> -export OSSTEST_CONFIG=production-config
> +export OSSTEST_CONFIG=${OSSTEST_CONFIG:-production-config}
>  
>  check_stop_core () {
>  	if [ "x$OSSTEST_IGNORE_STOP" = xy ]; then return; fi
Ian Jackson March 21, 2014, noon | #4
Ian Campbell writes ("Re: [PATCH OSSTEST] cri-args-hostlists: Allow environment to control OSSTEST_CONFIG"):
> On Wed, 2014-01-22 at 16:39 +0000, Ian Campbell wrote:
> > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> 
> Actually, it turns out that this is still kind of annoying since I need
> to explicitly say OSSTEST_CONFIG=~/.xen-osstest/config, which is
> different to all the other scripts (at least the ones I've used)

Hrm.

> Would it be safe to change this default (or better yet, libraryize it)?
> Something would need to set OSSTEST_CONFIG=production-config for the
> cronjobs, not sure where best to do it though (in crontab?)

I guess it could be in the crontab.  Maybe
osstest:~osstest/.xen-osstest/config should be made to exist and
contain a syntax error.

Ian.
PS osstest osstest osstest osstest osstest
Ian Campbell April 17, 2014, 10:22 a.m. | #5
On Fri, 2014-03-21 at 12:00 +0000, Ian Jackson wrote:
> Ian Campbell writes ("Re: [PATCH OSSTEST] cri-args-hostlists: Allow environment to control OSSTEST_CONFIG"):
> > On Wed, 2014-01-22 at 16:39 +0000, Ian Campbell wrote:
> > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> > 
> > Actually, it turns out that this is still kind of annoying since I need
> > to explicitly say OSSTEST_CONFIG=~/.xen-osstest/config, which is
> > different to all the other scripts (at least the ones I've used)
> 
> Hrm.

BTW, "standalone: force an explicit default config" essentially fixes
this for me, at least for the cases which I found annoying...

Patch

diff --git a/cri-args-hostlists b/cri-args-hostlists
index 9f34e4a..4f7ddf2 100644
--- a/cri-args-hostlists
+++ b/cri-args-hostlists
@@ -17,7 +17,7 @@ 
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-export OSSTEST_CONFIG=production-config
+export OSSTEST_CONFIG=${OSSTEST_CONFIG:-production-config}
 
 check_stop_core () {
 	if [ "x$OSSTEST_IGNORE_STOP" = xy ]; then return; fi