From 1501910dd0d09c50057c8358901663a87333bd8f Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 18 Apr 2024 14:51:42 -0400 Subject: tests: Add ../src to the include path --- config/flags.mk | 1 + tests/alloc.c | 6 +++--- tests/bfstd.c | 6 +++--- tests/bit.c | 6 +++--- tests/ioq.c | 10 +++++----- tests/main.c | 6 +++--- tests/mksock.c | 2 +- tests/tests.h | 4 ++-- tests/trie.c | 6 +++--- tests/xspawn.c | 10 +++++----- tests/xtime.c | 8 ++++---- tests/xtouch.c | 8 ++++---- 12 files changed, 37 insertions(+), 36 deletions(-) diff --git a/config/flags.mk b/config/flags.mk index 1043779..d02cc8b 100644 --- a/config/flags.mk +++ b/config/flags.mk @@ -28,6 +28,7 @@ export XLDLIBS=${LDLIBS} # Immutable flags export BFS_CPPFLAGS= \ + -Isrc \ -D__EXTENSIONS__ \ -D_ATFILE_SOURCE \ -D_BSD_SOURCE \ diff --git a/tests/alloc.c b/tests/alloc.c index 9f08111..54b84ba 100644 --- a/tests/alloc.c +++ b/tests/alloc.c @@ -2,9 +2,9 @@ // SPDX-License-Identifier: 0BSD #include "tests.h" -#include "../src/alloc.h" -#include "../src/config.h" -#include "../src/diag.h" +#include "alloc.h" +#include "config.h" +#include "diag.h" #include #include #include diff --git a/tests/bfstd.c b/tests/bfstd.c index dc5ceaa..5e408ca 100644 --- a/tests/bfstd.c +++ b/tests/bfstd.c @@ -2,9 +2,9 @@ // SPDX-License-Identifier: 0BSD #include "tests.h" -#include "../src/bfstd.h" -#include "../src/config.h" -#include "../src/diag.h" +#include "bfstd.h" +#include "config.h" +#include "diag.h" #include #include #include diff --git a/tests/bit.c b/tests/bit.c index 6548c30..b444e50 100644 --- a/tests/bit.c +++ b/tests/bit.c @@ -2,9 +2,9 @@ // SPDX-License-Identifier: 0BSD #include "tests.h" -#include "../src/bit.h" -#include "../src/config.h" -#include "../src/diag.h" +#include "bit.h" +#include "config.h" +#include "diag.h" #include #include #include diff --git a/tests/ioq.c b/tests/ioq.c index 1ce8f75..a69f2bf 100644 --- a/tests/ioq.c +++ b/tests/ioq.c @@ -2,11 +2,11 @@ // SPDX-License-Identifier: 0BSD #include "tests.h" -#include "../src/ioq.h" -#include "../src/bfstd.h" -#include "../src/config.h" -#include "../src/diag.h" -#include "../src/dir.h" +#include "ioq.h" +#include "bfstd.h" +#include "config.h" +#include "diag.h" +#include "dir.h" #include #include #include diff --git a/tests/main.c b/tests/main.c index 69903d4..281c417 100644 --- a/tests/main.c +++ b/tests/main.c @@ -6,9 +6,9 @@ */ #include "tests.h" -#include "../src/bfstd.h" -#include "../src/color.h" -#include "../src/config.h" +#include "bfstd.h" +#include "color.h" +#include "config.h" #include #include #include diff --git a/tests/mksock.c b/tests/mksock.c index f3b61da..5786cb6 100644 --- a/tests/mksock.c +++ b/tests/mksock.c @@ -6,7 +6,7 @@ * program does the job. */ -#include "../src/bfstd.h" +#include "bfstd.h" #include #include #include diff --git a/tests/tests.h b/tests/tests.h index 351badb..d61ffd7 100644 --- a/tests/tests.h +++ b/tests/tests.h @@ -8,8 +8,8 @@ #ifndef BFS_TESTS_H #define BFS_TESTS_H -#include "../src/config.h" -#include "../src/diag.h" +#include "config.h" +#include "diag.h" /** Unit test function type. */ typedef bool test_fn(void); diff --git a/tests/trie.c b/tests/trie.c index fec0de2..2a6eb48 100644 --- a/tests/trie.c +++ b/tests/trie.c @@ -2,9 +2,9 @@ // SPDX-License-Identifier: 0BSD #include "tests.h" -#include "../src/trie.h" -#include "../src/config.h" -#include "../src/diag.h" +#include "trie.h" +#include "config.h" +#include "diag.h" #include #include diff --git a/tests/xspawn.c b/tests/xspawn.c index c1bac36..fd8362e 100644 --- a/tests/xspawn.c +++ b/tests/xspawn.c @@ -2,11 +2,11 @@ // SPDX-License-Identifier: 0BSD #include "tests.h" -#include "../src/alloc.h" -#include "../src/bfstd.h" -#include "../src/config.h" -#include "../src/dstring.h" -#include "../src/xspawn.h" +#include "alloc.h" +#include "bfstd.h" +#include "config.h" +#include "dstring.h" +#include "xspawn.h" #include #include #include diff --git a/tests/xtime.c b/tests/xtime.c index f85402e..fd7aa0f 100644 --- a/tests/xtime.c +++ b/tests/xtime.c @@ -2,10 +2,10 @@ // SPDX-License-Identifier: 0BSD #include "tests.h" -#include "../src/xtime.h" -#include "../src/bfstd.h" -#include "../src/config.h" -#include "../src/diag.h" +#include "xtime.h" +#include "bfstd.h" +#include "config.h" +#include "diag.h" #include #include #include diff --git a/tests/xtouch.c b/tests/xtouch.c index fad272f..b1daec7 100644 --- a/tests/xtouch.c +++ b/tests/xtouch.c @@ -1,10 +1,10 @@ // Copyright © Tavian Barnes // SPDX-License-Identifier: 0BSD -#include "../src/bfstd.h" -#include "../src/config.h" -#include "../src/sanity.h" -#include "../src/xtime.h" +#include "bfstd.h" +#include "config.h" +#include "sanity.h" +#include "xtime.h" #include #include #include -- cgit v1.2.3