Skip to content

[test][Driver] Add code headers to Python files #793

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions test/Driver/Dependencies/Inputs/fail.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
#!/usr/bin/env python
# fail.py - Just exits with an error code -*- python -*-
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors

exit(1)
15 changes: 14 additions & 1 deletion test/Driver/Dependencies/Inputs/fake-build-for-bitcode.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
#!/usr/bin/env python

# fake-build-for-bitcode.py - Fake build with -embed-bitcode -*- python -*-
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
#
# ----------------------------------------------------------------------------
#
# Emulates the frontend of an -embed-bitcode job. That means we have to handle
# -emit-bc and -c actions.
#
# ----------------------------------------------------------------------------

from __future__ import print_function

Expand Down
15 changes: 14 additions & 1 deletion test/Driver/Dependencies/Inputs/fake-build-whole-module.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
#!/usr/bin/env python

# fake-build-for-whole-module.py - Optimized fake build -*- python -*-
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
#
# ----------------------------------------------------------------------------
#
# Emulates the frontend of a -whole-module-optimization compilation.
#
# ----------------------------------------------------------------------------

from __future__ import print_function

Expand Down
15 changes: 14 additions & 1 deletion test/Driver/Dependencies/Inputs/modify-non-primary-files.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
#!/usr/bin/env python

# modify-non-primary-files.py - Fake build while modifying files -*- python -*-
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
#
# ----------------------------------------------------------------------------
#
# modify-non-primary-files.py simulates a build where the user is modifying the
# source files during compilation.
#
# ----------------------------------------------------------------------------

from __future__ import print_function

Expand Down
15 changes: 14 additions & 1 deletion test/Driver/Dependencies/Inputs/touch.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
#!/usr/bin/env python

# touch.py - /bin/touch that writes the LLVM epoch -*- python -*-
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
#
# ----------------------------------------------------------------------------
#
# Like /bin/touch, but takes a time using the LLVM epoch.
#
# ----------------------------------------------------------------------------

import os
import sys
Expand Down
15 changes: 14 additions & 1 deletion test/Driver/Dependencies/Inputs/update-dependencies-bad.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
#!/usr/bin/env python

# update-dependencies-bad.py - Fails on bad.swift -*- python -*-
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
#
# ----------------------------------------------------------------------------
#
# Fails if the input file is named "bad.swift"; otherwise dispatches to
# update-dependencies.py.
#
# ----------------------------------------------------------------------------

from __future__ import print_function

Expand Down
19 changes: 16 additions & 3 deletions test/Driver/Dependencies/Inputs/update-dependencies.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
#!/usr/bin/env python

# update-dependencies.py simulates a Swift compilation for the purposes of
# dependency analysis. That means it has two tasks:
# update-dependencies.py - Fake build for dependency analysis -*- python -*-
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
#
# ----------------------------------------------------------------------------
#
# Simulates a Swift compilation for the purposes of dependency analysis.
# That means this has two tasks:
#
# 1. Update the main output of the compilation job.
# 2. Update the associated dependencies file, in case anything changed.
Expand All @@ -13,6 +24,8 @@
# the old dependencies (if present).
#
# If invoked in non-primary-file mode, it only creates the output file.
#
# ----------------------------------------------------------------------------

from __future__ import print_function

Expand Down