Skip to content

Commit

Permalink
[CodeCompletion] Fix non-determinisc failures in dependency check tes…
Browse files Browse the repository at this point in the history
…t cases

Sleep a few seconds to ensure the timestamp of the modified files are
different from the last completion.

rdar://problem/62923248
  • Loading branch information
rintaro committed May 27, 2020
1 parent a676a37 commit ad51f4f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions test/SourceKit/CodeComplete/complete_checkdeps_bridged.swift
Expand Up @@ -5,7 +5,6 @@ func foo() {
/*HERE*/
}

// REQUIRES: rdar62923248
// REQUIRES: shell

// RUN: %empty-directory(%t/Frameworks)
Expand Down Expand Up @@ -36,8 +35,8 @@ func foo() {
// RUN: -req=complete -pos=5:3 %s -- ${COMPILER_ARGS[@]} == \

// RUN: -shell -- echo '### Modify bridging header library file' == \
// RUN: -shell -- cp -R $INPUT_DIR/MyProject_mod/LocalCFunc.h %t/MyProject/ == \
// RUN: -shell -- sleep $SLEEP_TIME == \
// RUN: -shell -- cp -R $INPUT_DIR/MyProject_mod/LocalCFunc.h %t/MyProject/ == \
// RUN: -req=complete -pos=5:3 %s -- ${COMPILER_ARGS[@]} == \

// RUN: -shell -- echo '### Fast completion' == \
Expand Down
Expand Up @@ -5,7 +5,6 @@ func foo() {
/*HERE*/
}

// REQUIRES: rdar62923248
// REQUIRES: shell

// RUN: %empty-directory(%t/Frameworks)
Expand Down Expand Up @@ -36,8 +35,8 @@ func foo() {
// RUN: -req=complete -pos=5:3 %s -- ${COMPILER_ARGS[@]} == \

// RUN: -shell -- echo '### Modify framework (c)' == \
// RUN: -shell -- cp -R $INPUT_DIR/ClangFW.framework_mod/* %t/Frameworks/ClangFW.framework/ == \
// RUN: -shell -- sleep $SLEEP_TIME == \
// RUN: -shell -- cp -R $INPUT_DIR/ClangFW.framework_mod/* %t/Frameworks/ClangFW.framework/ == \
// RUN: -req=complete -pos=5:3 %s -- ${COMPILER_ARGS[@]} == \

// RUN: -shell -- echo '### Fast completion' == \
Expand Down
Expand Up @@ -5,7 +5,6 @@ func foo() {
/*HERE*/
}

// REQUIRES: rdar62923248
// REQUIRES: shell

// RUN: %empty-directory(%t/Frameworks)
Expand Down Expand Up @@ -36,8 +35,8 @@ func foo() {
// RUN: -req=complete -pos=5:3 %s -- ${COMPILER_ARGS[@]} == \

// RUN: -shell -- echo "### Modify local library file" == \
// RUN: -shell -- cp -R $INPUT_DIR/MyProject_mod/Library.swift %t/MyProject/ == \
// RUN: -shell -- sleep $SLEEP_TIME == \
// RUN: -shell -- cp -R $INPUT_DIR/MyProject_mod/Library.swift %t/MyProject/ == \
// RUN: -req=complete -pos=5:3 %s -- ${COMPILER_ARGS[@]} == \

// RUN: -shell -- echo '### Fast completion' == \
Expand Down
Expand Up @@ -5,7 +5,6 @@ func foo() {
/*HERE*/
}

// REQUIRES: rdar62923248
// REQUIRES: shell

// RUN: %empty-directory(%t/Frameworks)
Expand Down Expand Up @@ -36,8 +35,8 @@ func foo() {
// RUN: -req=complete -pos=5:3 %s -- ${COMPILER_ARGS[@]} == \

// RUN: -shell -- echo '### Modify framework (s)' == \
// RUN: -shell -- %target-swift-frontend -emit-module -module-name SwiftFW -o %t/Frameworks/SwiftFW.framework/Modules/SwiftFW.swiftmodule/%target-swiftmodule-name $INPUT_DIR/SwiftFW_src_mod/Funcs.swift == \
// RUN: -shell -- sleep $SLEEP_TIME == \
// RUN: -shell -- %target-swift-frontend -emit-module -module-name SwiftFW -o %t/Frameworks/SwiftFW.framework/Modules/SwiftFW.swiftmodule/%target-swiftmodule-name $INPUT_DIR/SwiftFW_src_mod/Funcs.swift == \
// RUN: -req=complete -pos=5:3 %s -- ${COMPILER_ARGS[@]} == \

// RUN: -shell -- echo '### Fast completion' == \
Expand Down

0 comments on commit ad51f4f

Please sign in to comment.