From e963dd228fd565922a9e1971846854c989283f8e Mon Sep 17 00:00:00 2001 From: Aaron Whitehouse Date: Thu, 17 Mar 2022 10:05:01 +0000 Subject: [PATCH] Add tests README with instructions on testing --- tests/README.md | 30 ++++++++++++++++++++++++++++++ tests/run-tests.sh | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 tests/README.md diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 0000000..65e5658 --- /dev/null +++ b/tests/README.md @@ -0,0 +1,30 @@ +### Requirements ### +Tests must be run inside a virtual machine. This is for your own safety, as the tests may create and destroy zpools etc. + +A VM with 35GB of storage and 8 cores completes the tests in about 5 hours. + +#### Packages #### +The tests require the following packages to be installed in the VM (Ubuntu 20.04 package names are used, translate as appropriate): +``` +zfsutils-linux +libconfig-inifiles-perl +libcapture-tiny-perl +``` +``` +apt install zfsutils-linux libconfig-inifiles-perl libcapture-tiny-perl +``` + +#### Install sanoid within the VM #### +Install sanoid within the VM, for example +``` +apt install git +git clone https://github.com/jimsalterjrs/sanoid.git +mkdir /etc/sanoid/ +cp sanoid/sanoid.defaults.conf /etc/sanoid/ +``` + +### Run the tests ## +``` +cd sanoid/tests/ +./run-tests.sh +``` \ No newline at end of file diff --git a/tests/run-tests.sh b/tests/run-tests.sh index 38054b0..9a2a080 100755 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -1,6 +1,6 @@ #!/bin/bash -# run's all the available tests +# runs all the available tests for test in */; do if [ ! -x "${test}/run.sh" ]; then