From 078ef6641c3c36946fab22d0d4c8e330d2b4d518 Mon Sep 17 00:00:00 2001 From: Ahmed Masud Date: Fri, 19 Oct 2018 17:17:48 -0400 Subject: Do not fail "ninja test" when running as subproject --- test/wrong_command.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/wrong_command.c') diff --git a/test/wrong_command.c b/test/wrong_command.c index 8366a98..8b563c9 100644 --- a/test/wrong_command.c +++ b/test/wrong_command.c @@ -1,9 +1,16 @@ #include int main(void) { +#ifdef MESON_IS_SUBPROJECT + fprintf(stderr, "libfuse tests were skipped because it's a meson subproject.\n" + "If you wish to run them try:\n" + "'cd /subprojects/libfuse && meson . build && cd build && python3 -m pytest test/' instead"); + return 77; /* report as a skipped test */ +#else fprintf(stderr, "\x1B[31m\e[1m" "This is not the command you are looking for.\n" "You probably want to run 'python3 -m pytest test/' instead" "\e[0m\n"); return 1; +#endif } -- cgit v1.2.3