Author: gnichols
Date: 2012-08-23 19:03:41 +0000 (Thu, 23 Aug 2012)
New Revision: 1365
Removed:
trunk/tests/pccard/runtest.sh
Modified:
trunk/tests/pccard/Makefile
trunk/tests/pccard/pccard.py
trunk/tests/pccard/pccard.sh
Log:
843610 - pccard test should not use HAL
Modified: trunk/tests/pccard/Makefile
===================================================================
--- trunk/tests/pccard/Makefile 2012-08-23 18:57:26 UTC (rev 1364)
+++ trunk/tests/pccard/Makefile 2012-08-23 19:03:41 UTC (rev 1365)
@@ -18,16 +18,12 @@
FILES=runtest.sh pccard.sh
run: $(FILES) build
- ./runtest.sh
build: $(BUILT_FILES)
- chmod a+x ./runtest.sh ./pccard.sh
+ chmod a+x ./pccard.sh ./pccard.py
clean:
rm -f $(BUILT_FILES)
# Include Common Makefile
include $(DESTDIR)/usr/share/v7/lib/v7-make.include
-
-
-
Modified: trunk/tests/pccard/pccard.py
===================================================================
--- trunk/tests/pccard/pccard.py 2012-08-23 18:57:26 UTC (rev 1364)
+++ trunk/tests/pccard/pccard.py 2012-08-23 19:03:41 UTC (rev 1365)
@@ -1,9 +1,9 @@
#!/usr/bin/python
-# Copyright (c) 2006 Red Hat, Inc. All rights reserved. This copyrighted material
-# is made available to anyone wishing to use, modify, copy, or
-# redistribute it subject to the terms and conditions of the GNU General
+# Copyright (c) 2006 Red Hat, Inc. All rights reserved. This copyrighted material
+# is made available to anyone wishing to use, modify, copy, or
+# redistribute it subject to the terms and conditions of the GNU General
# Public License v.2.
-#
+#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
@@ -19,7 +19,7 @@
from v7.tags import DeviceClass, TestTag
from v7.command import Command, V7CommandException
-class PCCardTest(Test):
+class PCCardTest(Test):
def __init__(self):
Test.__init__(self, name="pccard")
@@ -30,10 +30,14 @@
def plan(self, planner):
- properties = dict()
- properties['pci.device_subclass'] = 7
- properties['pci.device_class'] = 6
- return self.planWith(planner.getHalDeviceDetector(), properties, all=False,
strict=True)
+ tests = list()
+ devices = planner.getUdevDeviceDetector().getDevices()
+ for device in devices:
+ if device.getProperty("PCI_CLASS") == "60700":
+ test = self.makeCopy()
+ tests.append(test)
+
+ return tests
def run(self):
try:
@@ -50,7 +54,3 @@
test = PCCardTest()
returnValue = test.do(sys.argv)
sys.exit(returnValue)
-
-
-
-
Modified: trunk/tests/pccard/pccard.sh
===================================================================
--- trunk/tests/pccard/pccard.sh 2012-08-23 18:57:26 UTC (rev 1364)
+++ trunk/tests/pccard/pccard.sh 2012-08-23 19:03:41 UTC (rev 1365)
@@ -28,14 +28,14 @@
socket_test() {
SOCKET_COUNT=`get_socket_count`
if [ $SOCKET_COUNT == "0" ]; then
- echo "Error: no sockets to test"
+ echo "Error: no sockets to test"
return 1
fi
local socket=0
# Verify the sockets are occupied when we start
until [ $socket -ge $SOCKET_COUNT ]; do
- pccardctl ident $socket | grep -q "no product" &&
+ pccardctl ident $socket | grep -q "no product" &&
echo "Error: Unable to stat Socket $socket." &&
return 1
let ++socket
@@ -49,11 +49,9 @@
pccardctl ident $socket
let ++socket
done
-
+
return 0
}
-# run the test
+# run the test
socket_test
-
-
Deleted: trunk/tests/pccard/runtest.sh
===================================================================
--- trunk/tests/pccard/runtest.sh 2012-08-23 18:57:26 UTC (rev 1364)
+++ trunk/tests/pccard/runtest.sh 2012-08-23 19:03:41 UTC (rev 1365)
@@ -1,3 +0,0 @@
-#!/bin/bash
-
-v7-run-simple-test ${TEST:-$(basename $PWD)} ./pccard.sh
Show replies by date