Skip to content

Commit 6827a03

Browse files
committed
Add unlink_files method to TestCmd, replace file deletion loops with method calls in msvs executable test scripts, re-order CHANGES.txt.
1 parent f9b68fe commit 6827a03

19 files changed

+52
-69
lines changed

CHANGES.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ NOTE: 4.3.0 now requires Python 3.6.0 and above. Python 3.5.x is no longer suppo
99

1010
RELEASE VERSION/DATE TO BE FILLED IN LATER
1111

12+
From Ataf Fazledin Ahamed:
13+
- Use of NotImplemented instead of NotImplementedError for special methods
14+
of _ListVariable class
15+
1216
From Joseph Brill:
1317
- Fix issue #2755: the msvs tool no longer writes the OS environment SCONS_HOME
1418
value into the SCons environment when the SCONS_HOME variable already exists
@@ -32,6 +36,9 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
3236
build. The tests were modified to delete the test executable, object file,
3337
and sconsign file prior to the command-line invocation of the VS development
3438
binary.
39+
- A method, unlink_files, was added to the TestCmd class that unlinks a list of
40+
files from a specified directory. An attempt to unlink a file is made only when
41+
the file exists, otherwise, the file is ignored.
3542

3643
From Michał Górny:
3744
- Remove unecessary dependencies on pypi packages from setup.cfg
@@ -40,10 +47,6 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
4047
- Fix of the --debug=sconscript option to return exist statements when using return
4148
statement with stop flag enabled
4249

43-
From Ataf Fazledin Ahamed:
44-
- Use of NotImplemented instead of NotImplementedError for special methods
45-
of _ListVariable class
46-
4750
RELEASE 4.6.0 - Sun, 19 Nov 2023 17:22:20 -0700
4851

4952
From Max Bachmann:

RELEASE.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ Here is a summary of the changes since 4.6.0:
1616
NEW FUNCTIONALITY
1717
-----------------
1818

19-
- List new features (presumably why a checkpoint is being released)
19+
- A method, unlink_files, was added to the TestCmd class that unlinks a list of
20+
files from a specified directory. An attempt to unlink a file is made only when
21+
the file exists, otherwise, the file is ignored.
22+
2023

2124
DEPRECATED FUNCTIONALITY
2225
------------------------

test/MSVS/vs-10.0-exec.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,7 @@
9090

9191
test.run(chdir='sub dir', arguments='.')
9292

93-
for filename in ('foo.exe', 'foo.obj', '.sconsign.dblite'):
94-
filepath = test.workpath('sub dir', filename)
95-
if os.path.exists(filepath):
96-
test.unlink(filepath)
93+
test.unlink_files('sub dir', ['foo.exe', 'foo.obj', '.sconsign.dblite'])
9794

9895
test.vcproj_sys_path(test.workpath('sub dir', 'foo.vcxproj'))
9996

test/MSVS/vs-10.0Exp-exec.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,7 @@
9191

9292
test.run(chdir='sub dir', arguments='.')
9393

94-
for filename in ('foo.exe', 'foo.obj', '.sconsign.dblite'):
95-
filepath = test.workpath('sub dir', filename)
96-
if os.path.exists(filepath):
97-
test.unlink(filepath)
94+
test.unlink_files('sub dir', ['foo.exe', 'foo.obj', '.sconsign.dblite'])
9895

9996
test.vcproj_sys_path(test.workpath('sub dir', 'foo.vcxproj'))
10097

test/MSVS/vs-11.0-exec.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,7 @@
9191

9292
test.run(chdir='sub dir', arguments='.')
9393

94-
for filename in ('foo.exe', 'foo.obj', '.sconsign.dblite'):
95-
filepath = test.workpath('sub dir', filename)
96-
if os.path.exists(filepath):
97-
test.unlink(filepath)
94+
test.unlink_files('sub dir', ['foo.exe', 'foo.obj', '.sconsign.dblite'])
9895

9996
test.vcproj_sys_path(test.workpath('sub dir', 'foo.vcxproj'))
10097

test/MSVS/vs-11.0Exp-exec.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,7 @@
9191

9292
test.run(chdir='sub dir', arguments='.')
9393

94-
for filename in ('foo.exe', 'foo.obj', '.sconsign.dblite'):
95-
filepath = test.workpath('sub dir', filename)
96-
if os.path.exists(filepath):
97-
test.unlink(filepath)
94+
test.unlink_files('sub dir', ['foo.exe', 'foo.obj', '.sconsign.dblite'])
9895

9996
test.vcproj_sys_path(test.workpath('sub dir', 'foo.vcxproj'))
10097

test/MSVS/vs-14.0-exec.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,7 @@
9292

9393
test.run(chdir='sub dir', arguments='.')
9494

95-
for filename in ('foo.exe', 'foo.obj', '.sconsign.dblite'):
96-
filepath = test.workpath('sub dir', filename)
97-
if os.path.exists(filepath):
98-
test.unlink(filepath)
95+
test.unlink_files('sub dir', ['foo.exe', 'foo.obj', '.sconsign.dblite'])
9996

10097
test.vcproj_sys_path(test.workpath('sub dir', 'foo.vcxproj'))
10198

test/MSVS/vs-14.0Exp-exec.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,7 @@
9292

9393
test.run(chdir='sub dir', arguments='.')
9494

95-
for filename in ('foo.exe', 'foo.obj', '.sconsign.dblite'):
96-
filepath = test.workpath('sub dir', filename)
97-
if os.path.exists(filepath):
98-
test.unlink(filepath)
95+
test.unlink_files('sub dir', ['foo.exe', 'foo.obj', '.sconsign.dblite'])
9996

10097
test.vcproj_sys_path(test.workpath('sub dir', 'foo.vcxproj'))
10198

test/MSVS/vs-14.1-exec.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,7 @@
9292

9393
test.run(chdir='sub dir', arguments='.')
9494

95-
for filename in ('foo.exe', 'foo.obj', '.sconsign.dblite'):
96-
filepath = test.workpath('sub dir', filename)
97-
if os.path.exists(filepath):
98-
test.unlink(filepath)
95+
test.unlink_files('sub dir', ['foo.exe', 'foo.obj', '.sconsign.dblite'])
9996

10097
test.vcproj_sys_path(test.workpath('sub dir', 'foo.vcxproj'))
10198

test/MSVS/vs-14.2-exec.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,7 @@
9292

9393
test.run(chdir='sub dir', arguments='.')
9494

95-
for filename in ('foo.exe', 'foo.obj', '.sconsign.dblite'):
96-
filepath = test.workpath('sub dir', filename)
97-
if os.path.exists(filepath):
98-
test.unlink(filepath)
95+
test.unlink_files('sub dir', ['foo.exe', 'foo.obj', '.sconsign.dblite'])
9996

10097
test.vcproj_sys_path(test.workpath('sub dir', 'foo.vcxproj'))
10198

0 commit comments

Comments
 (0)