aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2020-04-27 22:10:30 +0100
committerJon Turney <jon.turney@dronecode.org.uk>2020-04-30 20:41:36 +0100
commit630cfd84ad9fd924ea56ccbf69cf37b040b2b3d3 (patch)
treed744f3f159dfe0aaa4181fd2aa3075fce5a43e00 /tools
parent3cff11a75b4af8824281b473bda1f8c45a4add7d (diff)
downloadmeson-630cfd84ad9fd924ea56ccbf69cf37b040b2b3d3.zip
meson-630cfd84ad9fd924ea56ccbf69cf37b040b2b3d3.tar.gz
meson-630cfd84ad9fd924ea56ccbf69cf37b040b2b3d3.tar.bz2
Update dircondenser.py tool to update paths in test.json as well
Update dircondenser.py tool to update paths appearing in the expected stdout in test.json when the containing directory is renamed.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/dircondenser.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/dircondenser.py b/tools/dircondenser.py
index 023c14e..0e28bec 100755
--- a/tools/dircondenser.py
+++ b/tools/dircondenser.py
@@ -74,6 +74,10 @@ def condense(dirname: str):
#print('git mv "%s" "%s"' % (old_name, new_name))
subprocess.check_call(['git', 'mv', old_name, new_name])
replacements.append((old_name, new_name))
+ # update any appearances of old_name in expected stdout in test.json
+ json = os.path.join(new_name, 'test.json')
+ if os.path.isfile(json):
+ replace_source(json, [(old_name, new_name)])
os.chdir(curdir)
replace_source('run_unittests.py', replacements)
replace_source('run_project_tests.py', replacements)