History log of /external/autotest/utils/test_importer.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
fce2064b1078bc7c29bbaedb2cdf0997285bcb4d 02-Feb-2017 Allen Li <ayatane@chromium.org> [autotest] Merge site modules in utils/

BUG=chromium:672727
TEST=None

Change-Id: Ia4462d369dc60c1298f253f645218831dcbc6e17
Reviewed-on: https://chromium-review.googlesource.com/435945
Commit-Ready: Allen Li <ayatane@chromium.org>
Tested-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
/external/autotest/utils/test_importer.py
04be2bd5e4666a5c253e9c30ab20555e04286032 08-May-2014 Ilja H. Friedel <ihf@chromium.org> Autotest: Change logging.warn() to logging.warning().

logging.warn() is deprecated. See
http://bugs.python.org/issue13235

Substitution was performed via
~/cros/src/third_party/autotest/files$ find ./ -type f | xargs sed -i 's/logging.warn(/logging.warning(/'

BUG=None.
TEST=There should be one-- and preferably only one --obvious way to do it.

Change-Id: Ie5665743121a49f7fbd5d1f47896a7c65e87e489
Reviewed-on: https://chromium-review.googlesource.com/198793
Commit-Queue: Ilja Friedel <ihf@chromium.org>
Tested-by: Ilja Friedel <ihf@chromium.org>
Reviewed-by: Alex Miller <milleral@chromium.org>
/external/autotest/utils/test_importer.py
621549355424e1a39529c9fd24d2a1486d79426a 12-Aug-2013 Alex Miller <milleral@chromium.org> [autotest] Use sys.exit() instead of exit() in test_importer

See http://stackoverflow.com/questions/6501121/the-difference-between-exit-and-sys-exit-in-python

TEST=None
BUG=None

Change-Id: I4918c8ed01d3c1a3a01b4d7f3a787cf07fa65be0
Reviewed-on: https://gerrit.chromium.org/gerrit/65594
Tested-by: Alex Miller <milleral@chromium.org>
Reviewed-by: Keyar Hood <keyar@chromium.org>
Commit-Queue: Alex Miller <milleral@chromium.org>
/external/autotest/utils/test_importer.py
ee5fb0debf0be3b05fb5d3882d611481ea382f83 31-Jul-2013 Keyar Hood <keyar@chromium.org> Autotest: Fix test_importer.py return code.

test_importer.py now returns the intended exit code instead of always
returning 0.

BUG=chromium:266156
TEST=Manual testing by having main() return 1 right away and then checking $?.

Change-Id: I56c1b32b85a7f35b7489c016a546c30f37bc3642
Reviewed-on: https://gerrit.chromium.org/gerrit/63829
Reviewed-by: Dennis Jeffrey <dennisjeffrey@chromium.org>
Commit-Queue: Keyar Hood <keyar@chromium.org>
Tested-by: Keyar Hood <keyar@chromium.org>
/external/autotest/utils/test_importer.py
e19d303a6718cbd9995e27485554212b63a0a701 30-May-2013 beeps <beeps@chromium.org> [autotest] pylint ignores setters, getters and special modules.

Prior to this change pylint only ignored one special module,
common. This change makes it so we can specify a list of
modules to ignore.

BUG=chromium:239949
TEST=Successfully uploaded this cl
run_pylint on:
1. modules with getters and setters.
2. a change which uses setup_django_lite.
3. module with actual unused modules.
4. repeat within the chroot.

Change-Id: I2cbd2b654cfc78323b9dd840c1822b2a60b02e83
Reviewed-on: https://gerrit.chromium.org/gerrit/51002
Tested-by: Prashanth Balasubramanian <beeps@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Commit-Queue: Prashanth Balasubramanian <beeps@chromium.org>
/external/autotest/utils/test_importer.py
3dd8beb386f7298ffe84d7410d00cce26973e170 14-May-2013 Aviv Keshet <akeshet@chromium.org> [autotest] make a consistent CONTROL_TYPE enum across the codebase

