All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karl MacMillan <kmacmillan@mentalrootkit.com>
To: SELinux Mail List <selinux@tycho.nsa.gov>
Subject: [PATCH] sepolgen: cleanup tests
Date: Wed, 21 Feb 2007 13:04:53 -0500	[thread overview]
Message-ID: <45DC89C5.2040909@mentalrootkit.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 206 bytes --]

Make run-tests.py in sepolgen use unittest.main(). This allows the use 
of standard unittest command line files and python unittest test tools.

Signed-off-by: Karl MacMillan <kmacmillan@mentalrootkit.com>

[-- Attachment #2: sepolgen-test-cleanup.diff --]
[-- Type: text/x-patch, Size: 1714 bytes --]

diff -r 99289257af66 sepolgen/tests/run-tests.py
--- a/sepolgen/tests/run-tests.py	Mon Feb 19 11:09:58 2007 -0500
+++ b/sepolgen/tests/run-tests.py	Mon Feb 19 11:10:15 2007 -0500
@@ -1,45 +1,16 @@ import unittest
 import unittest
 import sys
 
-def run_all_tests():
-    sys.path.insert(0, "../src/.")
-    tester = unittest.TextTestRunner(verbosity=2)
-    t = unittest.TestLoader()
-    
-    import test_access
-    suite = t.loadTestsFromModule(test_access)
-
-    import test_audit
-    suite.addTest(t.loadTestsFromModule(test_audit))
-
-    import test_refpolicy
-    suite.addTest(t.loadTestsFromModule(test_refpolicy))
-
-    import test_refparser
-    suite.addTest(t.loadTestsFromModule(test_refparser))
-
-    import test_policygen
-    suite.addTest(t.loadTestsFromModule(test_policygen))
-
-    import test_matching
-    suite.addTest(t.loadTestsFromModule(test_matching))
-
-    import test_interfaces
-    suite.addTest(t.loadTestsFromModule(test_interfaces))
-
-    import test_objectmodel
-    suite.addTest(t.loadTestsFromModule(test_objectmodel))
-    
-    import test_module
-    suite.addTest(t.loadTestsFromModule(test_module))
-
-    tester.run(suite)
-
+sys.path.insert(0, "../src/.")
+from test_access import *
+from test_audit import *
+from test_refpolicy import *
+from test_refparser import *
+from test_policygen import *
+from test_matching import *
+from test_interfaces import *
+from test_objectmodel import *
+from test_module import *
 
 if __name__ == "__main__":
-    print "==========================================="
-    print ""
-    print "RUNNING TESTS"
-    print ""
-    print "==========================================="
-    run_all_tests()
+    unittest.main()

                 reply	other threads:[~2007-02-21 18:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45DC89C5.2040909@mentalrootkit.com \
    --to=kmacmillan@mentalrootkit.com \
    --cc=selinux@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.