• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

include/H24-Apr-2020-1,6511,169

t/H24-Apr-2020-6,0465,194

Makefile.amH A D24-Apr-20201.8 KiB6032

README.mdH A D24-Apr-20202 KiB5340

test_run.shH A D24-Apr-20202.7 KiB9862

README.md

1sysbench Test Suite
2===================
3
4sysbench uses the [Cram](https://bitheap.org/cram/) framework for
5functional and regression testing. If your system has Python 2.7.9 or
6later, or Python 3.4 or later, installing Cram is as simple as executing
7`pip install cram`.
8
9If you use an older Python version, you may need to [install
10pip](https://pip.pypa.io/en/latest/installing/) first:
11
12``` {.example}
13curl https://bootstrap.pypa.io/get-pip.py | python
14```
15
16To run the sysbench test suite, invoke the `test_run.sh` script in the
17`tests` directory as follows:
18
19``` {.example}
20./test_run.sh [test_name]...
21```
22
23Each `test_name` argument is a name of a test case file. Functional and
24regression tests are located in the `t` subdirectory in files with the
25`.t` suffix.
26
27If no tests are named on the `test_run.sh` command line, it will execute
28all files with the `.t` suffix in the `t` subdirectory.
29
30Some tests require external servers (MySQL, PostgreSQL, etc). One should
31use environment variables to specify connection related arguments that
32sysbench can use to connect to such external server(s). The currently
33recognized variables are:
34
35- `SBTEST_MYSQL_ARGS` -- MySQL connection options: `--mysql-host`,
36  `--mysql-port`, `--mysql-socket` `--mysql-user`, `--mysql-password`
37  and `--mysql-db`;
38
39- `SBTEST_PGSQL_ARGS` -- PostgreSQL connection options: `--pgsql-host`,
40  `--pgsql-port`, `--pgsql-user`, `--pgsql-password` and `--pgsql-db`.
41
42For example:
43``` {.example}
44export SBTEST_MYSQL_ARGS="--mysql-host=localhost --mysql-user=sbtest --mysql-password=secret --mysql-db=sbtest"
45export SBTEST_PGSQL_ARGS="--pgsql-host=localhost --pgsql-user=postgres --pgsql-password=secret --pgsql-db=sbtest"
46./test_run.sh
47```
48
49sysbench assumes that server(s) are pre-configured so that the specified
50database exists and the user connecting with the specified credentials
51has all privileges on the database. In particular, sysbench must have
52enough privileges to create/drop/read/modify tables in that database.
53