summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-06-25tko.parsers: Support multiline, tabbed reasons. Improve parser robustness.HEADmasterlmr3-22/+45
Allowing reasons with multiple lines and tabs provides more flexibility in error messages. The parser is also more robust, as any invalid fields are moved into the reason and can be fixed offline without impacting the rest of the system. Signed-off-by: Dale Curtis <dalecurtis@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5452 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-25KVM Test: physical_resources_check: Update case and fix errorlmr1-84/+98
- update this case, make it easy to get failure from result. - fix some error in log message. - close session before exception raised. - update code style. Signed-off-by: Qingtang Zhou <qzhou@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5451 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-24KVM Test: kvm_monitor.py: Close socket explicitly if exception raised in ↵lmr1-5/+13
__init__ monitor socket will be initiated at the beginning of '*Monitor.__init__', if exception occur in this function, socket will not be closed correctly. In this case, socket should be closed explicitly. Signed-off-by: Qingtang Zhou <qzhou@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5450 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-24Fix bug #55: 'FsdevManager' object has no attribute 'check_mount_point'lmr1-3/+24
This fixes bug 55, found by Shrirang Phansalkar when trying to use an API present on fsdev_disks.py: Some needed methods were missing from the base implementation present on fsdev_mgr, map_drive_name and check_mount_point. This patch adds them. Signed-off-by: Gregory P. Smith <gps@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5449 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-23web: Turn django debug mode in global_config.ini optionslmr2-4/+15
With the change to Django 1.3, DEBUG=True in settings.ini will make the queries performed by the ORM subsystem to be printed, hence the scheduler logs will contain those queries. As this is too much verbosity for 'production' autotest servers, turned DEBUG and DEBUG_TEMPLATE django config variables into configurable options on global_config.ini. The options were explained, and DEBUG is set to False by default. Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5446 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-23utils.external_packages: Introduce minimum_versionlmr1-1/+7
Some python modules, such as setup tools, might have a minimum version under which the needed functionality for autotest is OK. In case of setup tools, any version equal or higher than 0.6 is OK, but in case the module is completely missing, we'll install 0.6c11, which is the latest upstream. So, make possible to specify 'minimum versions' for packages, if we have that one, make the is_needed check with that version. Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5445 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-22Reindentation on the autotest treelmr4-4/+0
Prune all files, removing trailing whitespaces and incorrect indentation. Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5444 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-22Small adjustments on toplevel README filelmr1-6/+17
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5443 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-22Add artwork directory, with new logolmr5-0/+2845
Remove the old logo lying around on the Documentation directory, and add a new artwork directory, with the logo Mairin Duffy (duffy@redhat.com) had drawn. Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5442 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-22Add a new logo for the autotest web interfacelmr1-0/+0
This new logo, designed by Mairin Duffy (duffy@redhat.com), will be used as the autotest logo. Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5441 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-22KVM test: get_started.py: Remove confusing questionlmr1-7/+0
After receiving some feedback on get_started.py, resolved to remove a question regarding NFS shares. Since the script prints the directories clearly, if one wants to setup NFS or symlinks, he/she will do it. Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5440 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-22frontend.afe.model_logic: Fix incorrect calls to as_sqllmr1-8/+12
Spot 2 other places in django custom model logic that were using as_sql as a query method. Make the calls to be done on a compiler instance, fixing more unittest problems. Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5439 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-22database.database_connection: Fix _copy_exceptionslmr1-2/+11
Under the django backend, Django 1.3 does not have OperationalError and ProgrammingError anymore (as those are specific to the MySQL backend). So in this case, let's mock OperationalError and ProgrammingError with DatabaseError, which is the base DB error on Django. This commit fixes autotest_lib.scheduler.monitor_db_functional_test Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5438 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-22Add Afe special SQLite based DB backendlmr7-1/+52
For the database unittests, the same change made to support the method get_from_clause on the MySQL backend (see 5408) has to be made for the SQLite backend, as the unittests run under this very database engine. So we had to end up adding a new engine that supports this additional method on compiler, so we can fix the unittest autotest_lib.frontend.afe.rpc_interface_unittest Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5437 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-21global_config.ini: Add new parameters to global config for easier discoverylmr1-2/+13
I've bundled all the new parameters from the previous few patch sets into the global config so that future users may discover them more easily. Additionally, I cleaned up some inconsistent spacing. Signed-off-by: Dale Curtis <dalecurtis@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5436 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-21client tools: Fix rebase bug on cd_hash.pylmr1-1/+1
I really thought I had fixed this one. cd_hash makes reference to a KvmLoggingConfig class, that existed prior to the refactor. Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5435 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-21client/common_lib/hosts/base_classes.py: Unify host up/down timeouts and ↵lmr2-24/+27
expose in global_config Confusingly, timeouts for the same thing are set differently in multiple places. Also, many of the host timeouts are far too long for Chrome OS. As such, I've unified a couple of the host timeouts and exposed the default values through global config. Signed-off-by: Dale Curtis <dalecurtis@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5434 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-21server/crashcollect.py: Add control for crash collection timeout to ↵lmr1-1/+7
global_config The four hour timeout for crash collection is way too long for Chrome OS, so we moved this parameter into global config for easier control. Signed-off-by: Dale Curtis <dalecurtis@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5433 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-21server/hosts/abstract_ssh.py: Allow for site extension of base ssh commandlmr1-2/+7
There have been several cases where we need to modify the SSH command line for Chrome OS. This patch adds site extensibility to the make_ssh_command function in abstract_ssh. Signed-off-by: Dale Curtis <dalecurtis@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5432 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-21utils: Fix unicode conversion errors in matrix_to_string()lmr1-1/+1
str() method will fail if there are non-ascii characters in the string. A "UnicodeEncodeError: 'ascii' codec can't encode characters..." error will be generated in this case. Since this method is used by the scheduler to setup emails, the scheduler can get into a nasty failure loop here. The fix is simply to encode the string as utf-8. This fixes the original issue introduced with http://autotest.kernel.org/changeset/5076 Signed-off-by: Dale Curtis <dalecurtis@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5431 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-16client/common_lib/logging_manager_test.py: Fix unittest for py >= 2.6lmr1-3/+5
The logging manager unittest relies on some internals of the python unittest implementation. On py >= 2.6, the actual test method is called in the file case.py, rather than unittest.py, which is the appropriate file in python 2.4. So let's take both into account. Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5430 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-16Planner: remove client applicationlmr44-2282/+0
This removes the client part of the Planner application, including all GWT Java files, the HTML file that is used as planner "index" page (the default page). This also removes the planner URL in the client json rpc proxy. Signed-off-by: Cleber Rosa <crosa@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5429 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-16Planner: add migration script to drop planner tables from autotest_web databaselmr1-0/+443
This migration script properly drops planner tables when going to this (066) schema version, and creates all tables when going back to version 065. This last bit is huge, incorporating bits from schema_051.sql and other migration scripts. I wonder if it's time to rebase the schema version. Signed-off-by: Cleber Rosa <crosa@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5428 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-16Planner: remove backend applicationlmr20-3362/+0
This removes the planner backend (django) application. Signed-off-by: Cleber Rosa <crosa@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5427 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-16Planner: remove apache configurationlmr3-6/+1
This removes the apache configuration for the Planner application (both backend and client). Signed-off-by: Cleber Rosa <crosa@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5426 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-16frontend: remove planner from django configuration fileslmr2-4/+0
This removes references from the planner app from django configuration files. Signed-off-by: Cleber Rosa <crosa@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5425 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-16utils/external_packages.py: remove gwt incubatorlmr1-34/+0
external_packages.py hold a number of classes that represent autotest's dependencies. Remove the one that represents gwt incubator so that it's not installed by build_externals.py Signed-off-by: Cleber Rosa <crosa@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5424 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-16utils/compile_gwt_clients.py: remove gwt incubator from java classpathlmr1-3/+3
gwt incubator is deprecated, so remove it from the list of libraries when compiling gwt apps. Signed-off-by: Cleber Rosa <crosa@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5423 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-14Extend base_job_unittest for support subtest changelmr1-0/+20
Signed-off-by: Jiri Zupka <jzupka@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5422 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-14client test: Make subtest return test resultlmr1-2/+2
If subtest is successful runsubtest returns True otherwise False. Signed-off-by: Jiri Zupka <jzupka@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5421 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-14KVM test: Repair minor exception text formatting in kvm.pylmr1-1/+2
Signed-off-by: Jiri Zupka <jzupka@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5420 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-09Make sure logging handlers are closed when removedlmr1-0/+1
Make sure handlers are closed. Signed-off-by: Jongki Suwandi <jsuwandi@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5419 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-07Include Group=autotest in systemd configurationlmr1-0/+1
Signed-off-by: James Laska <jlaska@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5418 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-06KVM test: Add ahci+usb variantslmr1-0/+8
Add test variants for ahci and usb to the tests_base.cfg.sample file. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5417 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-06KVM test: usb stick disk supportlmr1-0/+9
This patch adds support for virtual usb sticks. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5416 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-06KVM test: usb cdrom supportlmr1-0/+10
This patch adds support for virtual usb cdrom drives. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5415 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-06KVM test: ahci cdromslmr1-4/+20
This patch adds support for AHCI cdroms. SCSI cdroms work too as side effect. The patch also adds cd_format, which is the same as disk_format but for cdroms. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5414 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-06KVM test: ahci disk imageslmr1-1/+15
This patch adds support for AHCI disk images. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5413 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-06KVM test: usb cdrom supportlmr1-0/+4
This patch adds support for virtual usb cdrom drives. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5412 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-06Add primary key id in table afe_hosts_labelslmr1-0/+7
This key is now required when performing queries on that table, for validation. Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5411 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-06utils.external_packages: Bump version number requirements for web depslmr1-6/+6
With the previous patchset that fixes the frontend running under Django 1.3, tested the frontend code compilation with the latest versions of gwt and gwt-incubator with success. The interface looks pretty good, and therefore, let's bump version numbers for: * Django * gwt * gwt-incubator On build_externals.py all at once. This is important so we can keep the code working under new versions of the foundation components of the web interface. Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5410 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-06frontend.settings: Change web app to use new DB enginelmr1-1/+2
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5409 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-06frontend.db: Adding afe custom database enginelmr8-0/+57
Turns out that we rely on custom code to generate joins that does some trickery with Django ORM system, and was using a method calling get_from_clause, that was present on the Query class on Django 1.1. Now, the method was moved to a class upper in the hierarchy, called SQLCompiler, and SQLCompiler is tied to the db backend being used. After some research, seems like there's no solution cleaner than implementing one db backend special for autotest, just to accomodate this function. So created one db engine that inherits pretty much everything from the mysql one, except for the compiler classes. Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5408 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-06frontend/tko/models.py: Fix calls to as_sql methodlmr1-2/+5
In Django 1.3, Query objects do not possess the as_sql method. Let's fix that, by calling as_sql on the SQLCompiler class. Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5407 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-06frontend.afe.model_logic: Rename validate_uniquelmr1-2/+2
So we call the actual intended validation method rather than the django one, that could return None, and then raise a non intended exception during the validation process. Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5406 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-06frontend.afe.model_logic: Removing get_from_clause() from custom query classlmr1-15/+0
As this method does not belong to the query class under Django 1.3 anymore. Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5405 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-06web frontend: Update admin site URL dispatcher to Django 1.3lmr1-1/+1
admin.site.root does not exist under Django 1.3 anymore. Use, therefore, the current idiom to specify the admin URL. Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5404 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-06KVM test: Changing KVM autotest default to private bridgelmr1-5/+7
Rather than the unsupported userspace mode, which still is an option. This way we are giving users a default setup much closer to a real world usage scenario, and enable people to run all the network tests that don't work properly in user mode. Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5403 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-06KVM test: setup tap fd and pass it to qemu-kvm v3lmr4-44/+50
We used to use qemu-ifup to manage the tap which have several limitations: 1) If we want to specify a bridge, we must create a customized qemu-ifup file as the default script always match the first bridge. 2) It's hard to add support for macvtap device. So this patch let kvm subtest control the tap creation and setup then pass it to qemu-kvm. User could specify the bridge he want to used in configuration file. The original autoconfiguration was changed by private bridge setup. Changes from v1: * Combine the private bridge config and TAP fd in one patchset, dropped the "auto" mode Changes from v2: * Close TAP fds on VM.destroy() (thanks to Amos Kong for finding the problem, and for Cleber and Jason for actually fixing it). Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5402 592f7852-d20e-0410-864c-8624ca9c26a4
2011-06-06KVM test: virt_env_process: Setup private bridge during postprocessinglmr1-0/+9
Call bridge setup at preprocessing and cleanup at postprocessing. The bridge can be cleaned up when no tap interfaces are using it. Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5401 592f7852-d20e-0410-864c-8624ca9c26a4