summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2021-04-16 16:27:34 (GMT)
committerMats Wichmann <mats@linux.com>2021-04-16 16:27:34 (GMT)
commitcdf64ab71a77598629596998c63f39ace13f072b (patch)
tree4097c93bbe5fe2920ca13181fd5cf0aa1d1f143b
parent5a2c80ec0e3a89568dea91196064d8d4afe7afa3 (diff)
downloadSCons-cdf64ab71a77598629596998c63f39ace13f072b.zip
SCons-cdf64ab71a77598629596998c63f39ace13f072b.tar.gz
SCons-cdf64ab71a77598629596998c63f39ace13f072b.tar.bz2
[PR 3930] fix regexes in scons-time tests
The regex looking for profile files hardcoded a '/', change to '.' to match either style of separator. Tests started failing on Windows with Python 3.9. Signed-off-by: Mats Wichmann <mats@linux.com>
-rw-r--r--test/scons-time/func/chdir.py9
-rw-r--r--test/scons-time/func/funcglob.py9
-rw-r--r--test/scons-time/func/tail.py9
3 files changed, 12 insertions, 15 deletions
diff --git a/test/scons-time/func/chdir.py b/test/scons-time/func/chdir.py
index 1aea7ad..412a1c8 100644
--- a/test/scons-time/func/chdir.py
+++ b/test/scons-time/func/chdir.py
@@ -1,6 +1,8 @@
#!/usr/bin/env python
#
-# __COPYRIGHT__
+# MIT License
+#
+# Copyright The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -20,9 +22,6 @@
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
"""
Verify that the func -C and --chdir options change directory before
@@ -52,7 +51,7 @@ for i in range(9):
i = str(i)
test.subdir(i)
test.profile_data('profs/foo-%s.prof' % i, '%s/prof.py' % i, '_main', input)
- s = r'\d.\d\d\d %s/prof\.py:1\(_main\)' % re.escape(test.workpath(i))
+ s = r'\d.\d\d\d %s.prof\.py:1\(_main\)' % re.escape(test.workpath(i))
expect.append(s + '\n')
expect = ''.join(expect)
diff --git a/test/scons-time/func/funcglob.py b/test/scons-time/func/funcglob.py
index 6240404..3fff746 100644
--- a/test/scons-time/func/funcglob.py
+++ b/test/scons-time/func/funcglob.py
@@ -1,6 +1,8 @@
#!/usr/bin/env python
#
-# __COPYRIGHT__
+# MIT License
+#
+# Copyright The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -20,9 +22,6 @@
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
"""
Verify that the func subcommands globs for files.
@@ -46,7 +45,7 @@ expect = []
for i in range(9):
test.subdir(str(i))
test.profile_data('foo-%s.prof' % i, '%s/prof.py' % i, '_main', input)
- expect.append((r'\d.\d\d\d %s/prof\.py:1\(_main\)' + '\n') % i)
+ expect.append((r'\d.\d\d\d %s.prof\.py:1\(_main\)' + '\n') % i)
expect = ''.join(expect)
diff --git a/test/scons-time/func/tail.py b/test/scons-time/func/tail.py
index afd3f83..64d041a 100644
--- a/test/scons-time/func/tail.py
+++ b/test/scons-time/func/tail.py
@@ -1,6 +1,8 @@
#!/usr/bin/env python
#
-# __COPYRIGHT__
+# MIT License
+#
+# Copyright The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -20,9 +22,6 @@
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
"""
Verify that the func subcommand only prints results for the last number
@@ -47,7 +46,7 @@ expect = []
for i in range(9):
test.subdir(str(i))
test.profile_data('foo-%s.prof' % i, '%s/prof.py' % i, '_main', input)
- expect.append((r'\d.\d\d\d %s/prof\.py:1\(_main\)' + '\n') % i)
+ expect.append((r'\d.\d\d\d %s.prof\.py:1\(_main\)' + '\n') % i)
test.run(arguments = 'func -t 3 foo-*.prof', stdout = ''.join(expect[-3:]))