bstinson / centos / t_functional

Forked from centos/t_functional 4 years ago
Clone

79f00f runtests.sh:

Authored and Committed by iaind 11 years ago
    runtests.sh:
    
        This checks to see if tests/0_lib/functions.sh exists and if not, exits with status $FAIL. FAIL is defined in functions.sh so the test would exit 0 if functions.sh is missing. Added code to define FAIL=1 before testing for the existence of functions.sh.
    
    tests/0_lib/functions.sh :
    
        The function t_Process is supposed to filter files begining with _ so that they don't get executed. This wasn't working for tests/p_openssh/_helper_sshd_user_login.expect which was being run and failed under cerain circumstances. This line
    
         [[ "${f}" =~ readme|^_ ]] &&  continue;
    
    does the filtering, however, ${f} is for example ./tests/p_openssh/_helper_sshd_user_login.expect which doesn't match ^_. I added a basename to the line
    
        [[ "$(basename ${f})" =~ readme|^_ ]] &&  continue;
    
    which fixes this.
    
    tests/p_sqlite/sqlite_1-create_db_table.sh
    
       This would fail if the test is run more than once without removing the test db/table with
    
       Error: table tf_table already exists
    
    Added a line to drop the table if it exists prior to running the create table test.
    
        
file modified
+3 -0
file modified
+1 -1