]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
tests: Add functional test suite
authorTom Hromatka <tom.hromatka@oracle.com>
Thu, 27 Jun 2019 17:28:53 +0000 (11:28 -0600)
committerDhaval Giani <dhaval.giani@oracle.com>
Tue, 17 Sep 2019 22:14:02 +0000 (15:14 -0700)
commit996470ba12ccb9fd76d1204f3946ecc1e1a3c756
tree909cd83000507de7837f94859d233baafce72b57
parent6c08dce9140e91a2018407456ae470ec540f9467
tests: Add functional test suite

This commit adds a functional test suite that utilizes lxc
containers to guarantee a non-destructive test environment.

The tests can be invoked individually, as a group of related
tests, or from automake via the standard 'make check'
command.

No tests are included as part of this commit.

Example test invocations:

    Run a single test (first cd to tests/ftests):
        ./001-cgget-basic_cgget.py
        or
        ./ftests.py -N 15      # Run test #015

    Run a suite of tests (first cd to tests/ftests):
        ./ftests.py -s cgget   # Run all cgget tests

    Run all the tests by hand
        ./ftests.py
        # This may be advantageous over running make check
        # because it will try to re-use the same lxc
        # container for all of the tests.  This should
        # provide a significant performance increase

    Run the tests from automake
        make check
        # Then examine the *.trs and *.log files for
        # specifics regarding each test result

Example output from a test run:

Test Results:
        Run Date:                     Jun 03 13:41:35
        Passed:                               1  test
        Skipped:                              0 tests
        Failed:                               0 tests
-----------------------------------------------------------------
Timing Results:
        Test                               Time (sec)
        ---------------------------------------------------------
        setup                                    6.95
        001-cgget-basic_cgget.py                 0.07
        teardown                                 0.00
        ---------------------------------------------------------
        Total Run Time                           7.02

Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
tests/ftests/README.md [new file with mode: 0644]
tests/ftests/config.py [new file with mode: 0644]
tests/ftests/consts.py
tests/ftests/ftests.py [new file with mode: 0755]