Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/tests/complex/gtfs_mitte/runner.py
169678 views
1
#!/usr/bin/env python
2
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3
# Copyright (C) 2011-2025 German Aerospace Center (DLR) and others.
4
# This program and the accompanying materials are made available under the
5
# terms of the Eclipse Public License 2.0 which is available at
6
# https://www.eclipse.org/legal/epl-2.0/
7
# This Source Code may also be made available under the following Secondary
8
# Licenses when the conditions for such availability set forth in the Eclipse
9
# Public License 2.0 are satisfied: GNU General Public License, version 2
10
# or later which is available at
11
# https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13
14
# @file runner.py
15
# @author Michael Behrisch
16
# @date 2022-10-27
17
18
from __future__ import absolute_import
19
from __future__ import print_function
20
21
import os
22
import sys
23
import subprocess
24
import datetime
25
26
TOOLS = os.path.join(os.environ["SUMO_HOME"], "tools")
27
28
# the following two lines are basically a hack to save the osm data on the test server for later inspection
29
osm_history = os.path.join(os.environ.get("SUMO_REPORT", ""), datetime.datetime.now().strftime("%Y-%m-%d-%H-%M-%S"))
30
out_dir = osm_history if os.environ.get("FILEPREFIX") == "gcc4_64" else "test"
31
subprocess.call([sys.executable,
32
os.path.join(TOOLS, "osmWebWizard.py"), "-b=7:0:0", "-e=8:0:0",
33
"--bbox=13.381507,52.511801,13.417790,52.527748", "--test-output", out_dir,
34
"-n=--aggregate-warnings=0", "--remote"])
35
subprocess.call([sys.executable,
36
os.path.join(TOOLS, "import", "gtfs", "gtfs2pt.py"),
37
"-n", os.path.join(out_dir, "osm.net.xml.gz")] + sys.argv[1:])
38
39