mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Improve caching related tests to make them faster and test the situation closer to what actually happens during explicit module build. Most noticable changes are: * Avoid swift stdlib dependency during the tests to save time * Use dependency scanner output to construct test cases * Update old test cases that try to simulate caching from file system inputs to using only CAS inputs.
18 lines
338 B
Python
Executable File
18 lines
338 B
Python
Executable File
#!/usr/bin/env python3
|
|
#
|
|
# Usage: ExtractOutputKey.py file.json InputPath
|
|
|
|
import json
|
|
import sys
|
|
|
|
input_json = sys.argv[1]
|
|
input_path = sys.argv[2]
|
|
|
|
|
|
with open(input_json, 'r') as file:
|
|
entries = json.load(file)
|
|
for entry in entries:
|
|
if entry['Input'] != input_path:
|
|
continue
|
|
print(entry['CacheKey'])
|