From e38a12e6fb2732181e61b999c02a96db76820370 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iusty@k1024.org>
Date: Thu, 11 Dec 2008 10:12:54 +0100
Subject: [PATCH] Add script to run tests

Since we don't have setuptools for now, we add a script to run tests and
modify the test script to work without setuptools.
---
 run-tests.sh       | 9 +++++++++
 test/test_xattr.py | 3 +++
 2 files changed, 12 insertions(+)
 create mode 100755 run-tests.sh

diff --git a/run-tests.sh b/run-tests.sh
new file mode 100755
index 0000000..fb71aab
--- /dev/null
+++ b/run-tests.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+for ver in 2.4 2.5 2.6 3.0; do
+    rm -f xattr.so
+    python$ver ./setup.py build_ext -i
+    PYTHONPATH=. python$ver ./test/test_xattr.py
+done
diff --git a/test/test_xattr.py b/test/test_xattr.py
index 2f4abb0..126d2c1 100644
--- a/test/test_xattr.py
+++ b/test/test_xattr.py
@@ -354,3 +354,6 @@ class xattrTest(unittest.TestCase):
                                  [(self.USER_ATTR, self.USER_VAL)])
             self.failUnlessEqual(xattr.get_all(fh, namespace=NS_USER),
                                  [(self.USER_NN, self.USER_VAL)])
+
+if __name__ == "__main__":
+    unittest.main()
-- 
2.39.5