./setup
If you have updated anything in test_lib, reinstall test_lib by running
sudo python3 setup.py install
- Run test cases by single file
python3 single_test/smoke_test.py --dbtype mariadb --install_path $your_install_path$
- Run a particular test method in a test file
python3 single_test/smoke_test.py --dbtype mariadb --install_path $your_install_path$ --method $method_name
- Run all tests together
python3 run_tests.py --dbtype mariadb --install_path $your_install_path$
There are other optional flags you can set(except the single flag, which the scripts will take care of). Check them out by using the -h flag:
ubuntu@xxx:~/eloq_test$ /bin/python3 /home/ubuntu/eloq_test/run_tests.py -h
usage: run_tests.py [-h] --dbtype --install_path INSTALL_PATH [--bootstrap {true,false}] [--repeat REPEAT] [--method METHOD] [--storage {cassandra,dynamo}] [--force {true,false}] [--group {single,multiple}]
optional arguments:
-h, --help show this help message and exit
--install_path INSTALL_PATH
Eloq install path
--dbtype {mariadb,redis}
Specify the database engine
--bootstrap {true,false}
(User should not set this flag!! The scripts will take care of this flag) If this test runs singly or by run_tests. In the latter case, run_tests will set this flag to false, meaning single tests don't need to bootstrap themselves.
--repeat REPEAT Number of times to repeat the test, cannot be smaller than 1.
--method METHOD Specify the paticular test method to run
--storage {cassandra,dynamo}
Specify the storage engine
--force {true,false} Continue to run tests if one test fails.
--group {single,multiple}
For run_tests only. Specify running single-node tests or multi-nodes tests. If this arg is absent, run both(which is the default behavior)
In most cases, the test will automatically cleanup storage and kill mysqld after it finishes, no matter it's a success, failure or keyboard interrupt. Very occasionally, it will fail to complete auto-cleanup, in which case we need to do this manually. First, kill the mysqld processes:
pkill -9 mysqld
Then, if you are using Cassandra, drop the kepspace by running:
python3 clean_cass.py
or if you are using DynamoDB:
python3 clean_dynamo.py