History log of /external/autotest/client/common_lib/test.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
78a16a5d15229a9958a033570197f3c3af87eacb 16-Dec-2015 David Sharp <dhsharp@chromium.org> output_perf_value: If units is None, then we can't check its length.

BUG=None
TEST=None

Change-Id: I5fbc5a7e30c539e3c56800faa79c899e5d8f18f8
Reviewed-on: https://chromium-review.googlesource.com/318761
Commit-Ready: David Sharp <dhsharp@chromium.org>
Tested-by: David Sharp <dhsharp@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
/external/autotest/client/common_lib/test.py
4beca02ac922291c63cc65a96b43eed4e26f469e 16-Jun-2015 Christopher Grant <cjgrant@google.com> autotest: let after-test hooks see exceptions.

The "after iteration hooks" are the first code to run after run_once(),
in both the success and failure cases. This change gives the hooks a
chance to check for a pending exception and log extra information if
needed.

BUG=None
TEST=Verify server/client-side test exceptions are visible in hooks.

Change-Id: I2d8248d329130d515a8e0d8dfd8c6093a253eed3
Reviewed-on: https://chromium-review.googlesource.com/278025
Reviewed-by: Ilja Friedel <ihf@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
Commit-Queue: Christopher Grant <cjgrant@chromium.org>
Tested-by: Christopher Grant <cjgrant@chromium.org>
/external/autotest/client/common_lib/test.py
b16491a6e6430503be036a1e52c8421f45aaa434 11-Jun-2015 Christopher Grant <cjgrant@google.com> autotest: reverse order of after-run_once hooks.

Hooks can be registered to run before and after run_once(). Execute the
"after" hooks in reverse order, so that before/after pairs work like a
stack. This makes log entries look more sensible.

BUG=None
TEST=./test_unittest.py

Change-Id: Id88981552e442e7035b3717f43fcdc4f4c5245b0
Reviewed-on: https://chromium-review.googlesource.com/277037
Reviewed-by: Dan Shi <dshi@chromium.org>
Trybot-Ready: Christopher Grant <cjgrant@chromium.org>
Tested-by: Christopher Grant <cjgrant@chromium.org>
Reviewed-by: Ilja Friedel <ihf@chromium.org>
Commit-Queue: Christopher Grant <cjgrant@chromium.org>
/external/autotest/client/common_lib/test.py
d06a7a57cbf9e1fd254a6058684aa215448acd0b 07-Nov-2014 Ilja H. Friedel <ihf@chromium.org> autotest: perf upload higher_is_better defaults to None.

It was noted that ChromeOS telemetry always uploads with
higher_is_better=True. This prevents it from being processed
as on other platforms. Most pure autotests are already setting
this value. And the dashboard seems to still handle None
perfectly fine.

TEST=None.
BUG=chromium:431990

Change-Id: I4a3eae7686d98da5647d338aca6dd3fa8187f4b9
Reviewed-on: https://chromium-review.googlesource.com/228374
Tested-by: Ilja Friedel <ihf@chromium.org>
Reviewed-by: Fang Deng <fdeng@chromium.org>
Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>
Commit-Queue: Ilja Friedel <ihf@chromium.org>
/external/autotest/client/common_lib/test.py
31e84847d75008feffe2c89da4ec290adc904156 17-Oct-2014 Ilja H. Friedel <ihf@chromium.org> autotest: Remove screenshot from common_lib/test.py.

1) It is not at the right place for capturing server tests causing
exceptions.
2) It is not at the right place for capturing non-trivial (not black
or login) screens.

BUG=chrome-os-partner:33045, chromium:424120
TEST=None.

Change-Id: Ia578434d84799f08d50533be8ed8eb5d63507b36
Reviewed-on: https://chromium-review.googlesource.com/223834
Reviewed-by: Wai-Hong Tam <waihong@chromium.org>
Tested-by: Ilja Friedel <ihf@chromium.org>
/external/autotest/client/common_lib/test.py
8753d83937751e6d2eb2646ea5af68979bb76312 08-Oct-2014 Ilja H. Friedel <ihf@chromium.org> autotest: refactor graphics_utils.

Move screenshot code to graphics_utils.
Move xsystem et al to cros_ui.py.
Fail if X is used under freon.
Make pylint happy.

TODO: write a (unit/auto)test for graphics_utils.

BUG=chromium:422414
TEST=Ran graphics_GLMark2 power_Consumption power_Backlight ui_SystemTray
on nyan_big, verified that code got exercised and is not broken.
Ran camera_V4L2 desktopui_GmailLatency graphics_GLAPICheck graphics_Gbm
graphics_Piglit graphics_SanAngeles hardware_VideoOutSemiAuto on
link_freon and nyan_big and made sure we got reasonable pass/fail.

Change-Id: I31f49d8c7b7a4e899bf47ba0b3543fc8755eecb8
Reviewed-on: https://chromium-review.googlesource.com/222990
Reviewed-by: Haixia Shi <hshi@chromium.org>
Commit-Queue: Ilja Friedel <ihf@chromium.org>
Tested-by: Ilja Friedel <ihf@chromium.org>
/external/autotest/client/common_lib/test.py
21bf562287827708a3acc2843fca33f3d0876500 09-Sep-2014 Ilja H. Friedel <ihf@chromium.org> Clean strings before upload to perf dashboard.

platform_MemoryMonitor is currently failing and not reporting perf
values to the dashboard due to bad characters in the string. This
is a common mistake and usually corrected by replacing bad
characters. We use as default '_' but allow a test to override this.

Furthermore, remove unused variables and do some pylint housekeeping.

BUG=None.
TEST=pylint

Change-Id: I833e08724a9b5b8f684117807ad8d25101f7c5c5
Reviewed-on: https://chromium-review.googlesource.com/217139
Commit-Queue: Ilja Friedel <ihf@chromium.org>
Tested-by: Ilja Friedel <ihf@chromium.org>
Reviewed-by: Fang Deng <fdeng@chromium.org>
/external/autotest/client/common_lib/test.py
ac1a4c528813a69cb7c2f9a41e0b7b0aaf1b33fa 21-Aug-2014 Prathmesh Prabhu <pprabhu@chromium.org> autotest: Log errors raised by tests early.

Autotest catches exceptions raised by tests and raises them later, after it has
run some cleanup code. This CL adds logging at the point where the exception is
caught. This eases correlating the error with other (non-autotest) logs because
the timestamp on the log message is closer to the actual error.

BUG=chromium:403470
TEST=Run a faulty client test and observe the log message before messages logged
by the cleanup code.

Change-Id: I47837c92755090b04393c6368ab82f035c33ed5f
Reviewed-on: https://chromium-review.googlesource.com/213350
Reviewed-by: Prashanth B <beeps@chromium.org>
Commit-Queue: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
/external/autotest/client/common_lib/test.py
1d8803b92bb74d3c9cf6eb17fa3ee8eee112357e 19-Jun-2014 Dan Shi <dshi@chromium.org> [autotest] Take a screenshot when a test fails.

If X is not running, no screenshot will be taken.

BUG=chromium:383605
TEST=test_that 172.22.30.146 dummy_Fail
confirm screenshot is created, e.g.,
/tmp/test_that_results_rQiKvU/results-1-dummy_Fail/dummy_Fail.Fail/debug/dummy_Fail.Fail-fail-0.png