Prior to this CL, there were a multitude of duplicate defitions of the
two control files types (Client or Server), incluiding a difference
between the afe Job model (1 = Server) and the afe Test model (1 =
Client). This CL introduces enums CONTROL_TYPE and CONTROL_TYPE_NAMES to
control_data, to act as the central and consistent defition across the
codebase. In order to avoid needing to mangle the running Jobs table, we
have adopted the existing Job model convention (1 = Server); the Test
table will be re-written with the new consistent convention during test
import.

BUG=chromium:240643
TEST=All existing unit tests pass;
In local autotest without this patch applied, started a suite. Halfway
through suite, applied this patch, ran test importer, restarted apache,
and restarted scheduler. Suite finished successfully.
Verified manually that Client/Server type control files show up
correctly in afe Create Job view.
DEPLOY=scheduler
DEPLOY=apache
DEPLOY=test_importer

Change-Id: Ia5b2573e1d08d96b3826f2837903ef407dcae303
Reviewed-on: https://gerrit.chromium.org/gerrit/51191
Commit-Queue: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
/external/autotest/utils/test_importer.py
5cbd0f81babd0737799dfb447b53f04c35b9004d 29-Mar-2013 Dan Shi <dshi@chromium.org> [Autotest] Make help info more clear for option -E and -N

-E and -N options alone won't do anything to add experimental or
non-compliant tests to AFE. They need to work together with -A option.
Return an error if -E or -N is used without -A option.

BUG=chromium:223675
TEST=manually test in local machine

Change-Id: Ie490f2bcccf6df44f84f184a2a83b480ef4a81fb
Reviewed-on: https://gerrit.chromium.org/gerrit/46877
Commit-Queue: Dan Shi <dshi@chromium.org>
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
/external/autotest/utils/test_importer.py
6f455262ded933c1699fea410a9ddaf967df6330 02-Mar-2013 Aviv Keshet <akeshet@chromium.org> [autotest] Parse RETRIES from control files

Parse the RETRIES variable from control files and insert into job/test
databased entry. This happens in suite.py before creation of suite sub-jobs,
and in test_importer when importing new tests into afe_autotests database.

BUG=chromium-os:37158
TEST=unit.
Ran utils/test_importer.py and verified that 2 tests name
flaky_test both had test_retry imported correctly with value 2 (in
afe_autotests table).
Kicked off a dummyflake suite and verified that its sub jobs were
created with test_retry=2.

Change-Id: I93eb0f4581120082a82c46b2be98286ede248c94
Reviewed-on: https://gerrit.chromium.org/gerrit/44435
Tested-by: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Alex Miller <milleral@chromium.org>
Commit-Queue: Scott Zawalski <scottz@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Tested-by: Scott Zawalski <scottz@chromium.org>
/external/autotest/utils/test_importer.py
861b2d54aec24228cdb3895dbc40062cb40cb2ad 04-Feb-2011 Eric Li <ericli@chromium.org> Merge remote branch 'cros/upstream' into master

Merged to upstream autotest @4749~@5215.

