mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[sourcekitd-test] Add options to repeat a request and ignore its output
This provides a very rudimentary way to check the end-to-end performance of simple sourcekitd requests. A sample invocation might be ``` sourcekitd-test -time-request -repeat-request=10 -dont-print-response -req= ... ```
This commit is contained in:
12
test/SourceKit/Misc/repeat-request.swift
Normal file
12
test/SourceKit/Misc/repeat-request.swift
Normal file
@@ -0,0 +1,12 @@
|
||||
// RUN: %sourcekitd-test -repeat-request=5 -req=version | %FileCheck %s
|
||||
// RUN: %sourcekitd-test -repeat-request=5 -json-request-path %S/Inputs/version_request.json | %FileCheck %s
|
||||
// CHECK: key.version_major
|
||||
// CHECK: key.version_major
|
||||
// CHECK: key.version_major
|
||||
// CHECK: key.version_major
|
||||
// CHECK: key.version_major
|
||||
// CHECK-NOT: key.version_major
|
||||
|
||||
// RUN: not %sourcekitd-test -repeat-request=0 -req=version 2>&1 | %FileCheck %s -check-prefix=ERROR
|
||||
// RUN: not %sourcekitd-test -repeat-request="asdf" -req=version 2>&1 | %FileCheck %s -check-prefix=ERROR
|
||||
// ERROR: error:
|
||||
Reference in New Issue
Block a user