Files
swift-mirror/test/Index/Store/unit-one-sourcefile-remapped.swift
Ben Barham 10f43a8365 [Index] Convert to hashing to HashBuilder with BLAKE3
`Hashing.h` is non-deterministic between runs. Update the index hashing
to use BLAKE3 for the record hash. xxhash is faster in benchmarks that
I've found, but there's no easy `HashBuilder` option for it today.
2024-10-31 14:46:00 +10:00

28 lines
1.2 KiB
Swift

// RUN: %empty-directory(%t)
// RUN: mkdir -p %t/BuildRoot && cd %t/BuildRoot
// Check paths are mapped
// RUN: %target-swift-frontend -index-store-path %t/idx -file-prefix-map %S=REMAPPED_SRC_ROOT -file-prefix-map %t=REMAPPED_OUT_DIR %s -o %t/file1.o -typecheck
// RUN: c-index-test core -print-unit %t/idx > %t/units.out
// Check round-trip remapping to make sure they're converted back to the local paths
// RUN: c-index-test core -print-unit %t/idx -index-store-prefix-map REMAPPED_SRC_ROOT=%S -index-store-prefix-map REMAPPED_OUT_DIR=%t >> %t/units.out
// RUN: %FileCheck %s --dump-input-filter all < %t/units.out
// CHECK: file1.o-[[UNIT_HASH:.*$]]
// CHECK: --------
// CHECK: main-path: REMAPPED_SRC_ROOT{{/|\\}}unit-one-sourcefile-remapped.swift
// CHECK: work-dir: REMAPPED_OUT_DIR{{/|\\}}BuildRoot
// CHECK: out-file: REMAPPED_OUT_DIR{{/|\\}}file1.o
// CHECK: DEPEND START
// CHECK: Unit | system | Swift | {{BUILD_DIR|.*lib\\swift\\windows}}{{.*}}Swift.swiftmodule
// CHECK: DEPEND END
// CHECK: file1.o-[[UNIT_HASH]]
// CHECK: --------
// CHECK: main-path: SOURCE_DIR{{/|\\}}test{{/|\\}}Index{{/|\\}}Store{{/|\\}}unit-one-sourcefile-remapped.swift
// CHECK-NOT: work-dir: REMAPPED_OUT_DIR
// CHECK-NOT: file1.o-[[UNIT_HASH]]