Skip to content

Commit 25619a6

Browse files
committed
Merge pull request #793 from modocache/add-python-code-headers-test-driver
[test][Driver] Add code headers to Python files
2 parents 6c7d06e + cf710ca commit 25619a6

File tree

7 files changed

+95
-8
lines changed

7 files changed

+95
-8
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
#!/usr/bin/env python
2+
# fail.py - Just exits with an error code -*- python -*-
3+
#
4+
# This source file is part of the Swift.org open source project
5+
#
6+
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
7+
# Licensed under Apache License v2.0 with Runtime Library Exception
8+
#
9+
# See http://swift.org/LICENSE.txt for license information
10+
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
211

312
exit(1)

test/Driver/Dependencies/Inputs/fake-build-for-bitcode.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
11
#!/usr/bin/env python
2-
2+
# fake-build-for-bitcode.py - Fake build with -embed-bitcode -*- python -*-
3+
#
4+
# This source file is part of the Swift.org open source project
5+
#
6+
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
7+
# Licensed under Apache License v2.0 with Runtime Library Exception
8+
#
9+
# See http://swift.org/LICENSE.txt for license information
10+
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
11+
#
12+
# ----------------------------------------------------------------------------
13+
#
314
# Emulates the frontend of an -embed-bitcode job. That means we have to handle
415
# -emit-bc and -c actions.
16+
#
17+
# ----------------------------------------------------------------------------
518

619
from __future__ import print_function
720

test/Driver/Dependencies/Inputs/fake-build-whole-module.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
#!/usr/bin/env python
2-
2+
# fake-build-for-whole-module.py - Optimized fake build -*- python -*-
3+
#
4+
# This source file is part of the Swift.org open source project
5+
#
6+
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
7+
# Licensed under Apache License v2.0 with Runtime Library Exception
8+
#
9+
# See http://swift.org/LICENSE.txt for license information
10+
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
11+
#
12+
# ----------------------------------------------------------------------------
13+
#
314
# Emulates the frontend of a -whole-module-optimization compilation.
15+
#
16+
# ----------------------------------------------------------------------------
417

518
from __future__ import print_function
619

test/Driver/Dependencies/Inputs/modify-non-primary-files.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
11
#!/usr/bin/env python
2-
2+
# modify-non-primary-files.py - Fake build while modifying files -*- python -*-
3+
#
4+
# This source file is part of the Swift.org open source project
5+
#
6+
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
7+
# Licensed under Apache License v2.0 with Runtime Library Exception
8+
#
9+
# See http://swift.org/LICENSE.txt for license information
10+
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
11+
#
12+
# ----------------------------------------------------------------------------
13+
#
314
# modify-non-primary-files.py simulates a build where the user is modifying the
415
# source files during compilation.
16+
#
17+
# ----------------------------------------------------------------------------
518

619
from __future__ import print_function
720

test/Driver/Dependencies/Inputs/touch.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
#!/usr/bin/env python
2-
2+
# touch.py - /bin/touch that writes the LLVM epoch -*- python -*-
3+
#
4+
# This source file is part of the Swift.org open source project
5+
#
6+
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
7+
# Licensed under Apache License v2.0 with Runtime Library Exception
8+
#
9+
# See http://swift.org/LICENSE.txt for license information
10+
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
11+
#
12+
# ----------------------------------------------------------------------------
13+
#
314
# Like /bin/touch, but takes a time using the LLVM epoch.
15+
#
16+
# ----------------------------------------------------------------------------
417

518
import os
619
import sys

test/Driver/Dependencies/Inputs/update-dependencies-bad.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
11
#!/usr/bin/env python
2-
2+
# update-dependencies-bad.py - Fails on bad.swift -*- python -*-
3+
#
4+
# This source file is part of the Swift.org open source project
5+
#
6+
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
7+
# Licensed under Apache License v2.0 with Runtime Library Exception
8+
#
9+
# See http://swift.org/LICENSE.txt for license information
10+
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
11+
#
12+
# ----------------------------------------------------------------------------
13+
#
314
# Fails if the input file is named "bad.swift"; otherwise dispatches to
415
# update-dependencies.py.
16+
#
17+
# ----------------------------------------------------------------------------
518

619
from __future__ import print_function
720

test/Driver/Dependencies/Inputs/update-dependencies.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
#!/usr/bin/env python
2-
3-
# update-dependencies.py simulates a Swift compilation for the purposes of
4-
# dependency analysis. That means it has two tasks:
2+
# update-dependencies.py - Fake build for dependency analysis -*- python -*-
3+
#
4+
# This source file is part of the Swift.org open source project
5+
#
6+
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
7+
# Licensed under Apache License v2.0 with Runtime Library Exception
8+
#
9+
# See http://swift.org/LICENSE.txt for license information
10+
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
11+
#
12+
# ----------------------------------------------------------------------------
13+
#
14+
# Simulates a Swift compilation for the purposes of dependency analysis.
15+
# That means this has two tasks:
516
#
617
# 1. Update the main output of the compilation job.
718
# 2. Update the associated dependencies file, in case anything changed.
@@ -13,6 +24,8 @@
1324
# the old dependencies (if present).
1425
#
1526
# If invoked in non-primary-file mode, it only creates the output file.
27+
#
28+
# ----------------------------------------------------------------------------
1629

1730
from __future__ import print_function
1831

0 commit comments

Comments
 (0)