The entire change list description is too big to enlist here. Please refer to upstream (http://autotest.kernel.org/browser) for more details.

BUG=
TEST=emerged both x86 and arm build.
Tested emerged x86 build bvt against a chromeos device.

Review URL: http://codereview.chromium.org/6246035

Change-Id: I8455f2135c87c321c6efc232e2869dc8f675395e
/external/autotest/utils/test_importer.py
bdaab795cffa33f9a37995bb283047cb03699272 07-Jan-2011 Kenneth Waters <kwaters@chromium.org> Revert "Merge remote branch 'cros/upstream' into autotest-rebase"

This reverts commit 7edb30498d75a29a3287fe07070f2b51a116c5d4.

TEST=Built for tegra2_seaboard
BUG=10756

Review URL: http://codereview.chromium.org/6124004

Change-Id: Ifcd1a2279f5a62b99552a8f961c1430889a3a928
/external/autotest/utils/test_importer.py
7edb30498d75a29a3287fe07070f2b51a116c5d4 07-Jan-2011 Eric Li <ericli@chromium.org> Merge remote branch 'cros/upstream' into autotest-rebase

Merged to upstream trunk@5066, from trunk@4749.

There is no way I could enlist each individual CL from the upstream here since it will blow up the changelist description field.

BUG=
TEST=
Had patched this CL into a fresh cut client to avoid any side effect.
run_remote_test bvt from both emerged location and third_party/autotest/file.

Both test passed!

We should also keep any eye on this to see how it gets propagated into cautotest server.
TBR=dalecurtis

Change-Id: I72f2bc7a9de530178484aea1bfb5ace68bcad029
/external/autotest/utils/test_importer.py
c781f55093bf5e78645d13c08447bc8fb0f49c1c 20-May-2010 lmr <lmr@592f7852-d20e-0410-864c-8624ca9c26a4> utils/test_importer.py: Make it use proper logging config

So it is consistent with other autotest applications.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4527 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/utils/test_importer.py
fed94091229cb4ea3bc2371c13e6f6846fce1a47 03-May-2010 jamesren <jamesren@592f7852-d20e-0410-864c-8624ca9c26a4> Make test_importer dry runs show warnings when control files are missing required variables

Signed-off-by: Scott Zawalski <scottz@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@4460 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/utils/test_importer.py
6e3e9bd25bcbe16ecc6e14fee07adab01536e4fc 28-Apr-2010 jamesren <jamesren@592f7852-d20e-0410-864c-8624ca9c26a4> In the case if there is some wrong in a control file, control_data module
will throw out a ValueError which is not captured, and it will stop the
entire test import process.

Add another catch block to capture all, log it, and keep moving to import
next test.



git-svn-id: http://test.kernel.org/svn/autotest/trunk@4448 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/utils/test_importer.py
ed0526aba7b4000c4558111bf42f8e3e7dbbe450 22-Apr-2010 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Update test_importer to not use rstrip and also to follow the proper @return style

Signed-off-by: Scott Zawalski <scottz@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4441 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/utils/test_importer.py
781d269bb961a7ea7bfb61a9f8c1d87320ed8ad0 21-Apr-2010 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Actually skip the invalid profiler in test_importer.py

Signed-off-by: Scott Zawalski <scottz@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4434 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/utils/test_importer.py
61be4cd430df250187506331b131c245d0f28b1a 30-Mar-2010 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> We wanted to have a little more flexibility with test_importer.py for chromeos. For example we wanted to import
all tests from client/site_tests and server/site_tests but only some from client/tests and server/tests.
We've added the following:
-The ability to pass a whitelist with -w that specifies a subset of tests within a tests/profilers/samples directory.
This option is incompatible with -a because if you're using -a you're probably already managing your tests by
adding/deleting files. The whitelist attribute does not clean anything so the pattern will be to run test_importer.py
with -C to clear all and then to run with -w.
-The ability to adjust any test attributes as a site-specific extension. We will use the file site_set_attributes.py
if it exists and it should include the function: 'def _set_attributes_custom(test, data)'.
We use this to adjust the following:
-Use the directory name instead of control-file NAME (handles multiple control files (control.xx) as dirname.xx.
-Globally set run_verify to 0

Signed-off-by: Mike Truty <truty@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4353 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/utils/test_importer.py
cd5131c818ea432d21413694c4ff53c03c4f9379 12-Jan-2010 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> Change test importer to use Django models

Signed-off-by: James Ren <jamesren@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4098 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/utils/test_importer.py
eab66ce582bfe05076ff096c3a044d8f0497bbca 23-Dec-2009 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> Rename the tables in the databases, by prefixing the app name. This is
in preparation for merging the two databases and the two Django
projects into one.

Note that this renames *all* standard Autotest DB tables in both the
autotest_web and tko databases. If you have scripts written directly
against these databases, *they will break*. If your scripts access
the RPC interfaces, they should continue to work.

Another patch will be along within the next few weeks to actually move
the TKO tables into the autotest_web database.

From: James Ren <jamesren@google.com>
Signed-off-by: Steve Howard <showard@google.com>

Rename the tables in the databases, by prefixing the app name. This is
in preparation for merging the two databases and the two Django projects
into one.

Note that this renames *all* standard Autotest DB tables in both the autotest_web and tko databases. If you have scripts written directly against these databases, *they will break*. If your scripts access the RPC interfaces, they should continue to work.

From: James Ren <jamesren@google.com>
Signed-off-by: Steve Howard <showard@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4040 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/utils/test_importer.py
bf0fb25822c0996ba59dd25bf659098d62393699 23-Nov-2009 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> Move import common to the top of our import list so that we use the site-packages MySQLdb module instead of the system installed one (Or failing if it doesn't exist). There are probably other code paths that need to be updated, we just never saw this issue beacuse we weren't really working with a system built from scratch since this change

Signed-off-by: Scott Zawalski <scottz@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3974 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/utils/test_importer.py
1dc2643fb307665fd0a1eefeea706d7a073703c8 03-Sep-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fix invalid SQL being executed when add_label_dependencies() is called
with empty "tests" sequence in test_importer.py.

Signed-off-by: Mihai Rusu <dizzy@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3642 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/utils/test_importer.py
25d656cafb0e9f731e405dfb79bb714c8421b4ed 25-Aug-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Don't import from the server/samples directory by default. These all
cause control_data.ControlVariableException and are skipped and not
imported as they are not modern control files.

Signed-off-by: Gregory Smith <gps@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3605 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/utils/test_importer.py
1ef218db76c473c28627377d8f50d6e6c6743289 03-Aug-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> This is the result of a batch reindent.py across our tree.
As Martin pointed out, we ought to be more careful and
create a pre-svn commit script to avoid inserting trash
in the tree, meanwhile, this is a good start to cleanup
things

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3487 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/utils/test_importer.py
4b5c31e1821307b880b57a41f6d8ea21948fc9e8 11-Jul-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> * update documentation in test_importer
* ensure test_importer always works with absolute paths. this is important since it uses paths to identify tests in the DB.
* fix control_data.parse_control() to raise an exception instead of sys.exit()ing upon SyntaxError

Signed-off-by: Steve Howard <showard@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3404 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/utils/test_importer.py
f6547fe4528da4e4c2826470048832155d1b1752 09-Jul-2009 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> Add kwarg level to logging.basicConfig call.

Signed-off-by: Scott Zawalski <scottz@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3387 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/utils/test_importer.py
68558223091c765d0cef92438f09c3f9918fa3fc 02-Jul-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> set executable on test_importer.py



git-svn-id: http://test.kernel.org/svn/autotest/trunk@3353 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/utils/test_importer.py
7c8ea99fecf140093f2fe3dcd0ab6b5bf65b1bbe 22-Jun-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Not all distros put a symlink in for the python version. However
all should have a /usr/bin/python target. There are still a couple
files that hardcode a /usr/lib/python2.4 path, but that's a harder
problem to solve and outside the scope of this patch.

Signed-off-by: Jesse Keating <jkeating@redhat.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3319 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/utils/test_importer.py
f1175bb2edbe3215f4bfa117c6b93d2e090d1d07 17-Jun-2009 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> get rid of some now-obsolete code
* client.common_lib.debug
* abstract_ssh.LoggerFile

Changed {SSHHost,ParamikoHost}.run() default args for std{out,err}_tee to a constant instead of None. This preserves the existing behavior (teeing to the logging module by default), but allows callers to explicitly avoid this teeing if desired, by passing stdout_tee=None.

Signed-off-by: Steve Howard <showard@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@3293 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/utils/test_importer.py
e8474bbe43eecca1ca18e1e4de4e71883fd4fdf1 13-May-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> When test_importer is run in a tree checked out from SVN, it crashes on SVN
control*.svn-base files. Let it ignore files containing .svn.

Signed-off-by: Jiri Benc <jbenc@suse.cz>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3141 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/utils/test_importer.py
da49cdf4a8fa7bac1cf477556af18ae5aa6a98d6 12-Mar-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Update test_importer to drop synch_type

From: Scott Zawalski <scottz@google.com>
Signed-off-by: John Admanski <jadmanski@google.com



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2874 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/utils/test_importer.py
79410e108630768934ee7717b40f847a5e30b4f2 20-Nov-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Update test_importer to import experiemental by default

From: Scott Zawalski <scottz@google.com>
Signed-off-by: Martin Bligh <mbligh@google.com>




git-svn-id: http://test.kernel.org/svn/autotest/trunk@2481 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/utils/test_importer.py
989f25dcbb6361218f0f84d1c8404761b4c39d96 01-Oct-2008 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> two new major features:

(1) added test and job dependencies
-added M2M relationship between tests and labels and between jobs and labels, for tracking the labels on which a test/job depends
-modified test_importer to read the DEPENDENCIES field and create the right M2M relationships
-modified generate_control_file() RPC to compute and return the union of test dependencies. since generate_control_file now returns four pieces of information, i converted its return type from tuple to dict, and changed clients accordingly.
-modified job creation clients (GWT and CLI) to pass this dependency list to the create_job() RPC
-modified the create_job() RPC to check that hosts satisfy job dependencies, and to create M2M relationships
-modified the scheduler to check dependencies when scheduling jobs
-modified JobDetailView to show a job's dependencies

(2) added "only_if_needed" bit to labels; if true, a machine with this label can only be used if the label is requested (either by job dependencies or by the metahost label)
-added boolean field to Labels
-modified CLI label creation/viewing to support this new field
-made create_job() RPC and scheduler check for hosts with such a label that was not requested, and reject such hosts

also did some slight refactoring of other code in create_job() to simplify it while I was changing things there.

a couple notes:
-an only_if_needed label can be used if either the job depends on the label or it's a metahost for that label. we assume that if the user specifically requests the label in a metahost, then it's OK, even if the job doesn't depend on that label.
-one-time-hosts are assumed to satisfy job dependencies.

Signed-off-by: Steve Howard <showard@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@2215 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/utils/test_importer.py
b6f95534ef8ef87144491d6ec14f4f3182b47bc8 30-Sep-2008 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> Remove debug statement from test_importer
add db_clean_broken to full run
move db execute lines out of if verbose statement so they are always executed
Risk: Low
Visibility: None

From: Scott Zawalski <scottz@google.com>
Signed-off-by: Steve Howard <showard@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@2207 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/utils/test_importer.py
66a5ef85fc720cfa4806f5531aada7f0660bda4c 30-Sep-2008 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> Quick change to compensate for .. relative to the utils directory
I thought I had this but apparently not.

Signed-off-by: Scott Zawalski <scottz@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@2206 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/utils/test_importer.py
322ec1afe58a974fba2e969d260d50f4de278a92 26-Sep-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Update test_importer
* Added profilers support
* Scan autotest directory for all control files and profilers with -A
* Add profilers part to clean broken
* Added more verbose options

Signed-off-by: Scott Zawalski <scottz@google.com>




git-svn-id: http://test.kernel.org/svn/autotest/trunk@2199 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/utils/test_importer.py
be3c12de1f18f4c18c213be9b1b1cb19cd4778ea 14-Aug-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Rename tests to a more intuitive name.

Signed-off-by: Scott Zawalski <scottz@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1989 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/utils/test_importer.py