ptest-runner: make DEFAULT_DIRECTORY be able to be defined when compiling
In yocto project ptest data are installed toPTEST_PATH ?= "${libdir}/${BPN}/ptest". Here make DEFAULT_DIRECTORY be able to be defined outside of c code (e.g. passed in by CFLAGS), in case libdir isn't "/usr/lib", which will cause "No ptests found" error when running "ptest-runner" command. We will pass libdir to DEFAULT_DIRECTORY when compiling to avoid that error.
--- main.c | 2 ++ 1 file changed, 2 insertions(+)
main.c +2 -0
@@ -37,7 +37,9 @@#include "utils.h" +#ifndef DEFAULT_DIRECTORY #define DEFAULT_DIRECTORY "/usr/lib" +#endif #define DEFAULT_TIMEOUT 300 static inline void
Signature · 1 line
1.9.1
Pushed, thx!,
Feel free to update the recipe.
Cheers,
Anibal
Quoted 30 lines · Li Zhou
In yocto project ptest data are installed to
PTEST_PATH?= "${libdir}/${BPN}/ptest". Here makeDEFAULT_DIRECTORYbe able to be defined outside of c code (e.g. passed in by CFLAGS), in case libdir isn't "/usr/lib", which will cause "No ptests found" error when running "ptest-runner" command. We will pass libdir toDEFAULT_DIRECTORYwhen compiling to avoid that error.Signed-off-by Li Zhou <[email protected]>--- main.c | 2 ++ 1 file changed, 2 insertions(+)main.c +2
-1@@ -37,7 +37,9 @@#include "utils.h" +#ifndef DEFAULT_DIRECTORY #define DEFAULT_DIRECTORY "/usr/lib" +#endif #define DEFAULT_TIMEOUT 300 static inline void --1.9.1