summaryrefslogtreecommitdiffstats
path: root/test/sconsign
diff options
context:
space:
mode:
authorPaweł Tomulik <ptomulik@meil.pw.edu.pl>2018-10-13 00:22:40 (GMT)
committerPaweł Tomulik <ptomulik@meil.pw.edu.pl>2018-10-22 10:18:28 (GMT)
commit19b57d5bc728c391adceee5a57d4ae7fb6120d7f (patch)
treeb23039c0dc15764892aee20ec8039f039ba8fa8d /test/sconsign
parente27d985c627a897e1d234f8a59e1eb91cae1ca2a (diff)
downloadSCons-19b57d5bc728c391adceee5a57d4ae7fb6120d7f.zip
SCons-19b57d5bc728c391adceee5a57d4ae7fb6120d7f.tar.gz
SCons-19b57d5bc728c391adceee5a57d4ae7fb6120d7f.tar.bz2
Correct sheabangs in code snippets under test/
Diffstat (limited to 'test/sconsign')
-rw-r--r--test/sconsign/script/SConsignFile.py14
-rw-r--r--test/sconsign/script/Signatures.py13
-rw-r--r--test/sconsign/script/no-SConsignFile.py13
3 files changed, 21 insertions, 19 deletions
diff --git a/test/sconsign/script/SConsignFile.py b/test/sconsign/script/SConsignFile.py
index dc45cc1..4adf43d 100644
--- a/test/sconsign/script/SConsignFile.py
+++ b/test/sconsign/script/SConsignFile.py
@@ -30,7 +30,7 @@ using the signatures in an SConsignFile().
"""
import re
-
+import sys
import TestSCons
import TestSConsign
@@ -41,7 +41,7 @@ test.subdir('sub1', 'sub2')
fake_cc_py = test.workpath('fake_cc.py')
fake_link_py = test.workpath('fake_link.py')
-test.write(fake_cc_py, r"""#!/usr/bin/env python
+test.write(fake_cc_py, r"""#!/usr/bin/env python%s
import os
import re
import sys
@@ -50,7 +50,7 @@ path = sys.argv[1].split()
output = open(sys.argv[2], 'wb')
input = open(sys.argv[3], 'rb')
-output.write('fake_cc.py: %s\n' % sys.argv)
+output.write('fake_cc.py: %%s\n' %% sys.argv)
def find_file(f):
for dir in path:
@@ -71,20 +71,20 @@ def process(infp, outfp):
process(input, output)
sys.exit(0)
-""")
+""" % sys.version_info[0])
-test.write(fake_link_py, r"""#!/usr/bin/env python
+test.write(fake_link_py, r"""#!/usr/bin/env python%s
import sys
output = open(sys.argv[1], 'wb')
input = open(sys.argv[2], 'rb')
-output.write('fake_link.py: %s\n' % sys.argv)
+output.write('fake_link.py: %%s\n' %% sys.argv)
output.write(input.read())
sys.exit(0)
-""")
+""" % sys.version_info[0])
test.chmod(fake_cc_py, 0o755)
test.chmod(fake_link_py, 0o755)
diff --git a/test/sconsign/script/Signatures.py b/test/sconsign/script/Signatures.py
index 5babe67..9504ce4 100644
--- a/test/sconsign/script/Signatures.py
+++ b/test/sconsign/script/Signatures.py
@@ -35,6 +35,7 @@ SourceSignatures('timestamp') with TargetSignatures('content').
import TestSCons
import TestSConsign
+import sys
test = TestSConsign.TestSConsign(match = TestSConsign.match_re)
@@ -60,7 +61,7 @@ test.subdir('sub1', 'sub2')
fake_cc_py = test.workpath('fake_cc.py')
fake_link_py = test.workpath('fake_link.py')
-test.write(fake_cc_py, r"""#!/usr/bin/env python
+test.write(fake_cc_py, r"""#!/usr/bin/env python%s
import os
import re
import sys
@@ -69,7 +70,7 @@ path = sys.argv[1].split()
output = open(sys.argv[2], 'wb')
input = open(sys.argv[3], 'rb')
-output.write('fake_cc.py: %s\n' % sys.argv)
+output.write('fake_cc.py: %%s\n' %% sys.argv)
def find_file(f):
for dir in path:
@@ -90,20 +91,20 @@ def process(infp, outfp):
process(input, output)
sys.exit(0)
-""")
+""" % sys.version_info[0])
-test.write(fake_link_py, r"""#!/usr/bin/env python
+test.write(fake_link_py, r"""#!/usr/bin/env python%s
import sys
output = open(sys.argv[1], 'wb')
input = open(sys.argv[2], 'rb')
-output.write('fake_link.py: %s\n' % sys.argv)
+output.write('fake_link.py: %%s\n' %% sys.argv)
output.write(input.read())
sys.exit(0)
-""")
+""" % sys.version_info[0])
test.chmod(fake_cc_py, 0o755)
test.chmod(fake_link_py, 0o755)
diff --git a/test/sconsign/script/no-SConsignFile.py b/test/sconsign/script/no-SConsignFile.py
index 4e9915b..3973fc3 100644
--- a/test/sconsign/script/no-SConsignFile.py
+++ b/test/sconsign/script/no-SConsignFile.py
@@ -31,6 +31,7 @@ Verify that the sconsign script works when using an individual
import TestSCons
import TestSConsign
+import sys
test = TestSConsign.TestSConsign(match = TestSConsign.match_re)
@@ -49,7 +50,7 @@ test.subdir('sub1', 'sub2')
fake_cc_py = test.workpath('fake_cc.py')
fake_link_py = test.workpath('fake_link.py')
-test.write(fake_cc_py, r"""#!/usr/bin/env python
+test.write(fake_cc_py, r"""#!/usr/bin/env python%s
import os
import re
import sys
@@ -58,7 +59,7 @@ path = sys.argv[1].split()
output = open(sys.argv[2], 'wb')
input = open(sys.argv[3], 'rb')
-output.write('fake_cc.py: %s\n' % sys.argv)
+output.write('fake_cc.py: %%s\n' %% sys.argv)
def find_file(f):
for dir in path:
@@ -79,20 +80,20 @@ def process(infp, outfp):
process(input, output)
sys.exit(0)
-""")
+""" % sys.version_info[0])
-test.write(fake_link_py, r"""#!/usr/bin/env python
+test.write(fake_link_py, r"""#!/usr/bin/env python%s
import sys
output = open(sys.argv[1], 'wb')
input = open(sys.argv[2], 'rb')
-output.write('fake_link.py: %s\n' % sys.argv)
+output.write('fake_link.py: %%s\n' %% sys.argv)
output.write(input.read())
sys.exit(0)
-""")
+""" % sys.version_info[0])
test.chmod(fake_cc_py, 0o755)
test.chmod(fake_link_py, 0o755)