diff --git a/checkin_notes b/checkin_notes index b381b3afaf..83bb4f4136 100755 --- a/checkin_notes +++ b/checkin_notes @@ -6025,3 +6025,11 @@ Karl 2003/08/25 - 2003/09/02 database.py (added) Makefile.am + +Karl 2003/09/02 + - temporarily remove satellite test cases from 'make check' + - check MySQL setup in test_sanity + + test/ + Makefile.am + test_sanity.py diff --git a/py/database.py b/py/database.py index 4a77a380c4..8f2c86b4ee 100644 --- a/py/database.py +++ b/py/database.py @@ -217,7 +217,7 @@ class DatabaseTable: try: # object already exists in cache? object = self.objects[id] - if object.in_limbo: + if 'in_limbo' in object.__dict__: # we set the object cache so that we don't recurse; update # it with real values and delete the 'in limbo' flag del object.__dict__['in_limbo'] diff --git a/test/Makefile.am b/test/Makefile.am index 15bd15eaa6..63c2b965fc 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -3,14 +3,16 @@ include $(top_srcdir)/Makefile.incl TESTS = test_sanity.py \ - test_uc.py \ - test_concat.py \ - test_1sec.py \ - test_abort.py \ - test_rsc.py \ - test_exit.py \ - test_signal.py \ - test_masterurl_failure.py + test_uc.py + +# test_concat.py +# test_1sec.py +# test_abort.py +# test_rsc.py +# test_exit.py +# test_signal.py +# test_masterurl_failure.py + # TODO: phase out php stuff diff --git a/test/test_sanity.py b/test/test_sanity.py index 8ab606d5a2..2092dcd731 100755 --- a/test/test_sanity.py +++ b/test/test_sanity.py @@ -5,7 +5,12 @@ from testbase import * import urllib, random -# test makes sure that testing framework is sane +# Test makes sure that testing framework is sane: +# +# - executables compiled +# - cgi server works +# - test proxy works +# - mysql permissions and command-line client works def read_url(url, quiet=False): '''return 1 line from url''' @@ -26,7 +31,7 @@ def read_url(url, quiet=False): return '' if __name__ == '__main__': - test_msg("framework sanity"); + test_msg("framework sanity") verbose_echo(1, "Checking executables") check_core_client_executable() @@ -85,3 +90,12 @@ echo "%s" error("couldn't access a cgi file I just wrote: "+cgi_path+"\n using url: "+cgi_url) os.unlink(cgi_path) + + + database_name = 'boinc_test_sanity_mysql_%s_%d'%( + os.environ['USER'], random.randint(0,2**16)) + + # create and drop a database + verbose_echo(1, "Checking mysql commandline and permissions") + shell_call('echo "create database %s" | mysql' % database_name) + shell_call('echo "drop database %s" | mysql' % database_name)