Files
swift-mirror/test/CAS/cas_output_backend.swift
Steven Wu b78b569450 [CAS] Consolidate compile cache flags
Rename `-enable-cas` to `-compile-cache-job` to align with clang option
names and promote that to a new driver only flag.

Few other additions to driver flag for caching behaviors:
* `-compile-cache-remarks`: now cache hit/miss remarks are guarded behind
  this flag
* `-compile-cache-skip`: skip replaying from the cache. Useful as a
  debugging tool to do the compilation using CAS inputs even the output
  is a hit from the cache.
2023-06-26 10:34:27 -07:00

19 lines
943 B
Swift

// RUN: %empty-directory(%t)
// RUN: mkdir -p %t/cas
// RUN: not %target-swift-frontend -c -cache-compile-job -cas-path %t/cas %s -o %t/test.o 2>&1 | %FileCheck %s --check-prefix=NO-CASFS
// NO-CASFS: caching is enabled without -cas-fs option
// RUN: %target-swift-frontend -c -cache-compile-job -cas-path %t/cas %s -o %t/test.o -allow-unstable-cache-key-for-testing
// RUN: %cache-tool -cas-path %t/cas -cache-tool-action print-output-keys -- \
// RUN: %target-swift-frontend -c -cache-compile-job -cas-path %t/cas %s -o %t/test.o -allow-unstable-cache-key-for-testing > %t/cache_key.json
// RUN: %cache-tool -cas-path %t/cas -cache-tool-action validate-outputs %t/cache_key.json
/// make sure validate fails if the cas is cleared.
// RUN: rm -rf %t/cas
// RUN: not %cache-tool -cas-path %t/cas -cache-tool-action validate-outputs %t/cache_key.json 2>&1 | %FileCheck %s
// CHECK: failed to find output for cache key
func testFunc() {}