From 806de9fd0981d0d18e539081fedd40a7aac35ede Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 24 Sep 2019 14:51:49 +0800 Subject: [PATCH] test/pybind: fix local variables for emacs * pass CEPH_BIN env variable if necessary * do not 'make' unless necessary * use `cmake --build` as developer might be using some different cmake generator for building ceph. Signed-off-by: Kefu Chai --- src/test/pybind/test_ceph_argparse.py | 8 +++++--- src/test/pybind/test_ceph_daemon.py | 7 ++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/test/pybind/test_ceph_argparse.py b/src/test/pybind/test_ceph_argparse.py index 64321c7a70c..cd1b4264345 100755 --- a/src/test/pybind/test_ceph_argparse.py +++ b/src/test/pybind/test_ceph_argparse.py @@ -1261,8 +1261,10 @@ class TestConfigKey(TestArgparse): def test_list(self): self.check_no_arg('config-key', 'list') + # Local Variables: -# compile-command: "cd ../.. ; make -j4 && -# PYTHONPATH=pybind nosetests --stop \ -# test/pybind/test_ceph_argparse.py # test_ceph_argparse.py:TestOSD.test_rm" +# compile-command: "cd ../../..; cmake --build build --target get_command_descriptions -j4 && +# CEPH_BIN=build/bin \ +# PYTHONPATH=src/pybind nosetests --stop \ +# src/test/pybind/test_ceph_argparse.py:TestOSD.test_rm" # End: diff --git a/src/test/pybind/test_ceph_daemon.py b/src/test/pybind/test_ceph_daemon.py index 64a0ea39fe6..c2a96486ca3 100755 --- a/src/test/pybind/test_ceph_daemon.py +++ b/src/test/pybind/test_ceph_daemon.py @@ -40,8 +40,9 @@ class TestDaemonWatcher(TestCase): dw = DaemonWatcher(None) # Can't count on having a tty available during tests, so only test the false case self.assertEqual(dw.supports_color(StringIO()), False) + # Local Variables: -# compile-command: "cd ../.. ; make -j4 && -# PYTHONPATH=pybind nosetests --stop \ -# test/pybind/test_ceph_daemon.py +# compile-command: "cd ../../..; +# PYTHONPATH=src/pybind nosetests --stop \ +# src/test/pybind/test_ceph_daemon.py" # End: -- 2.39.5