From 81602ab79f31d2056a3c52daacb570ab84a10d9d Mon Sep 17 00:00:00 2001
From: Navid Nikaein <navid.nikaein@eurecom.fr>
Date: Thu, 4 Dec 2014 10:16:58 +0000
Subject: [PATCH] check the OAI ENV VARS in the pre-ci test

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6153 818b1a75-f10b-46b9-bf7c-635c3b92a50f
---
 targets/TEST/OAI/test01.py | 18 ++++++++++++++++++
 targets/TEST/OAI/test02.py | 18 ++++++++++++++++++
 2 files changed, 36 insertions(+)

diff --git a/targets/TEST/OAI/test01.py b/targets/TEST/OAI/test01.py
index 8a4ccd228a..7dbebbbc7e 100644
--- a/targets/TEST/OAI/test01.py
+++ b/targets/TEST/OAI/test01.py
@@ -77,6 +77,24 @@ for arg in sys.argv:
         sys.exit()
     i= i + 1     
 
+try:  
+   os.environ["OPENAIR1_DIR"]
+except KeyError: 
+   print "Please set the environment variable OPENAIR1_DIR in the .bashrc"
+   sys.exit(1)
+
+try:  
+   os.environ["OPENAIR2_DIR"]
+except KeyError: 
+   print "Please set the environment variable OPENAIR2_DIR in the .bashrc"
+   sys.exit(1)
+
+try:  
+   os.environ["OPENAIR_TARGETS"]
+except KeyError: 
+   print "Please set the environment variable OPENAIR_TARGETS in the .bashrc"
+   sys.exit(1)
+
 # get the oai object
 host = os.uname()[1]
 oai = openair('localdomain','localhost')
diff --git a/targets/TEST/OAI/test02.py b/targets/TEST/OAI/test02.py
index 27c07b17d8..c76b7480e7 100644
--- a/targets/TEST/OAI/test02.py
+++ b/targets/TEST/OAI/test02.py
@@ -79,6 +79,24 @@ for arg in sys.argv:
         sys.exit()
     i= i + 1     
 
+try:  
+   os.environ["OPENAIR1_DIR"]
+except KeyError: 
+   print "Please set the environment variable OPENAIR1_DIR in the .bashrc"
+   sys.exit(1)
+
+try:  
+   os.environ["OPENAIR2_DIR"]
+except KeyError: 
+   print "Please set the environment variable OPENAIR2_DIR in the .bashrc"
+   sys.exit(1)
+
+try:  
+   os.environ["OPENAIR_TARGETS"]
+except KeyError: 
+   print "Please set the environment variable OPENAIR_TARGETS in the .bashrc"
+   sys.exit(1)
+
 host = os.uname()[1]
 # get the oai object
 oai = openair('localdomain','localhost')
-- 
GitLab