Re: [Qemu-devel] [kvm-unit-tests PATCH v5 1/2] run_tests: put logs into per-test file

2017-01-11 Thread Peter Xu
On Wed, Jan 11, 2017 at 11:46:38AM +0100, Andrew Jones wrote: [...] > > So, how about this: > > > > rm -rf $unittest_log_dir.old || err "Failed remove old logs" > > if [[ -d $unittest_log_dir ]]; then > > Only [ ... ] for tests like these I thought [[ ... ]] would be superior to [ ...

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 1/2] run_tests: put logs into per-test file

2017-01-11 Thread Andrew Jones
On Wed, Jan 11, 2017 at 06:12:44PM +0800, Peter Xu wrote: > On Wed, Jan 11, 2017 at 10:51:12AM +0100, Andrew Jones wrote: > > On Wed, Jan 11, 2017 at 10:06:07AM +0100, Andrew Jones wrote: > > > On Wed, Jan 11, 2017 at 01:29:34PM +0800, Peter Xu wrote: > > > > We were using test.log before to keep

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 1/2] run_tests: put logs into per-test file

2017-01-11 Thread Peter Xu
On Wed, Jan 11, 2017 at 10:51:12AM +0100, Andrew Jones wrote: > On Wed, Jan 11, 2017 at 10:06:07AM +0100, Andrew Jones wrote: > > On Wed, Jan 11, 2017 at 01:29:34PM +0800, Peter Xu wrote: > > > We were using test.log before to keep all the test logs. This patch > > > creates one log file per test

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 1/2] run_tests: put logs into per-test file

2017-01-11 Thread Andrew Jones
On Wed, Jan 11, 2017 at 10:06:07AM +0100, Andrew Jones wrote: > On Wed, Jan 11, 2017 at 01:29:34PM +0800, Peter Xu wrote: > > We were using test.log before to keep all the test logs. This patch > > creates one log file per test case under logs/ directory with name > > "TESTNAME.log". Meanwhile, we

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 1/2] run_tests: put logs into per-test file

2017-01-11 Thread Andrew Jones
On Wed, Jan 11, 2017 at 01:29:34PM +0800, Peter Xu wrote: > We were using test.log before to keep all the test logs. This patch > creates one log file per test case under logs/ directory with name > "TESTNAME.log". Meanwhile, we will keep the last time log into > logs.old/. > > Renaming

[Qemu-devel] [kvm-unit-tests PATCH v5 1/2] run_tests: put logs into per-test file

2017-01-10 Thread Peter Xu
We were using test.log before to keep all the test logs. This patch creates one log file per test case under logs/ directory with name "TESTNAME.log". Meanwhile, we will keep the last time log into logs.old/. Renaming scripts/functions.bash into scripts/common.bash to store some more global