From a85bf91386293dc07446c82f95e5d5bd4e72c3d5 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Tue, 30 Jul 2013 11:24:22 +0100 Subject: Delete obsolete / unused python test files The python/tests directory contains a number of so called "tests" for the python API. These are all hardcoded to look for Xen and cannot be run in any automated fashion, and no one is ever manually running them. Given that they don't meaningully contribute to the test coverage, delete them. For some reason these tests were also copied into the filesystem as part of 'make install'. The change to the RPM in commit 3347a4203278ec93d7b0ceb88b5ed10e4f14765c caused a build failure, since it removed the code which deleted these installed tests. Signed-off-by: Daniel P. Berrange --- tests/create.py | 146 -------------------------------------------------------- 1 file changed, 146 deletions(-) delete mode 100755 tests/create.py (limited to 'tests/create.py') diff --git a/tests/create.py b/tests/create.py deleted file mode 100755 index 815ccc4..0000000 --- a/tests/create.py +++ /dev/null @@ -1,146 +0,0 @@ -#!/usr/bin/python -u -import libvirt -import sys -import os -import time - -if not os.access("/proc/xen", os.R_OK): - print 'System is not running a Xen kernel' - sys.exit(1) - -# -# Try to provide default OS images paths here, of course non standard -# -osroots = [ - "/u/fc4-2.img", - "/u/fc4.img", - "/xen/fc4.img", -] - -okay = 1 - -osroot = None -for root in osroots: - if os.access(root, os.R_OK): - osroot = root - break - -if osroot == None: - print "Could not find a guest OS root, edit to add the path in osroots" - sys.exit(1) - -kernel=open("/proc/version").read().split() -kernelOv = kernel[2] - -if kernelOv.find('hypervisor'): - kernelU = "/boot/vmlinuz-" + kernelOv.replace('hypervisor', 'guest') - initrdU = "/boot/initrd-" + kernelOv.replace('hypervisor', 'guest') + ".img" -elif kernelOv.find('xen0'): - kernelU = "/boot/vmlinuz-" + kernelOv.replace('xen0', 'xenU') - initrdU = "/boot/initrd-" + kernelOv.replace('xen0', 'xenU') + ".img" - -if not os.access(kernelU, os.R_OK): - print "Did not find the guest kernel %s" % (kernelU) - sys.exit(1) - -kernelU = "" + kernelU + "" - -if not os.access(initrdU, os.R_OK): - print "Did not find the guest initrd %s" % (initrdU) - initrdU = "" -else: - initrdU = "" + initrdU + "" - - -conn = libvirt.open(None) -if conn == None: - print 'Failed to open connection to the hypervisor' - sys.exit(1) - -xmldesc=""" - test - - linux -""" + kernelU + initrdU + """ - root=/dev/sda1 ro selinux=0 3 - - 131072 - 1 - - - - - - - - -