Skip to content

Commit 704f11c

Browse files
[Test] Fix a typo in the test util python script
Fix the typo in GenerateExplicitModuleMap.py where the modulePath is mis-spelled. Use the module path from the dependency output json file directly instead, which means the script can be used to generate non-caching build module map as well since the module path actually matters for those builds.
1 parent 8f6ad4c commit 704f11c

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

test/CAS/Inputs/GenerateExplicitModuleMap.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@
2424
module["moduleName"] = name
2525
module["isFramework"] = False
2626
if kind == "clang":
27-
module["clangModulePath"] = name + ".pcm"
28-
module["clangModuleCacheKey"] = detail['details'][kind]["moduleCacheKey"]
27+
module["clangModulePath"] = detail['modulePath']
28+
if "moduleCacheKey" in detail['details'][kind]:
29+
module["clangModuleCacheKey"] = detail['details'][kind]["moduleCacheKey"]
2930
else:
30-
module["modulePath"] = name + ".swiftmdoule"
31-
module["moduleCacheKey"] = detail['details'][kind]["moduleCacheKey"]
31+
module["modulePath"] = detail['modulePath']
32+
if "moduleCacheKey" in detail['details'][kind]:
33+
module["moduleCacheKey"] = detail['details'][kind]["moduleCacheKey"]
3234

3335
modules.append(module)
3436

test/CAS/module_trace.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
// RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/test.swiftdeps > %t/test-processed.swiftdeps
4545
// RUN: %FileCheck %s --check-prefix=SWIFTDEPS --input-file=%t/test-processed.swiftdeps
4646
// SWIFTDEPS: A.swiftinterface
47-
// SWIFTDEPS: B.swiftmdoule
47+
// SWIFTDEPS: B.swiftmodule
4848

4949

5050
//--- main.swift

0 commit comments

Comments
 (0)