# This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # See http://www.salome-platform.org/ or email : [email protected] # import sys, signal, string, commands import subprocess import runSalome import setenv # get SALOME environment : # here we need KERNEL_ROOT_DIR, PATH, LD_LIBRARY_PATH args, modules_list, modules_root_dir = setenv.get_config() setenv.set_env(args, modules_list, modules_root_dir) # execute Unit Test command = ['./TestSALOMELocalTrace'] ret = subprocess.call(command) # no process to kill exit(ret)
kill_salome(args) save_config = True if args.has_key('save_config'): save_config = args['save_config'] # -- test = True if args['wake_up_session']: test = False pass if test: from searchFreePort import searchFreePort searchFreePort(args, save_config, args.get('useport')) pass # -- #setenv.main() setenv.set_env(args, modules_list, modules_root_dir) clt = useSalome(args, modules_list, modules_root_dir) return clt,args # ----------------------------------------------------------------------------- def foreGround(clt, args): # -- if "session_object" not in args: return session = args["session_object"] # -- # Wait until gui is arrived # tmax = nbtot * dt # -- gui_detected = False
#!/usr/bin/env python from sumolib import checkBinary import os import subprocess import sys from setenv import set_env set_env() sumoBinary = checkBinary('sumo') retcode = subprocess.call( [os.environ.get("SUMO_HOME") + "sumo", "-c", "data/quickstart.sumocfg"], stdout=sys.stdout, stderr=sys.stderr) print(">> Simulation closed with status %s" % retcode) sys.stdout.flush()