1. 23 Dec, 2011 12 commits
    • Steven Rostedt's avatar
      ktest: Detect typos in option names · 9cc9e091
      Steven Rostedt authored
      It becomes quite annoying when you go to run a test and then
      realize that you typed an option name wrong, and the test starts
      doing the default action and not what you expected it to do.
      
      It is even more annoying when you wake up the next day after
      running the test over night when you discover this.
      
      By testing if all options specified in a config file are
      used by either ktest or were used in one of the option's values
      we can see if there are any dangling options that were not used.
      In such a case, show the user the options that were not used
      and ask them if they want to continue or not.
      
      The option IGNORE_UNUSED was also added to allow the user to
      override this feature.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      9cc9e091
    • Steven Rostedt's avatar
      ktest: Have all values be set by defaults · b5f4aea6
      Steven Rostedt authored
      Currently the patchcheck, bisect, and config_bisect variables
      are only able to be set per test. You can not set a default
      value for them.
      
      By letting default values be set, it makes some config files
      a bit easier, and also makes it easier to find typos in the
      option names.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      b5f4aea6
    • Steven Rostedt's avatar
      ktest: Change initialization of defaults hash to perl format · 4f43e0dc
      Steven Rostedt authored
      Initializing each default value by specifying the hash name is
      ugly. This is one of the rare cases that the "perl way" is actually
      much cleaner and easier to read.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      4f43e0dc
    • Steven Rostedt's avatar
      ktest: Add options SWITCH_TO_GOOD and SWITCH_TO_TEST · bc7c5803
      Steven Rostedt authored
      For machines that do no use grub, it may be needed to update an
      external image (tftp) before doing a reboot into either the
      test image or the known good image.
      
      The option SWITCH_TO_GOOD is added, where if it is defined, the
      command that is specified as its value will be executed before
      doing a reboot into a known good image.
      
      The option SWITCH_TO_TEST is added, where if it is defined, the
      command that is specified as its value will be executed before
      doing a reboot into the test image.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      bc7c5803
    • Steven Rostedt's avatar
      ktest: Allow overriding bisect test results · c5dacb88
      Steven Rostedt authored
      When running the ktest git bisect test, if the BISECT_TYPE is "test",
      the bisect is determined to be good or bad based off of the error
      code of the test that is run. Currently, if the test returns 0,
      it is considered a pass (good), a non-zero is considered a fail (bad).
      
      But it has been requested to add more options, and also change
      the meanings of the error codes of the test. For example, one may
      want the test to detect if the commit is not good or bad,
      (maybe the bisect came to a point where the code in question
      does not exist). The test could report an error code that should tell
      ktest to skip the commit.
      
      Also, a test could detect that something is horribly wrong and the
      biscet should just be aborted.
      
      The new options:
      
       BISECT_RET_GOOD
       BISECT_RET_BAD
       BISECT_RET_SKIP
       BISECT_RET_ABORT
       BISECT_RET_DEFAULT
      
      have been added. The first 4 take an integer value that will
      represent if the test should be considered a pass, fail, neither
      good nor bad, or abort respectively.
      
      The BISECT_RET_DEFAULT will bo whatever is not defined by the
      above codes. If only BISECT_RET_DEFAULT is defined, then all tests
      will do the default.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      c5dacb88
    • Steven Rostedt's avatar
      ktest: Evaluate options before processing them · cad96669
      Steven Rostedt authored
      All options can take variables "${var}". Before doing any processing
      or decision making on the content of an option, evaluate it incase
      there are variables that may change the outcome.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      cad96669
    • Steven Rostedt's avatar
      ktest: Evaluate $KERNEL_VERSION in both install and post install · 2b29b2f8
      Steven Rostedt authored
      The install process may also need to know what the kernel version
      is, to add it to the name. Evaluate it for both install and
      post install.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      2b29b2f8
    • Steven Rostedt's avatar
      ktest: Only ask options needed for install · 165708b2
      Steven Rostedt authored
      If all the tests are only for build or install, do not ask
      for options not needed to do the install, if the options do
      not exist.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      165708b2
    • Steven Rostedt's avatar
      ktest: When creating a new config, ask for BUILD_OPTIONS · dbd3783b
      Steven Rostedt authored
      When creating a new config, ask for the BUILD_OPTIONS variable
      that lets users add things like -j20 to the make.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      dbd3783b
    • Steven Rostedt's avatar
      ktest: Do not ask for some options if the only test is build · bb8474b1
      Steven Rostedt authored
      When creating a ktest config or if te config only has build only
      tests, some of the manditory config options are not needed.
      
      Do not ask for them if all tests in the config file are just build
      tests.
      Suggested-by: default avatarDarren Hart <dvhart@linux.intel.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      bb8474b1
    • Steven Rostedt's avatar
      ktest: Ask for type of test when creating a new config · c4261d0f
      Steven Rostedt authored
      When no argument is supplied to ktest, or the config applied does
      not exist and a new config is being created, instead of just using
      the default test type, give the user an option to pick the test type
      of either 'build, install, or boot'. Other options may be added later
      but then those would require more questions as they require more
      fields. But that's for another release of ktest to add that feature.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      c4261d0f
    • Steven Rostedt's avatar
      ktest: Allow bisect test to restart where it left off · dad98754
      Steven Rostedt authored
      If a bisect is killed for some reason, have ktest detect that a bisect
      is in progress and if so, allow the user to start the bisect where
      it left off.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      dad98754
  2. 23 Nov, 2011 1 commit
    • Steven Rostedt's avatar
      ktest: When creating new config, allow the use of ${THIS_DIR} · 0e7a22de
      Steven Rostedt authored
      Typing in a full path when you know that the path exists within
      the directory your are running is tedious and unnecessary.
      
      Allow the user to use ${PWD} if they want a dynamic path name
      which will be the path that ktest.pl is executed from
      or use ${THIS_DIR} which is a variable assigned `pwd` and
      the the variable will exist within the config, allowing the user
      to change it and affect all other paths using this variable as well
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      0e7a22de
  3. 22 Nov, 2011 1 commit
    • Steven Rostedt's avatar
      ktest: Add default for ssh-user, build-target and target-image · 600bbf0a
      Steven Rostedt authored
      When a user runs ktest without an argument, or the argument given
      is not a config file that exists, ktest will ask the user a few
      questions to create a simple ktest config file.
      
      A few of the questions should have a default value set, that if anything
      it will make it easier for the user to know what is suppose to
      be in that value.
      
      These new values are:
      
        SSH_USER, BUILD_TARGET and TARGET_IMAGE
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      600bbf0a
  4. 18 Nov, 2011 3 commits
  5. 15 Nov, 2011 7 commits
  6. 14 Nov, 2011 7 commits
  7. 13 Nov, 2011 1 commit
  8. 12 Nov, 2011 8 commits