More refactoring of the job state code to try and reduce duplication.
In the process this also refactors a bunch of job.run_test duplication,
specifically the handling of job tags (there's still lots more
duplicate code left).

The main state refactorings are:
  * Storing client job steps in __steps and special-casing its removal
    in autotest.py is gone. Instead the client job code stores it
    directly in the client.steps state, and the autotest.py generically
    removes the entire client.* namespace.
  * Moving this out of the publicly-visible state and into a private
    namespace allows us to drop has_state and discard_state, which
    were really only needed so that we could make sure __steps was
    not persisted across jobs.
  * All of this client-job state managment was moved out of autotest.py
    and into server_job.py. All the data this code was getting and
    setting was in the job object, so it seemed like a better place
    to put it. This also let us drop load_state and save_state, which
    were really only there to make it easier to push and pull data
    out of the server job object.
  * Eliminate get_run_number and set_run_number in favour of a generic
    use_sequence_number boolean property (that works on both client
    and server automatically). The get_ and set_ code was only being
    used to enable and disable an auto-incrementing sequence number to
    be tagged to each test run, so we can just make the public
    interface a boolean and handle the sequencing under the covers.
  * Drop all the test_tag and test_tag_prefix code in favour of a
    persistent automatic_test_tag property. Also drops the
    show_kernel_in_test_tag flag in favour of just implementing this
    in the control file generator using automatic_test_tag.
  * Refactor all the test name tagging code into base_job, unifying
    the tagging portion of the job.run_test code.

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


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4075 592f7852-d20e-0410-864c-8624ca9c26a4
11 files changed