Skip to contentSkip to conversation

cri-args-hostlists: Allow environment to control OSSTEST_CONFIG

PATCH In review Ian Campbell 2 participants 6 messages Jan 22, 2014 – Apr 17, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cri-args-hostlists: Allow environment to control OSSTEST_CONFIG

---
 cri-args-hostlists | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
cri-args-hostlists +1 -1
index 9f34e4a..4f7ddf2 100644
@@ -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
Signature · 1 line
1.8.5.2
#1 lore raw

ping.

Quoted 18 lines · Ian Campbell
---
 cri-args-hostlists | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
cri-args-hostlists +1 -1
index 9f34e4a..4f7ddf2 100644
@@ -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
Acked-by
#2 lore raw

Ian Campbell writes ("Re: [PATCH OSSTEST] cri-args-hostlists: Allow environment to control OSSTEST_CONFIG"):

Quoted 5 lines

ping.

cri-args-hostlists line 20

Quoted 2 lines · Ian Campbell
cri-args-hostlists +1 -1
-export OSSTEST_CONFIG=production-config
+export OSSTEST_CONFIG=${OSSTEST_CONFIG:-production-config}
#3 lore raw
In reply to Ian Campbell
Quoted 1 line · Ian Campbell

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?)

Quoted 17 lines
---
 cri-args-hostlists | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
cri-args-hostlists +1 -1
index 9f34e4a..4f7ddf2 100644
@@ -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
#4 lore raw

Ian Campbell writes ("Re: [PATCH OSSTEST] cri-args-hostlists: Allow environment to control OSSTEST_CONFIG"):

Quoted 6 lines · Ian Campbell
Quoted 1 line

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.

Quoted 3 lines

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

#5 lore raw
Quoted 9 lines · Ian Jackson

Ian Campbell writes ("Re: [PATCH OSSTEST] cri-args-hostlists: Allow environment to control OSSTEST_CONFIG"):

Quoted 6 lines · Ian Campbell
Quoted 1 line

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...