Skip to content

[Test] Fix a typo in the test util python script #78475

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions test/CAS/Inputs/GenerateExplicitModuleMap.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

modules = []

with open(input_json, 'r') as file:
with open(input_json, "r") as file:
deps = json.load(file)
main_module_name = deps['mainModuleName']
module_names = deps['modules'][::2]
module_details = deps['modules'][1::2]
main_module_name = deps["mainModuleName"]
module_names = deps["modules"][::2]
module_details = deps["modules"][1::2]
# add all modules other than the main module into the module map.
for name, detail in zip(module_names, module_details):
kind, name = list(name.items())[0]
Expand All @@ -24,11 +24,15 @@
module["moduleName"] = name
module["isFramework"] = False
if kind == "clang":
module["clangModulePath"] = name + ".pcm"
module["clangModuleCacheKey"] = detail['details'][kind]["moduleCacheKey"]
module["clangModulePath"] = detail["modulePath"]
if "moduleCacheKey" in detail["details"][kind]:
module["clangModuleCacheKey"] = detail["details"][kind][
"moduleCacheKey"
]
else:
module["modulePath"] = name + ".swiftmdoule"
module["moduleCacheKey"] = detail['details'][kind]["moduleCacheKey"]
module["modulePath"] = detail["modulePath"]
if "moduleCacheKey" in detail["details"][kind]:
module["moduleCacheKey"] = detail["details"][kind]["moduleCacheKey"]

modules.append(module)

Expand Down
2 changes: 1 addition & 1 deletion test/CAS/module_trace.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
// RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/test.swiftdeps > %t/test-processed.swiftdeps
// RUN: %FileCheck %s --check-prefix=SWIFTDEPS --input-file=%t/test-processed.swiftdeps
// SWIFTDEPS: A.swiftinterface
// SWIFTDEPS: B.swiftmdoule
// SWIFTDEPS: B.swiftmodule


//--- main.swift
Expand Down