Remove 'tests' target in favor of calling py.test directly.
authorNikolaus Rath <Nikolaus@rath.org>
Tue, 11 Apr 2017 00:08:58 +0000 (17:08 -0700)
committerNikolaus Rath <Nikolaus@rath.org>
Tue, 11 Apr 2017 00:08:58 +0000 (17:08 -0700)
Together with the previous commit, this fixes #156.

README.md
test/meson.build
test/wrong_command.c

index c1f050954bc38b836f73452d500219e19c5207b1..c7aec6ade4f4cbc1b83043f0dcb20c986af64908 100644 (file)
--- a/README.md
+++ b/README.md
@@ -46,17 +46,17 @@ command:
 To build, test and install libfuse, you then use Ninja:
 
     $ ninja
-    $ sudo ninja tests # requires pytest, see below
+    $ sudo python3 -m pytest test/
     $ sudo ninja install
 
 Running the tests requires the [py.test](http://www.pytest.org/)
 Python module. Instead of running the tests as root, the majority of
-tests can also be run as a regular user if *util/fusermount3* is
-made setuid root first:
+tests can also be run as a regular user if *util/fusermount3* is made
+setuid root first:
 
     $ sudo chown root:root util/fusermount3
     $ sudo chmod 4755 util/fusermount3
-    $ ninja tests
+    $ python3 -m pytest test/
 
 
 Alternate Installation
index 44c0eb4301c181aec5887a4a5f9e03ed2033d549..c5b940f28c822c4e88147a9e6d2d40413bce8280 100644 (file)
@@ -21,14 +21,7 @@ td += custom_target('test_scripts', input: test_scripts,
                       command: ['cp', '-fPu', '--preserve=mode',
                                 '@INPUT@', meson.current_build_dir() ])
 
-# Create a new 'tests' target that we can run with Ninja
-run_target('tests', depends: td,
-           command: [ 'python3', '-m', 'pytest',
-                      meson.current_build_dir() ])
-
-
 # Provide something helpful when running 'ninja test'
 wrong_cmd = executable('wrong_command', 'wrong_command.c',
                        install: false)
 test('wrong_cmd', wrong_cmd)
-
index ef835b3d30bbbfa172304052c85da1deeb8d8f26..8366a9855e3ff87f1bc71d507f329851455b6aca 100644 (file)
@@ -3,8 +3,7 @@
 int main(void) {
        fprintf(stderr, "\x1B[31m\e[1m"
                "This is not the command you are looking for.\n"
-               "You probably want to run 'ninja tests' instead "
-               "(note the 's' at the end).\n"
-               "\e[0m");
+               "You probably want to run 'python3 -m pytest test/' instead"
+               "\e[0m\n");
        return 1;
 }