Change-Id: Ic044f611ab6f5d65d8ca973f9847346b3599891c
Reviewed-on: https://chromium-review.googlesource.com/204689
Commit-Queue: Dan Shi <dshi@chromium.org>
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
/external/autotest/client/common_lib/test.py
dc0daf27c5058e6e619fcc5f9526b506505279dd 18-Jun-2014 Scott Zawalski <scottz@chromium.org> Revert "Take a screenshot when a test unexpectedly fails."


This addition makes the assumption that we will always be running tests with X.


BUG=chromium:383605

This reverts commit 1b61f49389c5d690e942748398cd8fbd01a7ce91.

Change-Id: I959de731104714e21a411e9faa009bb7ef097377
Reviewed-on: https://chromium-review.googlesource.com/204411
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Tested-by: Scott Zawalski <scottz@chromium.org>
/external/autotest/client/common_lib/test.py
1b61f49389c5d690e942748398cd8fbd01a7ce91 17-Jun-2014 Achuith Bhandarkar <achuith@chromium.org> Take a screenshot when a test unexpectedly fails.

BUG=chromium:383605
TEST=manual

Change-Id: Id4dd636644b0cbff2abab8a8b6058ad752ac9cde
Reviewed-on: https://chromium-review.googlesource.com/204380
Tested-by: Achuith Bhandarkar <achuith@chromium.org>
Reviewed-by: Rohit Makasana <rohitbm@chromium.org>
Commit-Queue: Achuith Bhandarkar <achuith@chromium.org>
/external/autotest/client/common_lib/test.py
9f85240d78a0144f741987e64f795972bd7d0dfc 15-Apr-2014 Owen Lin <owenlin@chromium.org> common_lib/test.py - Make tmpdir and resultsdir writable for all.

BUG=chromium:362220
TEST=run video_VDAPerf on an arm chromebook

We may write to those directly as chronos instead of root.

Change-Id: I485a712af57442c7e719477fd4b20b5e92eb23e0
Reviewed-on: https://chromium-review.googlesource.com/195121
Reviewed-by: Yuli Huang <yuli@chromium.org>
Tested-by: Owen Lin <owenlin@chromium.org>
Commit-Queue: Owen Lin <owenlin@chromium.org>
/external/autotest/client/common_lib/test.py
2ca9777726b79bae8c4d14ed16a39338a6890992 22-Oct-2013 Dan Shi <dshi@chromium.org> [autotest] Force to collect all logs if test failed.

The default behavior is to save only new data in /var/log. This CL changes that
behavior so that, if a test failed, all files in /var/log will be collected.

BUG=chromium:303352
TEST=test_that 172.22.75.225 dummy_Fail
check results folder that contains all files in /var/log:
/tmp/test_that_results_0JCjJZ/results-1-dummy_Fail/dummy_Fail.Fail/sysinfo/var/log/
If the test passed, the folder should be var/log_diff.

Change-Id: I4c876c4a25a129841ff82763412aec2b317825a1
Reviewed-on: https://chromium-review.googlesource.com/174058
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
Commit-Queue: Dan Shi <dshi@chromium.org>
/external/autotest/client/common_lib/test.py
e689e71e9057f5d1f1d878588e56b3aa360228c3 14-Nov-2013 Fang Deng <fdeng@chromium.org> [autotest] telemetry_Benchmarks upload perf data using output_perf_value

telemetry_Benchmarks now upload perf data using output_perf_value.
It will not write to the keyval file anymore.

After the change lands, we should stop the scripts extract_perf.py
and generate_perf_graphs that are currently kicked off
by cron to upload the perf data.

Also makes output_perf_value accept empty unit.

CQ-DEPEND=I0b746f4ab3162eb7ba4aefa12294b7a60e326513
TEST=1)Locally kicked off the tests from the AFE,
confirmed that the perf data was uploaded to the testing
perf dashboard.
2)test_unittest.py telemetry_runner_unittest.py
BUG=chromium:280634

Change-Id: Icf6dca08cab0268b41f8359eb73084dfee3e4b9d
Reviewed-on: https://chromium-review.googlesource.com/176746
Reviewed-by: Fang Deng <fdeng@chromium.org>
Tested-by: Fang Deng <fdeng@chromium.org>
Commit-Queue: Fang Deng <fdeng@chromium.org>
/external/autotest/client/common_lib/test.py
7f24f0bfe69b2f36ba74350fba9ad547ac55571c 12-Nov-2013 Fang Deng <fdeng@chromium.org> [autotest] test can output graph name when calling output_perf_value

Previously, if we want to group several perf measurements together
to be displayed on the same graph, we need to specify the mapping
information in perf_dashbaord_config.json. However, some tests
like telemetry_Benchmarks output many metrics. We would end up
with a very huge config file if we specify them all. It would require
much efforts if those metrics change in the future.
This change is to allow test to output graph names dynamically.

1) output_perf_value now takes a new arg 'graph'. This value is
written to the json file perf_measurements.
2) a new column 'graph' is added to the database table
tko_iteration_perf_value.
3) the tko parser is modified to store the value of 'graph' from
perf_measurements to the database.
4) perf_uploader is modified to upload a perf measurement to the
specific graph if 'graph' is set.

Example:
Previously, if we wanted to specify group "metric1" and "metric2"
to the same graph "metricGroupA", and group "metric3" and "metric4"
to "metricGroupB", the json needed to look like:
{
“autotest_name”: “myTest”,
“master_name”: “myMaster”,
“dashboard_test_name”: “myCoolTest”
“graphs”: [
{
“graph_name”: “metricGroupA”,
“descriptions”: [“metric1”, “metric2”]
},
{
“graph_name”: “metricGroupB”,
“descriptions”: [“metric3”, “metric4”]
},

]
}
After this change list lands, the json file will not
take "graphs" configuration. It will look like.
{
“autotest_name”: “myTest”,
“master_name”: “myMaster”,
“dashboard_test_name”: “myCoolTest”
}
Meanwhile, the test should call
output_perf_value(description="metric1", units=.., higher_is_better=..,
graph='metricGroupA')
output_perf_value(description="metric2", units=.., higher_is_better=..,
graph='metricGroupA')
output_perf_value(description="metric3", units=.., higher_is_better=..,
graph='metricGroupB')
output_perf_value(description="metric4", units=.., higher_is_better=..,
graph='metricGroupB')

BUG=chromium:315274
TEST=1) Verified all unit tests passed: version_1_unittest.py,
perf_uploader_unittest.py
2) Modify perf_uploader.py to use staging perf dashboard server
_DASHBOARD_UPLOAD_URL =
'https://chrome-perf.googleplex.com/add_point'
Modify platform_BootPerfServer to output graph name.
Invoked platform_BootPerfServer from local AFE.
Verify that the perf_measurements file have the graph name.
Verify that the data was displayed correctly in the dashboard.
3) python migrate.py sync 82, to verify column 'graph' get created
python migrate.py sync 81, to verify column 'graph' is dropped
DEPLOY=migrate (/usr/local/autotest/database$ python migrate.py sync 82)

