Skip to content

Commit

Permalink
SR-7309: Add tests for -static-executable on Linux
Browse files Browse the repository at this point in the history
- Add extra test using Dispatch with -static-executable.
  • Loading branch information
spevans committed Oct 4, 2020
1 parent 3ceb61d commit c4c57c8
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test-static-executable/dispatch-static-executable.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import Dispatch

let queue = DispatchQueue(label: "queuename", attributes: .concurrent)
queue.sync {
print("Dispatch")
}
9 changes: 9 additions & 0 deletions test-static-executable/dispatch-static-executable.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
REQUIRES: platform=Linux
RUN: rm -rf %t
RUN: mkdir -p %t
RUN: %{swiftc} -static-executable -lDispatchStubs -lbsd -o %t/dispatch_test %S/dispatch-static-executable.swift
RUN: %t/dispatch_test | %{FileCheck} %s
RUN: file %t/dispatch_test | %{FileCheck} %s --check-prefix=FILE
CHECK: Dispatch
FILE: , statically linked,

1 change: 1 addition & 0 deletions test-static-executable/static-executable.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
print("OK")
8 changes: 8 additions & 0 deletions test-static-executable/static-executable.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
REQUIRES: platform=Linux
RUN: rm -rf %t
RUN: mkdir -p %t
RUN: %{swiftc} -static-executable -o %t/static_executable %S/static-executable.swift
RUN: %t/static_executable | %{FileCheck} %s
RUN: file %t/static_executable | %{FileCheck} %s --check-prefix=FILE
CHECK: OK
FILE: , statically linked,

0 comments on commit c4c57c8

Please sign in to comment.