Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/tests/netedit/scripts/updateTestsuiteFiles.py
193874 views
1
#!/usr/bin/env python
2
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3
# Copyright (C) 2025-2026 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 updateTestsuiteFiles.py
15
# @author Pablo Alvarez Lopez
16
# @date 2025-12-05
17
18
import os
19
20
if __name__ == "__main__":
21
target_files = [
22
"testsuite.netedit.external",
23
"testsuite.netedit.internal",
24
"testsuite.neteditoutput"
25
]
26
27
current_dir = os.path.dirname(os.path.abspath(__file__))
28
base_dir = os.path.normpath(os.path.join(current_dir, '..'))
29
30
print(f"Starting scan in: {base_dir}")
31
32
for root, dirs, files in os.walk(base_dir):
33
dirs[:] = [d for d in dirs if not d.startswith('.') and d != 'scripts' and d != '__pycache__']
34
dirs.sort()
35
36
if dirs:
37
for filename in target_files:
38
file_path = os.path.join(root, filename)
39
print(f"Updating {filename} in {root}")
40
with open(file_path, 'w') as f:
41
f.write("\n\n".join(dirs) + "\n")
42
43