Change-Id: I0b746f4ab3162eb7ba4aefa12294b7a60e326513
Reviewed-on: https://chromium-review.googlesource.com/176575
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Queue: Fang Deng <fdeng@chromium.org>
Tested-by: Fang Deng <fdeng@chromium.org>
/external/autotest/client/common_lib/test.py
918863f5297653bd470674d29db0e4dc5c159a07 20-Jun-2013 Dennis Jeffrey <dennisjeffrey@chromium.org> Add function output_perf_value() that tests can use to output perf measurements.

Also modify platform_GesturesRegressionTest to invoke this function.

The output_perf_value() function causes perf measurements to be outputted
to a result file named "perf_measurements" in the test result directory,
next to the "keyval" file where perf keyvals are currently written. Once
ready, all chromeOS perf tests that need to output perf measurements will
be converted to use output_perf_value() rather than write_perf_keyval().

This change is the first part of a series of changes in which we are
changing how autotest handles and stores perf test data, to align more
closely with the information required by Chrome team's performance
dashboard. In a later CL, the autotest TKO parser will be modified to
parse the "perf_measurements" file and insert that data into the results
database.

BUG=chromium:258226,chromium:258228
TEST=Invoked run_remote_tests.sh with the new version of
platform_GesturesRegressionTest on a local lumpy device, then verified that
the result directory on the device contained a "perf_measurements" text file
with the expected info.

Change-Id: I43bad95b4413139bff47b121667d107dfc054519
Reviewed-on: https://gerrit.chromium.org/gerrit/61565
Reviewed-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Fang Deng <fdeng@chromium.org>
Commit-Queue: Dennis Jeffrey <dennisjeffrey@chromium.org>
Tested-by: Dennis Jeffrey <dennisjeffrey@chromium.org>
/external/autotest/client/common_lib/test.py
39164cad07a790017c84482bb5f68768b27313cf 27-Mar-2013 Aviv Keshet <akeshet@chromium.org> [autotest] only retry tests if they fail with TestFailRetry

For tests that have known flaky failure modes, it is still desirable for
the test to fail (without retries) when an unknown flaky failure occurs.
Therefore, this CL changes the behavior of test retries, so that retires
of a test are only attempted if the test fails with a TestFailRetry
exception. Any other test failure will be treated as a failure
regardless of retries.

This means it is up to the tests in question to catch errors /
exceptions caused by known flaky failure modes, and rethrow those as
TestFailRetry.

For the purposes of testing this change, some changes have been made to
the dummyflake suite.

CQ-DEPEND=Ibaa84f42beac52881cd34351e92474ef1457b15b

BUG=chromium:224372
TEST=added new unit test for test.py
run_remote_tests.sh --remote=<ip> suite:dummyflake;
Suite runs as expected. In particular --
- client/.../dummy_Fail/control.retry_alwaysfail fails immediately even
though the control file uses retries, because the failure is of type
TestFail and hence not retry-able
- The same applies to server/.../dummy_Fail/control.retry_failfast
- client/.../dummy_Fail/control.retry_alwaysflake fails and gets
retried 5 times, failing with a TestRetryFail each time such that it
can be retried

Change-Id: I4d1354cb410856c9de8b720c9f8310cb10d03156
Reviewed-on: https://gerrit.chromium.org/gerrit/46696
Commit-Queue: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
/external/autotest/client/common_lib/test.py
91493c88a1506729a6728660d90cfae591cd52aa 25-Jan-2013 Scott Zawalski <scottz@google.com> Introduce a mechanism for retrying tests at the control file level.

If a test returns unsuccessfully and --retry-test > 0 is specified the test
will be rerun. Options were added to autoserv and are passed through to the
client side job by modifying the base_job.

Tests that fail and then succeed within the --retry-test limits will have a
test keyval set with the number of attempts |test_retries_before_success|.

--retry-test can be utilized immediately in run_remote_test but will need to
be piped through the RPC system and down to the scheduler to provide the proper
--retry-test value from the scheduler's perspective.

Fixed random pylint errors consisting mostly of unused imports.

TEST=unittests
created a randomly failing client and server side test and ran it on devices
BUG=chromium-os:37158

Change-Id: Ibec3935b5f6fd28fc1b6eb7be55de27a571ad777
Reviewed-on: https://gerrit.chromium.org/gerrit/42043
Commit-Queue: Scott Zawalski <scottz@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Tested-by: Scott Zawalski <scottz@chromium.org>
/external/autotest/client/common_lib/test.py
456d3c115952bf1ae984770e226c5a50676b31c0 19-Jul-2011 Dale Curtis <dalecurtis@chromium.org> Upstream Autotest merge.

Merged from d9d64b855363d214996b187380532d4cc9991d29.

BUG=none
TEST=emerge autotest-tests, local server, run_remote_tests.

Change-Id: Id8cf1ef930bc0cd80347d77f2de65561be2a12a4
Reviewed-on: http://gerrit.chromium.org/gerrit/4664
Reviewed-by: Mike Truty <truty@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Tested-by: Dale Curtis <dalecurtis@chromium.org>
/external/autotest/client/common_lib/test.py
74a314b490ff542c4dd2ae4aa0d11c6394d92960 23-Jun-2011 Dale Curtis <dalecurtis@chromium.org> Upstream Autotest merge.

As titled, a merge up to 93fc426ca133e775eb495f34d138fc57d92fb55e.

- Removes a bunch of deprecated code.
- Moves several private utilities into the private repo.
- Couple changes ported upstream and resynced.

BUG=None
TEST=In progress... will spin up new Autotest server and use
run_remote_tests for bvt, regression, smoke.

Change-Id: Id3e2ad529bb7b05f148e5d98aea46bb9ea828200
Reviewed-on: http://gerrit.chromium.org/gerrit/3350
Tested-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
/external/autotest/client/common_lib/test.py
daf6ff0673466abb5b2cf65ca0c5dfe78360a082 02-Mar-2011 Eric Li <ericli@chromium.org> Merge remote branch 'autotest-upstream/master' into merge-upstream

rev 5270 and 5271.

BUG=None
TEST=Run BVT test.

Change-Id: I46ee56cea4861d9dd35b98f0a21536122714518c

[PATCH] After_iteration hooks are not executed if test fails.

Base_test's _call_run_once() does not execute the after_iteration hooks
if the test fails. It is important to execute the after_iteration hooks
in the event of a test failure since these hooks may be used to gather
important test logs to help diagnose the failure. This patch
modifies _call_run_once() to execute after_iteration hooks regardless of
the outcome of the test.

A new unit test was added to verify the behavior of _call_run_once(). The
patch was tested using unittest_suite.py to ensure that it did not break
other functionalities. It was also tested with an actual after_iteration
hook that collected test logs and the test was forced to fail.

Risk: High
Visibility: The order of when the after_iteration hooks has been changed
and may affect existing tests.
Bugs: None

Signed-off-by: Thieu Le <thieule@chromium.org>

git-svn-id: svn://test.kernel.org/autotest/trunk@5271 592f7852-d20e-0410-864c-8624ca9c26a4

KVM test: Make unattended setup copy finish.exe to floppies

Fixing yet another bug from the conversion of unattended
install to infrastructure.

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

Review URL: http://codereview.chromium.org/6598041
/external/autotest/client/common_lib/test.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/client/common_lib/test.py
8b2954a7693afd2927dde072326832094ad8565f 13-Jul-2010 Eric Li <ericli@google.com> Autotest's crash handler does not work well with the built-in crash handler inside Chromium OS.

