From ba9ab22accba57740e1d95e28f38c0f79848d7be Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 10 Sep 2019 17:40:30 +0800 Subject: [PATCH] script/run-cbt.sh: check option correctly * s/source_dir/source-dir/: as the option is named "--source-dir", not "--source_dir" * cd $build_dir, before launching/stopping vstart. as vstart.sh is supposed to run from the build directory Signed-off-by: Kefu Chai --- src/script/run-cbt.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/script/run-cbt.sh b/src/script/run-cbt.sh index 491c61c54ce..29997fa8c1b 100755 --- a/src/script/run-cbt.sh +++ b/src/script/run-cbt.sh @@ -38,7 +38,7 @@ while true; do build_dir=$2 shift 2 ;; - --source_dir) + --source-dir) source_dir=$2 shift 2 ;; @@ -78,18 +78,22 @@ if test -z "$cbt_dir"; then git clone --depth 1 -b master https://github.com/ceph/cbt.git $cbt_dir fi +# store absolute path before changing cwd +source_dir=$(readlink -f $source_dir) if ! $use_existing; then + cd $build_dir MDS=0 MGR=1 OSD=3 MON=1 $source_dir/src/vstart.sh -n -X \ --without-dashboard --memstore \ -o "memstore_device_bytes=34359738368" \ --crimson --nodaemon --redirect-output \ --osd-args "--memory 4G" + cd - fi for config_file in $config_files; do echo "testing $config_file" cbt_config=$(mktemp $config_file.XXXX.yaml) - $source_dir/src/test/crimson/cbt//t2c.py \ + $source_dir/src/test/crimson/cbt/t2c.py \ --build-dir $build_dir \ --input $config_file \ --output $cbt_config @@ -101,5 +105,6 @@ for config_file in $config_files; do done if ! $use_existing; then + cd $build_dir $source_dir/src/stop.sh --crimson fi -- 2.39.5