bstinson / centos / t_functional

Forked from centos/t_functional 4 years ago
Clone

Blame readme

Karanbir Singh 43deec
This Git repo contains all the functional tests run for various packages and roles in the CentOS build + release process
Karanbir Singh 43deec
Karanbir Singh 43deec
filesystem layout:
Karanbir Singh 43deec
Karanbir Singh 43deec
tests/         : contains all test scripts
Karanbir Singh 43deec
Karanbir Singh 43deec
tests/0_lib/   : contains all the common functions and shared code for 
Karanbir Singh 43deec
                 the tests all files in that directory are 'sourced' 
Karanbir Singh 43deec
                 before any of the tests are run, which also means it 
Karanbir Singh 43deec
                 can only contain bash code ( no subdir allowed )
Karanbir Singh 43deec
Karanbir Singh 2dd0be
tests/0_common/ : Contain's tests that are run before any other test,
Karanbir Singh 43deec
                 and immediately after the 0_lib/ code is sourced.
Karanbir Singh 43deec
                 These should be tests that check system sanity and 
Karanbir Singh 43deec
                 environment. These tests should also not leave behind
Karanbir Singh 43deec
                 any state or content residue that would impact package
Karanbir Singh 43deec
                 and role specific tests that are run after
Karanbir Singh 43deec
Karanbir Singh 43deec
tests/p_<name>/ : Each of the p_<name> directories would contain tests
Karanbir Singh 43deec
                  for that specific package. The <name> needs to be -
Karanbir Singh 43deec
                  rpm --qf "%{name}\n" for the srpm.
Karanbir Singh 43deec
Karanbir Singh 43deec
                  All package tests are run on a machine which has a minimal
Karanbir Singh 43deec
                  install. Its not possible, at this time, to have a kickstart
Karanbir Singh 43deec
                  attached with the package tests.
Karanbir Singh 43deec
Karanbir Singh 43deec
tests/r_<role>  : Each of the r_<role> directories should contain the tests
Karanbir Singh 43deec
                  specific to a role. eg: 'lamp'. The test harness looks at
Karanbir Singh 43deec
                  a file called 'pacakge_deps' inside each of the role directories
Karanbir Singh 43deec
                  and runs the role tests if any package listed in that file 
Karanbir Singh 43deec
                  has been changed / built etc.
Karanbir Singh 43deec
Karanbir Singh 43deec
                  Role tests can be run with specific kickstarts. At the moment
Karanbir Singh 43deec
                  each role can have 1 kickstart file. It must be called 
Karanbir Singh 43deec
                  ks_<role>.cfg and it must be in the tests/r_<role>/ directory
Karanbir Singh 43deec
    
Karanbir Singh 43deec
notes...
Karanbir Singh 43deec
- each of the directories are parsed in alphabetical order, so its possible
Karanbir Singh 43deec
  to set some sort of a run order by using <number>_<TestName>
Karanbir Singh 43deec
Karanbir Singh 43deec
- if tests are written in any language other than bash, its upto the test
Karanbir Singh 43deec
  to install the required environment ( including python, ruby, perl.. )
Karanbir Singh e86e4c
Karanbir Singh e86e4c
- all files named 'readme', or starting with an underscore are ignored 
Karanbir Singh e86e4c
  by the test harness ( so one can use the _<filename> to host metadata
Karanbir Singh e86e4c
  or any config that might be needed for a test.
Karanbir Singh 0b5bb2
Karanbir Singh 0b5bb2
ToDo:
Karanbir Singh 0b5bb2
- At the moment the tests are not distro / arch specific, we might need a way
Karanbir Singh 0b5bb2
  to clearly mark a test as -only-for-c4- or -only-for-c5- etc ( specially
Karanbir Singh 0b5bb2
  when there are kickstart files involved, there are some non trivial changes
Karanbir Singh 0b5bb2
  in that area moving towards c6 )
Karanbir Singh 0b5bb2
Karanbir Singh 0b5bb2
- We also need a way to dictate if a role_<test> should be run on realiron,
Karanbir Singh 0b5bb2
  virtual machine host, virtual machine ( and maybe even the type of virt
Karanbir Singh 0b5bb2
  being used! )