Disable it temporarily so all tests could be executed as they should be.

Otherwise when autotest sends SIGTERM to a chrome process to kill it, it will generate a 200M core dump on /tmp. And Chromium OS only budget 500M for /tmp.

Review URL: http://codereview.chromium.org/2927011
/external/autotest/client/common_lib/test.py
aafbf2aae6402ef5fd7f297a801e950f3a589ccc 25-Jun-2010 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Making base_test a new style object.
I need this to create unit tests for sub-classes (so I can use __new__ and
not stub all the base_test.__init__() stuff.

Signed-off-by: Jean-Marc Eurin <jmeurin@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4680 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
2342172301298a720c08b3c9c9da1c0be36d621c 17-Jun-2010 lmr <lmr@592f7852-d20e-0410-864c-8624ca9c26a4> common_lib/test.py: Fixes for running tests from HTTP urls

Use the testdir member variable. Use the download directory as the
import directory since the group is appended to modulename. Create
the 'download' directory if it's not there.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4637 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
0676704ebe2e6a4ff7f6e9c4d144c07a233902d4 29-Mar-2010 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Change the hierarchial tests to use : instead of . to indicate the test
hierarchy. Since using . makes it impossible to determine what the actual
test and tag are, this new feature breaks existing behaviour. Pending a
better solution we should use a separate character that doesn't already
have a better meaning.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@4352 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
620ccf028a641e680c402f32458ffe60aa6e18cf 26-Mar-2010 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add hierarchical structure to tests/ directory

This patch allows you to have tests/a/b/foo, rather than just tests/foo

eg. this:

job.run_test('a.sleeptest', seconds = 1)
job.run_test('b.c.sleeptest', seconds = 1)

Results in:

START ---- ---- timestamp=1269622268 localtime=Mar 26 09:51:08
START a.sleeptest a.sleeptest timestamp=1269622268
localtime=Mar 26 09:51:08
GOOD a.sleeptest a.sleeptest
timestamp=1269622270 localtime=Mar 26 09:51:10 completed
successfully
END GOOD a.sleeptest a.sleeptest
timestamp=1269622270 localtime=Mar 26 09:51:10
START b.c.sleeptest b.c.sleeptest timestamp=1269622270
localtime=Mar 26 09:51:10
GOOD b.c.sleeptest b.c.sleeptest
timestamp=1269622272 localtime=Mar 26 09:51:12 completed
successfully
END GOOD b.c.sleeptest b.c.sleeptest
timestamp=1269622272 localtime=Mar 26 09:51:12
END GOOD ---- ---- timestamp=1269622272 localtime=Mar
26 09:51:12

and picks up from tests/a/sleeptest and tests/b/c/sleeptest

Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@4350 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
546142013484dbdb2c1322debe9e5fc5e91f63c1 23-Mar-2010 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Revert change that was accidentally commited as part of 4314 to
client/common_lib/test.py whilst partially complete



git-svn-id: http://test.kernel.org/svn/autotest/trunk@4325 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
dbc5eaf052e936623c4acd5075d8383a81302f25 19-Mar-2010 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Moved binding/listening on the server socket from
barrier.barrier.run_server() to a separate class
(barrier.listen_server). Added a keyword argument to barrier to pass
a listen_server instance to use it when it needs access to the server
socket. When a listen_server instance is not given to barrier it will
create one in run_server() (preserving the old semantics). Updated
barriertest (used by server side profiler support code) to reuse a
listen_server instance in almost all its barrier instances (thus
hopefully fixing an issue where we rebind too fast on the same port when
packets are in transit from an old connection and get a ECONNRESET on a
new connection because of this). Updated unittests.

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


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4314 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
2c211e4687a3c836ba82cf44d4f8c041396b538a 26-Feb-2010 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fix a bug handling crash handler while run client as non-root user

r4243 introduced a change to client/common_lib/test.py which will only enable crash handler while running as 'root'. But subsequent calls to crash handler was forgotten.

From: ericli@google.com



git-svn-id: http://test.kernel.org/svn/autotest/trunk@4275 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
e3a22513ce0a52739f89589c43af9e221e1ada61 12-Feb-2010 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> The new flag will prebuild all autotest client tests/site_tests on the server side, when the dev tool chain is not available on the client, by directly invoke the setup method() on the test.

If this flag is not provided on the command line (default behavior), there should be no regression changes to existing usages.

If provided:
--setup=all will prebuild all client tests/site_tests.
--setup=A,B,C,.. will only build the comma separated list of tests supplied.

This new flag does not work with any control file, instead, it works on test classes.


from:ericli@google.com



git-svn-id: http://test.kernel.org/svn/autotest/trunk@4243 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
1b0faf92eda0f62f60d3b4472f9ba0efdd455b54 19-Dec-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Added additional test hooks that are important when doing profiled runs
with tests that need to perform certain setup per test iteration before
the profiling starts.

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


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4024 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
c4e4bd2ae0fcc68af246b18edf58ecf5fc26a861 12-Nov-2009 lmr <lmr@592f7852-d20e-0410-864c-8624ca9c26a4> Get rid of the job.libdir and test.libdir attributes

Get rid of the job.libdir and test.libdir directories. Nothing really uses
them and they don't work properly with what's in SVN right now anyway.

Risk: Low
Visibility: No more job.libdir and test.libdir attributes

Signed-off-by: John Admanski <jadmanski@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3940 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
cf8d492a6eafdd03d88ad9dad676ae737ec898ec 14-Oct-2009 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> Log a message with a traceback immediately when an exception is caught that fails a test or job.

Right now, when tests or jobs fail, we execute various actions before providing any indication of the failure. Such actions include post-test cleanup, post-iteration sysinfo collection, post-job crashinfo collection, etc. The exception traceback can be separated from the immediately preceding line by hundreds of lines of unrelated logging output. Of course the traceback shows you exactly where the exception originated, but this separation in the logs makes debugging a royal pain.

With this change, whenever such a test- or job-ending exception is caught, on the client or the server, we *immediately* log a message with a traceback. We then carry on with the usual activities and eventually log the traceback again when we're recording failure. But the first log should make debugging easier and make things more obvious for new and experienced users alike.

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


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3852 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
fb11887e50185985519cecac0af93c60d1d280bd 13-Oct-2009 lmr <lmr@592f7852-d20e-0410-864c-8624ca9c26a4> Crash handling system: Move it to client side code

It's undesirable to have crash handling setup on server
side testing, hence make the methods that do the actual
work as empty stubs in the common test code, and move
these methods to the client test definition, this way
setup will happen only on client side tests.

Thanks for jadmanski for helping me to figure out how
to do this properly.

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


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3841 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
a6082efeb30cd86d09fcf25d55cde15dedd60fce 12-Oct-2009 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> Add a global mechanism to the job object to allow users to change
the behaviour of profile_only, so that all tests default to

Signed-off-by: John Admanski <jadmanski@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3818 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
0d9ea7784bf5a3109b63825535aa695e78bddcb9 09-Oct-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Update the constraint-checking code to use a much more sanitized
dictionary as the eval environment for checking constraints.
Specifically:
* uses a copy of the keyval dict, to prevent the mutation of
the keyval dictionary by the eval()
* sets __builtins__ to None, to prevent the grabbing of the
entire global environment into the eval()

Risk: Medium
Visibility: May break any constraints that were abusing the fact that
the global environment was leaking into the constraint eval().

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@3807 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
c6bf601d0de97a86cb9d09db08b4ea725fac2003 02-Oct-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add a WARN message to the status log when a test runs with
profile_only=True but no profilers set up. It's all too easy to make
this mistake (e.g. tweaking a control file set up for profiling runs
to turn off the profilers, but forgetting to remove the profile_only)
and it leads to lots of confusion when the test successfully runs
with zero iterations.

Signed-off-by: John Admanski <jadmanski@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3784 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
6894ce2a95b6bb4e18f1791a96bb270a23353050 18-Sep-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> This patch adds a system to watch user space segmentation
faults, writing core dumps and some degree of core dump
analysis report. We believe that such a system will be
beneficial for autotest as a whole, since the ability to
get core dumps and dump analysis for each app crashing
during an autotest execution can help test engineers with
richer debugging information.

The system is comprised by 2 parts:

* Modifications on test code that enable core dumps
generation, register a core handler script in the kernel
and check by generated core files at the end of each
test.

* A core handler script that is going to write the
core on each test debug dir in a convenient way, with
a report that currently is comprised by the process that
died and a gdb stacktrace of the process. As the system
gets in shape, we could add more scripts that can do
fancier stuff (such as handlers that use frysk to get
more info such as memory maps, provided that we have
frysk installed in the machine).

This is the proof of concept of the system. I am sending it
to the mailing list on this early stage so I can get
feedback on the feature. The system passes my basic
tests:

* Run a simple long test, such as the kvm test, and
then crash an application while the test is running. I
get reports generated on test.debugdir

* Run a slightly more complex control file, with 3 parallel
bonnie instances at once and crash an application while the
test is running. I get reports generated on all
test.debugdirs.

4th try:
* Implemented most of the suggestions made by Michael.
* Moved the crash_report method call outside the finally
clause that calls job.logging.restore, so if it
something goes wrong logging.restore still gets
executed, as John pointed out.

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


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3750 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
c27c231ee840e8ce97012477ba1f917674375a1e 05-Aug-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> A very large first-pass refactoring of the packaging code. Ultimately
my goal is to replace the if-elif-elif-else type method calls in
the package manager that fetches a file with a more OO-style method
that tries to fetch the files from a variety of RepositoryFetcher
instances. My primary motivation for doing that is so that I can
add a more specialized RepositoryFetcher instance that's closesly
tied to the code in harness_autoserv.py and I feel it would be a bad
idea to try and intergrate that into packages.py itself.

However some other refactoring and cleanup ended up being required
so as a first pass I left the if-elif-elif-else style of
fetch_pkg_file, except now it just creates and instance of the
RepositoryFetcher on the fly and asks it to fetch a package.

The major changes that I did make were:
- moved the fetch_pkg_file_* methods into RepositoryFetcher classes
- moved the bulk of the packages.py into a base_packages.py file
and just left a base+site stub in packages.py since I was running
into some circular dependency troubles with packages and
site_packages
- moved the package error classes out of packages.py and into
error.py, and added an extra abstract error class so that all
the package error classes inherit from a common class
- cleaned up some of the fetch_pkg_file_* code while moving it around
such as removing a bunch of dead code from fetch_pkg_file_http
- fixed up all the utilities, tests and infrastructure that
referenced the packages module to use the error module instead
(or in a few cases base_packages)

Functionally these rather large changes should actually have very
little impact on Autotest as a whole, since this is mostly just moving
code around. I plan to follow it up with another patch later on that
replaces the fetch_pkg_file code with something that uses a set of
long-lived RepositoryFetcher instances, along with factory methods
for constructing those fetchers, and then later on with a patch that
adds support for retriving packages directly from autoserv (using
harness_autoserv).

Risk: High
Visibility: Mostly refactoring, moved error classes into error.py,
an a few bits and pieces of code cleanup in the moved
code.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@3511 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
ee36bc777d44d641bb6664dcaf3f903936b0e3ee 19-Jun-2009 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> remove some logging setup code in the common test code that should be subsumed by the new logging manager

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


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3297 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
5e703a286f9f112c419a27402b232e78bfd7bdc8 16-Jun-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> - Initialize the self.iteration variable to 0. When iterations=0 is specified to run_test then self.iteration is left uninitialized and code elsewhere that uses this value gets an attribute error.
- Also increment the self.iteration variable value in the profiling run so that the last iteration results are not overwritten by the profiling run.

Signed-off-by: Ashwin Ganti <aganti@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@3287 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
75cdfee87bfaa3cf3f9860832b228a6d32aaed2f 10-Jun-2009 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> Make autoserv and autotest client use the new logging_manager system. I'd like to split them into separate changes, but the change in common_lib.test means it all has to change at once.

this replaces the old ini-style logging configurations with code-based configurations. i know the ini files were easier to read, but we're doing a lot more fancy stuff with logging and these give us much more power and less duplication. as one example, we'll probably move very soon to having separate .DEBUG, .INFO, .WARNING, and .ERROR logs. This will allow us to make a centralized change to make that happen, rather than duplicating a whole bunch of information across .ini files, and it'll make the information much more concise.

Risk: Gravely high

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@3243 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
8beabca0c495df2913ef67adcd63a9be8947ad82 21-May-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Added a few more words to the constrain failure reason.

Signed-off-by: Travis Miller <raphtee@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3154 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
f58865f3e987fd9930ccb14dfe160e65c0364cc6 13-May-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Modify the way we handle profile_only to now be a boolean that does not modify
iterations. If profile_only is set to True run all iterations with profiles
enabled. If profile_only is not False, run iterations and then run one profile
run. Change the way profilers are stored by adding them to a iteration.X sub
directory.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@3138 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
742ae42df0b167f6a29b0f64466fc99401f57018 13-May-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Exposed an interface for adding before_iteration_hooks and
after_iteration_hooks. These are stored in a list in test
object and are run before and after iteration runs.

Signed-off-by: Travis Miller <raphtee@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3129 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
d1e8140d9ac4dfcd77bfb82476008bbd23267a15 02-May-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Summary: Make the prefix format for the log files generated by tests
be coherent with the other logs

Since the new logging approach was introduced, we have changed the
formatting for the line prefixes. The prefixes generated by the file
handler instantiated on the test class were not updated. Let's fix
that.

Signed-off-by: Lucas Meneghel Rodrigues <lookkas@gmail.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3079 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
32cb5b450ce80e5e5871142592973e57f3771ae2 02-May-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> We now store the failures due to constraints and dont raise
an exception until after postprocess.

Signed-off-by: Travis Miller <raphtee@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3077 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
7af0997bb099f0b0ad331812d6b677bb0c695bd9 18-Apr-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> This is the second CL relating to a re-implementation of how
constraints on keyvals are evaluated. The code has been moved
into the base_test class itself. This required some changes to the
old tests that had evaluated the constraints themselves.

Signed-off-by: Travis Miller <raphtee@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3012 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
91d56a9bbeb29f4f80cd36072254977fe4530eae 01-Apr-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Add a network_destabilizing flag that tests can set to disable
NETWORK warnings.

Risk: Medium
Visibility: Adds a way to flag a test as network-destabilizing.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2947 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
5c1bb2564e01e94f1fccb9272dbd613666db3e63 25-Mar-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Moved warmup() call from execute() to _exec() before calling on
execute() thus fixing an issue of filtering arguments sent to execute()
based on what run_once/execute accepts but ignoring the fact that
warmup() may have needed some other arguments.

Removed _run_cleanup() and updated users because where it is called
there is no need to translate the exceptions from self.cleanup() (as they
are either ignored or translation happens from the surrounding context).

Defined a _cherry_pick_call() function perform both cherry picking of
arguments and function call. Defined _call_test_function() to wrap a
given function call for test code and translate exceptions if needed.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2934 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
4395bbd96ed53aec5fad87d6c169a47dfdb8c9dd 25-Mar-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Added sysinfo support to log pre and post iteration (currently it logs
the contents of /proc/schedstat). Added client.common_lib.test hooks to
call pre and post iteration. Used the hooks in client.bin.test.runtest()
for client tests. Refactored server.test and added wrappers for the
pre/post iteration logging and used them on the new pre/post iteration
hooks.

For each iteration there will be a
resultsdir/sysinfo/iteration.N/schedstat.after and schedstat.before.

If there are tests that override execute() and implement their own
iteration logic they need to be changed over to override run_once()
instead and take advantage of the default execute() that supports the
pre/post iteration hooks and other things.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2929 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
6b97f79e7c71803567e393b92e993705a46480e3 23-Mar-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Removed code redundancy by moving the
drop_caches/run_once/postprocess_iteration calls
into a function. Possibly fixed bugs because of postprocess_iteration
not being called after run_once iterations from the code handling
"test_length" test time argument.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2923 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
b18134f8faa7c5b4623760bc88650a65e70b2cac 20-Mar-2009 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> As discussed on the mailing list, we implemented logging with a single
root logger and logging configurations per entry points. The entry
points affected are:

* Autotest client
* Autoserv
* Scheduler

We are sending patches for each one of those entry points. Now we don't
need to 'grab' loggers anymore to log messages, only need to use the
utility functions:

logging.info('msg')
logging.debug('msg')
logging.warning('msg')
logging.error('msg')
logging.critical('msg')

Which reduces complexity of the log system, and makes it easier for
developers to log messages, just select the level, make sure the
standard logging module is loaded, and profit!

From: Lucas Meneghel Rodrigues <lmr@linux.vnet.ibm.com>
Signed-off-by: Steve Howard <showard@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2915 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
a49c5cb549607a2049c45eed66200e48aae48c3b 26-Feb-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Change the name of the variable to postprocess_profiled_run. Allow it to
be an object attribute too.

Signed-off-by: Jean-Marc Eurin <jmeurin@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2835 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
c931408ae77c801c5188c8e40cab766449442c89 26-Feb-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add an option (profile_perf) to record performance of profiled runs.

For example:
job.run_test('sleeptest', iterations=0, profile_perf=True)
will record performance of the profiled run.

Signed-off-by: Nikhil Rao <ncrao@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2830 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
886c81fc8c3ab8d7edcf7ddbb7594a6082e92cee 19-Feb-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Change the magic parameter cherry-picking code in the common test
implementation to automatically take into account new parameters added
to the generic execute method. The recent addition of profile_only
didn't quite work because the argument would never actually be passed
on to test.execute unless test.run_once itself accepted such an
argument.

Previously we had code that explicitly pulled in the iterations and
test_length args (the previous test.execute parameters) but this code
was not updated to also pull in profile_only. Instad of continuing to
force people to make changes in two places to add a new arg, I updated
the code to re-use our parameter extraction code and automatically pull
in all the explicit (non * and **) parameters accepted by test.execute.

Risk: Low
Visibility: Fixes a bug that made the new profile_only option useless.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2817 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
4b835b89f2a0bd9aef2df4157fadc34fe2eeb14c 11-Feb-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Adds a profile_only keyword argument to test.execute to be used by
job.run_test() from control files. When specified it behaves identically to
iterations=0 but is much easier to read. Also converts prints in test.execute
into test_log calls and adds a test.execute unit test.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2773 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
21e33584d561f6f010d96901a3174d37eecf3873 04-Feb-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add a self.pkgmgr object to test so people can reference self.pkgmgr instead of
self.job.pkgrmgr (which was missed entirely by the test developers anyways)
Risk: Low

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2742 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
34b297bba44625fc21ebf8f494454cfdde5a3a4f 03-Feb-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Introduce postprocess_iteration, a way to do the perf keyvals once
per iteration, rather than all at the end. This results in cleaner,
less buggy code, that doesn't tend to grab the keyval for the profiled
run by mistake

Signed-off-by: Martin Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2734 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
d27604e5a0527826c9cf19051669fac74435623f 03-Feb-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Move profiling code into run_once_profiling()

This patch moves all profiling code into run_once_profiling(). Tests
that need more control over profilers can override this function and
provide a custom profile run using autotest's profiling infrastructure.

Thanks to mbligh for the idea.

Signed-off-by: Nikhil Rao <ncrao@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2724 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
53da18eddf69243ca175d9a4603cba5b55300726 05-Jan-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Rename autotest_utils to utils

Fixes longstanding hangover ugliness from the original change away
from doing "from autotest_utils import *".

Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2595 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
b5dac4323ac5dca003da7e8114e80ab99612ac73 27-Nov-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Provide the ability to drop caches between benchmark iteration runs

Signed-off-by: Martin Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2518 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
b3c0c91ff9020a7259377e3d607c3aa0cae9c804 27-Nov-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Adds support for using client-side profilers from the server side.
This makes a few significant infrastructure changes in order the
support this:
- it modifies autotest.py to allow "background" clients to be
launched, where the server simply kicks off a client as a
background process without bothering to monitor it
- it adds a profiler_test test which is not a "real" test but is
instead used to allow the server to start & stop the profilers
in a reasonably controlled way

Currently, this still lacks any support for dealing with reboots; if
a test reboots the remote machine then the profilers will not be
restarted and the logs collected will only go as far as the first
reboot.

Risk: Medium
Visibility: You can use profilers from the server side (via
job.profilers.add and job.profilers.delete)

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2514 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
234a84f025f03651e1973bfcb84a3059fc0eb373 20-Nov-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> First (of many) passes at cleaning up the client job exception handling
to do the right thing. Exceptions during test execution == FAIL,
exceptions during other phases == ERROR. Explicitly specified
AutotestError subclasses are passed through.

This fixes a bug where exceptions were ignored when run_cleanup was False.

It adds docstrings for some internal functions and hopefully simplifies
the code a bit.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2483 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
504378fdc7664552b784bf02d330d15e5a6d9759 19-Nov-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> If someone passes iterations=0 then we need to leave that in, not
default iterations to 1. We should only be interpretting None as
"default".

Risk: Low
Visibility: iterations=0 actually works (needed for profiling-only
runs).

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2452 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
0d39007e5b9b102918529abcd6ed8a9fc30cd085 19-Nov-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Make sure the profilers are always stopped and reported on, even when
the profiling run fails for some reason.

Risk: Low
Visibility: Failures during a profiling run should still properly
terminate profilers and collect data.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2448 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
3aba4393a4f35e382ce1853f4a872553b56e67bf 17-Nov-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Server-side tests that attempt to use run_once will always fail due
to the fact that the generic test.execute references job.profilers,
which doesn't exist on the server side. Fix it to make the profilers
usage conditional (for now; will remove once server-side profiler
support is added).

Risk: Low
Visibility: test.run_once can be used for server-side tests

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2426 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
d33fa27cbfedf8207f1835ac19172f7d07713efe 14-Oct-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Dropping caches before each test can disrupt other tests if
we're doing multiple things in parallel. At John's suggestion,
do it in _run_test_complete_on_exit instead.

Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2280 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
76a42932939e6cb95ab63a131695ad6e7ab3b70c 09-Oct-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> recommit logging changes - was just spare pyc file




git-svn-id: http://test.kernel.org/svn/autotest/trunk@2266 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
b931b687e09cec9b25f37d437f33be73b6de20f3 09-Oct-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> back out logging changes for now




git-svn-id: http://test.kernel.org/svn/autotest/trunk@2265 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
681b6a05a596fb0bf379979e11bb620b58a5707f 09-Oct-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Configuring main autotest classes to use the new debug infrastructure,
converting 2 of the major verbosity sources on autotest and autoserv
executions. Logs with timestamps as a bonus :). The patch should apply
cleanly against svn trunk.

