Skip to contentSkip to conversation

tools/python: Drop test.py

PATCH In review Andrew Cooper 3 participants 3 messages Dec 18, 2019 Licenses and spdx stuff

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/python: Drop test.py

This file hasn't been touched since it was introduced in 2005 (c/s 0c6f36628) and has a wildly obsolete shebang for Python 2.3. Most importantly for us is that it isn't Python 3 compatible.

Drop the file entirely. Since the 2.3 days, automatic discovery of tests has been included in standard functionality. Rewrite the test rule to use "$(PYTHON) -m unittest discover" which is equivelent.

Dropping test.py drops the only piece of ZPL-2.0 code in the tree. Drop the ancillary files, and adjust COPYING to match.

---
CC: Ian Jackson <[email protected]>
CC: Wei Liu <[email protected]>
CC: Lars Kurth <[email protected]>

This wants backporting to 4.13 as soon as practical.

---
 COPYING               |    1 -
 tools/python/Makefile |    2 +-
 tools/python/README   |    3 -
 tools/python/ZPL-2.0  |   59 ---
 tools/python/test.py  | 1094 -------------------------------------------------
 5 files changed, 1 insertion(+), 1158 deletions(-)
 delete mode 100644 tools/python/README
 delete mode 100644 tools/python/ZPL-2.0
 delete mode 100644 tools/python/test.py
COPYING +0 -1
index 80fac091d3..a4bc2b2dd4 100644
@@ -57,7 +57,6 @@ Xen tree, retaining the original license, such as
   - Laurikari License
   - Public Domain
   - ZLIB License
-  - ZPL 2.0
 
 Significant code imports are highlighted in a README.source file
 in the directory into which the file or code snippet was imported.
tools/python/Makefile +1 -1
index 541858e2f8..e99f78a537 100644
@@ -33,7 +33,7 @@ uninstall:
 
 .PHONY: test
 test:
-	export LD_LIBRARY_PATH=$$(readlink -f ../libxc):$$(readlink -f ../xenstore); $(PYTHON) test.py -b -u
+	LD_LIBRARY_PATH=$$(readlink -f ../libxc):$$(readlink -f ../xenstore) $(PYTHON) -m unittest discover
 
 .PHONY: clean
 clean:
tools/python/README deleted +0 -3
deleted file mode 100644
index 8fffef3a00..0000000000
@@ -1,3 +0,0 @@
-The file test.py here is from the Zope project, and is Copyright (c) 2001,
-2002 Zope Corporation and Contributors.  This file is released under the Zope
-Public License, version 2.0, a copy of which is in the file ZPL-2.0.
tools/python/ZPL-2.0 deleted +0 -59

60 lines not on this page · raw message

tools/python/test.py deleted +0 -1094

1,094 lines not on this page · raw message

Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Andrew Cooper

This file hasn't been touched since it was introduced in 2005 (c/s 0c6f36628) and has a wildly obsolete shebang for Python 2.3. Most importantly for us is that it isn't Python 3 compatible.

Quoted 8 lines

Drop the file entirely. Since the 2.3 days, automatic discovery of tests has been included in standard functionality. Rewrite the test rule to use "$(PYTHON) -m unittest discover" which is equivelent.

Dropping test.py drops the only piece of ZPL-2.0 code in the tree. Drop the ancillary files, and adjust COPYING to match.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reviewed-by on v1 1/1
#2 lore raw
In reply to Andrew Cooper

On 18/12/2019, 13:50, "Andrew Cooper" <[email protected]> wrote:

This file hasn't been touched since it was introduced in 2005 (c/s 0c6f36628) and has a wildly obsolete shebang for Python 2.3. Most importantly for us is that it isn't Python 3 compatible.

Drop the file entirely. Since the 2.3 days, automatic discovery of tests has been included in standard functionality. Rewrite the test rule to use "$(PYTHON) -m unittest discover" which is equivelent.

Dropping test.py drops the only piece of ZPL-2.0 code in the tree. Drop the ancillary files, and adjust COPYING to match.

---
CC: Ian Jackson <[email protected]>
CC: Wei Liu <[email protected]>
CC: Lars Kurth <[email protected]>

This wants backporting to 4.13 as soon as practical.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel