8 Commits

Author SHA1 Message Date
Anthony Latsis
0a1b8b0d50 [test] Fix misspelled FileCheck directives 2025-05-29 15:09:36 +01:00
Xi Ge
c0e6204363 test: xfail failing sourcekitd tests in CI
rdar://72466352
2020-12-18 07:19:02 -08:00
Ben Barham
34ff514ab1 [SourceKit] Fix flakey completion tests
A previous change updated the checkdep tests to move the sleep before
copying over files. This fixed cases where the modification time would
be the same second as the dependency check. Unfortunately this
introduced a slightly different form of flakiness - if the sleep went
too long, the completion that was meant to re-use the AST would see that
it's time to check dependencies and thus skip the fast completion path.

One fix for that would be to add a smaller sleep before, a longer sleep
after, and increase the dependency check time. That increases the
runtime of the tests even further though, so instead just update the
timestamps manually to be in the past/future in order to invoke the path
we want to test. This also allows a 0 dependency check time (ie. always
check), which makes the tests even faster.

Resolves rdar://71861446
2020-12-10 14:51:55 +10:00
Rintaro Ishizaki
77b4f75608 [SourceKit] Reorgantize code completion options
* Abolish 'reuseastcontext' per-request option
* Add 'MaxASTContextReuseCount' global configuration
2020-09-03 19:30:05 -07:00
Rintaro Ishizaki
ad51f4f1a8 [CodeCompletion] Fix non-determinisc failures in dependency check test cases
Sleep a few seconds to ensure the timestamp of the modified files are
different from the last completion.

rdar://problem/62923248
2020-05-27 08:58:14 -07:00
Rintaro Ishizaki
6116f7d528 [CodeCompletion] Disable fast-completion dependecy checking test cases
while investigating.

rdar://problem/62923248
2020-05-20 09:07:00 -07:00
Rintaro Ishizaki
e32de789ff [Tests] Mark check dependency tests cases 'REQUIRES: shell'
These test cases use shell variables etc.
2020-05-04 13:02:09 -07:00
Rintaro Ishizaki
05a87e86c4 [CodeCompletion] Give up fast-completion if dependent files are modified
Check if dependencies are modified since the last checking.
Dependencies:

 - Other source files in the current module
 - Dependent files collected by the dependency tracker

When:

 - If the last dependency check was over N (defaults to 5) seconds ago

Invalidate if:

 - The dependency file is missing
 - The modification time of the dependecy is greater than the last check
 - If the modification time is zero, compare the content using the file
   system from the previous completion and the current completion

rdar://problem/62336432
2020-05-04 13:02:09 -07:00