Visibility: Users and developers of the command line programs (autotest
and autoserv) will perceive a reduced verbosity, that can be increased
on the debug configuration file if needed.

Risk: Low (small number of changes, all tested and things were done
trying to isolate sources of failure as much as possible).

Signed-off-by: Lucas Meneghel Rodrigues <lucasmr@br.ibm.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2261 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
30e9b59979e1b787744a29a7c0ffc3815ace7ff9 25-Sep-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Add a sysinfo hook that gets called before a test so that we can do
some pre-test examining of /var/log/messages. This allows us to
remember how large /var/log/messages was at the test start so that
we can then just grab new logs.

The /var/log/messages handling basically does two things before the
test:
- it remembers how large the file is
- it remembers the inode of the file
We then use the remembered size and skip over that many bytes when
grabbing the logs after the test. The inode is remembered so that we
can do a quick check to see if the final /var/log/messages is really
the "same" file; if the log gets rotated during the test we just
grab everything from the start. We still don't really handle that case
properly since the rotated logs that happened during the test still
won't be grabbed, but it's not easy to grab rotated logs in a
standard way.

Risk: Low
Visibility: Grab any new /var/log/messages that happen during the test.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2198 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
23afbec41f6275bef4e80c36726916b0be564204 17-Sep-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Add a standard run_cleanup option to test.run_test that can be used
to enable/disable the running of test.cleanup after the test
completes. This also adds some global state on the job objects
that can change to default for tests from enabled to disabled.

