From 9faae5d0e42bbb7b06b51b9ac15ce6babc8f7727 Mon Sep 17 00:00:00 2001 From: Dolph Mathews Date: Fri, 1 Jul 2011 17:10:35 -0500 Subject: Added test automation script --- keystone/test/run_tests.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 keystone/test/run_tests.py diff --git a/keystone/test/run_tests.py b/keystone/test/run_tests.py new file mode 100644 index 00000000..b1292fc4 --- /dev/null +++ b/keystone/test/run_tests.py @@ -0,0 +1,26 @@ +import subprocess +import time + +if __name__ == '__main__': + #remove pre-existing test databases + subprocess.call(['rm', 'keystone.db']) + subprocess.call(['rm', 'keystone.token.db']) + + # populate the test database + subprocess.call(['../../bin/sampledata.sh']) + + # run the keystone server + server = subprocess.Popen(['../../bin/keystone']) + + # blatent hack. + time.sleep(3) + + # run tests + subprocess.call(['python', 'unit/test_keystone.py']) + + #kill the keystone server + server.kill() + + # remove test databases + subprocess.call(['rm', 'keystone.db']) + subprocess.call(['rm', 'keystone.token.db']) -- cgit