Skip to content

Commit f556ee5

Browse files
committed
Added a few initial tests for swift_driver.
These tests currently only exercise the "swift_driver -driver-print-actions" functionality, but at this point that is the only part of the driver which is reasonably testable without the expectation that tests will break as output formats change. Swift SVN r10934
1 parent ed20385 commit f556ee5

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

test/Driver/actions.swift

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// RUN: %swift_driver -driver-print-actions %s 2>&1 | FileCheck %s -check-prefix=BASIC
2+
// BASIC: 0: input, "{{.*}}actions.swift", swift
3+
// BASIC: 1: compile, {0}, object
4+
// BASIC: 2: link, {1}, image
5+
6+
// RUN: %swift_driver -driver-print-actions -c %s 2>&1 | FileCheck %s -check-prefix=BASICC
7+
// BASICC: 0: input, "{{.*}}actions.swift", swift
8+
// BASICC: 1: compile, {0}, object
9+
10+
// RUN: %swift_driver -driver-print-actions -emit-sil %s 2>&1 | FileCheck %s -check-prefix=BASICSIL
11+
// BASICSIL: 0: input, "{{.*}}actions.swift", swift
12+
// BASICSIL: 1: compile, {0}, sil
13+
14+
// RUN: %swift_driver -driver-print-actions -emit-silgen %s 2>&1 | FileCheck %s -check-prefix=BASICSILGEN
15+
// BASICSILGEN: 0: input, "{{.*}}actions.swift", swift
16+
// BASICSILGEN: 1: compile, {0}, sil
17+
18+
// RUN: %swift_driver -driver-print-actions -S %s 2>&1 | FileCheck %s -check-prefix=BASICASM
19+
// BASICASM: 0: input, "{{.*}}actions.swift", swift
20+
// BASICASM: 1: compile, {0}, assembly
21+
22+
// RUN: %swift_driver -driver-print-actions %S/Inputs/main.swift %S/Inputs/empty.swift %s 2>&1 | FileCheck %s -check-prefix=MULTI
23+
// MULTI: 0: input, "{{.*}}Inputs/main.swift", swift
24+
// MULTI: 1: compile, {0}, object
25+
// MULTI: 2: input, "{{.*}}Inputs/empty.swift", swift
26+
// MULTI: 3: compile, {2}, object
27+
// MULTI: 4: input, "{{.*}}actions.swift", swift
28+
// MULTI: 5: compile, {4}, object
29+
// MULTI: 6: link, {1, 3, 5}, image

0 commit comments

Comments
 (0)