Risk: Low
Visbility: Adds ways to disable test cleanup at both the job and test
level.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2167 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
47faacb31010a57d56296079bbbaf2f141b2a4e0 10-Sep-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Missing to pass cherry_picked args to cleanup().

Risk: Low
Visibility: cleanup() that are currently expecting arguments may not be working.



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2130 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
52fa69285dbeb9e9a0d49de4b1e12b52cda39fc6 05-Sep-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Parsed output to generate keyvals for specific netperf tests. Additionally
made this test as well as the iperf test use the new scheme for 3 storing
three dimensional data in the keyval files. Which is to use multiple iterations
and to use attributes.

Signed-off-by: Bryce Boe <bboe@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2113 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
4000ff6e6d018209049d2a8e84b7c5567ffbb44f 04-Sep-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Drop caches between tests for consistency of performance results

Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2106 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
2ae0e05070b768a26b27f4a3a35d2bfff7459e1a 04-Sep-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> When launching a test, save off all the parameters into the test
keyval file (as param-BLAH).

Risk: Low
Visibility: The test keyval file should hold more data about the
parameters the test was run with.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2100 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
534dec5300d36283846ab7d72159a7ac6852a878 04-Sep-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fixing coding style violations in test.py

Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2097 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
777d96ea7897ed7c15b5677b256ac292a5911ca9 03-Sep-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Make all tests use profiling transparently, no needs for hooks on the
test class code anymore.

Also, make benchmarks accept the parameter test_length to specify the
minimum test length that we want to run the test.

Risk: Medium (seems to work ok on the tests I've made here)
Visibility: High - All tests now can use profiling without hooks on the
test code.

Also, it seems like I've evaluated the number of patches incorrectly :) Sorry about that.

Signed-off-by: Lucas Meneghel Rodrigues <lucasmr@br.ibm.com>




git-svn-id: http://test.kernel.org/svn/autotest/trunk@2084 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
c7e0e5e6997323ead938fed8130e0b54dde5ae05 28-Aug-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> make self.iterations singular



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2066 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
b718a1c97cfb674f2e93c5f7476366e5e26826e5 28-Aug-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Provide a generic iterations counter to all tests, so they stop
having to make up their own (as self.iterations)




git-svn-id: http://test.kernel.org/svn/autotest/trunk@2065 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
825e24c4a8d339133840bd5349641f63d2f216b6 27-Aug-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Change the test.tmpdir creation to use tempfile.mkdtemp instead of
just assuming that job.tmpdir + testname was usable. Since the job
tmpdir is not unique per job, we can't assume that we can just
create a directory named after the test and that it will work.

This is generally only a problem for server side tests where having
multiple jobs running at the same time is the norm and not the
exception.

Risk: Low
Visibility: Changes test.tmpdir to a tempdir name generated on the
fly, rather than hardcoding it to job.tempdir + testname.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2060 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
d625c7f40aa276ab3957ef01f5f21c84d933803e 27-Aug-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> When calling test.cleanup() we don't want any exception that occur
in it to override exceptions from the test execution. However, we
still want exceptions from test.cleanup() if there way no underlying
exception in the test execution.

This requires some rather convoluted code. Basically, we need to:
1. save off the possible exception from executing the test
2. if an exception occured, execute test.cleanup() and then
rethrow the original exception
3. if an exception did not occur, execute test.cleanup() and let
any exceptions from it propagate on their own
4. after all that happens, we must always execute the
job.std*.restore() methods to stop logging the test

Risk: High
Visibility: If exceptions occur during both test execution and
cleanup, you now see the execution exception, not the cleanup one.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2043 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
e29be37f17c8805628fda438de4528a291cef16b 26-Aug-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> We can't trust test.cleanup() to not throw an exception, since the
code in it is arbitrary code provided by the test implementation.
We can't do the job.std*.restore calls until after the cleanup since
it need to get recorded to, but they must always run no matter what
the cleanup does, so wrap them in another finally block.

Risk: Low
Visibility: Errors during cleanup should no longer prevent the
$TEST/debug/std* logging from stopping at the end of the test.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2042 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
213b02bad2ae098001127052cffb66d430582f18 26-Aug-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> When test.runtest executes a test, it needs to restore the cwd to
whatever it was before the test ran.

Risk: Low
Visibility: Working directories should be preserved across tests.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2040 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
c5ddfd1f71caef9ec0c84c53ef7db42fcdc33e1c 04-Aug-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> I have attached the patch for the packaging system.
The documentation is available at : http://test.kernel.org/autotest/PackagingSystem

Signed-off-by: Ashwin Ganti <aganti@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1953 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
14f9856aac6c3d43830553d849442914988349c6 29-Jul-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add *args, **dargs to the default warmup in the test superclass.
Otherwise, every test that defines a run_once with args will have to
define a warmup that accepts the same args, even if it's just a NOP.

Risk: Low
Visibility: run_once is pretty useless without this

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1922 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
62655786cbb12ebe901411e8f4b55e9394e4c633 28-Jul-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Pull the test_attributes values out of the run_test arguments and write them
out before validating args and passing them into test methods.

Risk: Medium
Visibility: Using test_attributes to add in extra attributes for writing out
when running a test shouldn't lead to "unknown parameter" errors. This also
means that the keyval will be written out prior to initialization instead of
just prior to execution.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1917 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
c218083b6b96257788364ef8b7fa0fad5087fcbd 25-Jul-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Smarter way that tests handle default exceptions (unhandled errors) and also a cleanup on test exception classes.

From: rxaviers@br.ibm.com



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1899 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
cf23819bf6b75aeff5acb4f276955ef70b8445c3 17-Jul-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Automatically work out which arguments intialize, setup, execute/run_once need

Pass the appropriate args from run_test through to each of them

From: Rafael Xavier de Souza <rxaviers@br.ibm.com>
From: Martin J. Bligh <mbligh@google.com>
Signed-off-by: Martin J. Bligh <mbligh@google.com>




git-svn-id: http://test.kernel.org/svn/autotest/trunk@1859 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
0b3dd5f0df77e7cc659b4b8cb0d25d1e20e7609d 16-Jul-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Split write_iteration_keyval into write_perf_keyval, write_attr_keyval

People only call one or the other, so the interface is clunky

Signed-off-by: Martin Bligh <mbligh@google.com>




git-svn-id: http://test.kernel.org/svn/autotest/trunk@1854 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
8d4dcd3df5b400a317efd31b97333a16eb8cea06 16-Jul-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add debug code to test.py



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1849 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
604347171abe199f3531d38af366877bb1872f9a 16-Jul-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Allow tests to define run_once instead of execute.

This allows us to move a whole lot of boilerplate out of each test into
a common place in test.py

Also allow for a postprocess phase for tests - to provide a cleaner alternative
to run_once

Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1846 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
cd8a51646279995a8963c0d2acdad6db3bd12332 16-Jul-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Revert accidentally included parts of 1826



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1845 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
4205d8965f7fdda6a9c24100be912f36f04a3fc9 14-Jul-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fix the unittest to make it pass and avoid relying on a fragile parser:
- Use the __import__ and import coherently
- Use the standard unittest framework

Rewrite of the barrier unittest as using fork() completely messed up
the overall test suite and ran it 8 times.

Visibility: Medium/High - some import changes
Risk: Medium

Tests:
- Ran unittest_suite.py for all and individual directories
- Ran coverage_suite.py for all and individual directories
- Ran manage.py test from frontend directory.

Signed-off-by: Jean-Marc Eurin <jmeurin@google.com>




git-svn-id: http://test.kernel.org/svn/autotest/trunk@1827 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
b53a3474f65f3f631bddef6f743c2944fed186dc 11-Jul-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Roll back accidentally included changes from previous commit

Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1823 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
dfc0d2a849ff87cc4a150895bba89bc2b81feea5 11-Jul-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Change default to repair anything we can

Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1822 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
c23051cdb6499bb38795b7edc970dde38d2a3f1c 27-Jun-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Some fixes and minor cleanups as suggested by PyLint.

Signed-off-by: Jeremy Orlow <jorlow@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1745 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
6f731364e6207c198ac8de748a043eba1e9223b3 17-Jun-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Changes the semantics of UnhandledError. First, it takes in a root
exception to wrap, rather than implicitly grabbing the last caught
exception. Second, it displays the root exception message instead
of wrapping it in a new message and only displaying the root cause
in a pre-collected traceback.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1710 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
0afbb6369aa5aa9a75ea67dd9e95ec4b21c0c181 06-Jun-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Convert all python code to use four-space indents instead of eight-space tabs.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1658 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
d660afe45d87270b509e069a44834d0244ae2090 06-Jun-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add support for tagging subdirs independently of the testname tags.
This allows you to group multiple test runs under the same name
while still storing their results in unique directories.

From: Duane Sand <duanes@google.com>
Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1620 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
cf8c4d68b8c3def2a5ebb00b3ccbf83ce3e8f6f0 28-May-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Risk: Low
Visibility: Changes the error/reason associated with unhandled
exceptions during tests.

This fixes up the error message associated with UnhandledError
exceptions to actually tell you that the failure was due to an
unhandled exception, and what the unhandled exception was. It drops
the testname from the exception, since the status lines that log the
exception already include the testname anyway.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1557 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
cc549174c6caf563443625805594eb0ff813a261 21-May-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Risk: Medium
Visibility: Changes the test keyval interface, deprecating the existing
test.write_keyval method in favour of a pair of write_*_keyval methods
for writing test & iteration keyvals. The deprecated method will still
work as it did before, but will generate a warning.

Adds a new iteration_attributes table to the database for storing
generic string attributes on a per-iteration basis, in the same way
that test_attributes allows generic string attributes on a per-test
basis.

This also adds new methods to the test class for writing these keyvals
so that tests can write out attributes by calling
self.write_test_keyval (or self.write_iteration_keyval). The iteration
method accepts parameters for both generic attributes and performance
data.

In order to store both performance and non-performance data in the
iteration keyvals, the format of the line has been extended to look
like "key{blah}=value", with no {blah} being interpreted as equvalent
to "{perf}", for backwards compatiblity.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1535 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
f55dfc9234c3cf948f9b0ae9eb4dd4c0c2bd8318 16-May-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Risk: Low

Clean up the common test.py imports to use absolute imports. Tested by
running a client-side and server-side test; any import errors
would've been readily apparent since the affected methods lie on the
main codepaths used for all tests.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1525 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
313f12ceca6185ea4890fec8e66baf06fd5d6f40 16-May-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Did some cleanup work on imports in order to remove any of the remaining "from blah import *" imports.

From: Travis Miller



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1522 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
c78b54e12cc05bc842cd228d232238840f816f48 14-May-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Problem: The python TarFile objects only operate on uncompressed
tarfiles when instantiated as TarFile objects, per the current python
documentation. The code for installing a user AutoTest testcase
attempts to open and examine the testcase "tgz" file by instantiating
it as a TarFile object, which doesn't work.

Solution: use tarfile.open() instead of tarfile.TarFile()

Signed-off-by: Paul A. Clarke <pc@us.ibm.com>




git-svn-id: http://test.kernel.org/svn/autotest/trunk@1510 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
b9e18ddafbcbac30225991351c2cbac85492e9c9 06-Mar-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Pull the lockfile creation out of the try-finally, as the finally
shouldn't be executing if the lockfile creation fails.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1310 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/test.py
6231cd6de184639494528ef60a9aca482283556b 02-Feb-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> add missing files from last change. Oops

Signed-off-by: Martin J. Bligh <mbligh@google.com>



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