diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55f5bf2..6eca9f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,13 +48,19 @@ jobs: make sudo make install - - name: Build - run: | - make all && sudo make install + - name: Build base Library + run: make library && sudo make install + + - name: Build test scripts + run: make tests examples CPPFLAGS='' - name: Install Busted run: luarocks --local install busted + # To test that everthing works with ptracer.h and pt-run from + # /usr/local, we compile the tests without the "-I" preprocessor + # flag and we don't use "./run-tests". That script adds the current + # directory to the PATH, so it would use the local copy of pt-run. - name: Run Tests run: | eval "$(luarocks path)" diff --git a/examples/fibonacci/fibonacci.c b/examples/fibonacci/fibonacci.c index 8baf167..14b17af 100644 --- a/examples/fibonacci/fibonacci.c +++ b/examples/fibonacci/fibonacci.c @@ -6,7 +6,7 @@ */ #define PT_IMPLEMENTATION -#include "ptracer.h" +#include /* User specific macros when Pallene Tracer debug mode is enabled. */ #ifdef PT_DEBUG diff --git a/run-tests b/run-tests index 5e9f89c..a910d50 100755 --- a/run-tests +++ b/run-tests @@ -6,4 +6,5 @@ # ./run-tests # ./run-tests -k # ./run-tests spec/traceback_spec.lua +export PATH="$(pwd):$PATH" make tests && busted --verbose --no-keep-going "$@" diff --git a/spec/tracebacks/anon_lua/module.c b/spec/tracebacks/anon_lua/module.c index 75d0a37..6f952f9 100644 --- a/spec/tracebacks/anon_lua/module.c +++ b/spec/tracebacks/anon_lua/module.c @@ -7,7 +7,7 @@ /* Static use of the library would suffice. */ #define PT_IMPLEMENTATION -#include "ptracer.h" +#include /* Here goes user specifc macros when Pallene Tracer debug mode is active. */ #ifdef PT_DEBUG diff --git a/spec/tracebacks/depth_recursion/module.c b/spec/tracebacks/depth_recursion/module.c index 73901cb..dcb3da0 100644 --- a/spec/tracebacks/depth_recursion/module.c +++ b/spec/tracebacks/depth_recursion/module.c @@ -7,7 +7,7 @@ /* Static use of the library would suffice. */ #define PT_IMPLEMENTATION -#include "ptracer.h" +#include /* Here goes user specific macros when Pallene Tracer debug mode is active. */ #ifdef PT_DEBUG diff --git a/spec/tracebacks/dispatch/module.c b/spec/tracebacks/dispatch/module.c index c14317b..368c649 100644 --- a/spec/tracebacks/dispatch/module.c +++ b/spec/tracebacks/dispatch/module.c @@ -7,7 +7,7 @@ /* Static use of the library would suffice. */ #define PT_IMPLEMENTATION -#include "ptracer.h" +#include /* Here goes user specific macros when Pallene Tracer debug mode is active. */ #ifdef PT_DEBUG diff --git a/spec/tracebacks/ellipsis/module.c b/spec/tracebacks/ellipsis/module.c index 6dcbcf5..2b9ab6c 100644 --- a/spec/tracebacks/ellipsis/module.c +++ b/spec/tracebacks/ellipsis/module.c @@ -7,7 +7,7 @@ /* Static use of the library would suffice. */ #define PT_IMPLEMENTATION -#include "ptracer.h" +#include /* Here goes user specific macros when Pallene Tracer debug mode is active. */ #ifdef PT_DEBUG diff --git a/spec/tracebacks/multimod/module_a.c b/spec/tracebacks/multimod/module_a.c index 7b09776..cfa910e 100644 --- a/spec/tracebacks/multimod/module_a.c +++ b/spec/tracebacks/multimod/module_a.c @@ -6,7 +6,7 @@ */ #define PT_IMPLEMENTATION -#include "ptracer.h" +#include #include "module_include.h" diff --git a/spec/tracebacks/multimod/module_b.c b/spec/tracebacks/multimod/module_b.c index cdbd15f..2e63519 100644 --- a/spec/tracebacks/multimod/module_b.c +++ b/spec/tracebacks/multimod/module_b.c @@ -6,7 +6,7 @@ */ #define PT_IMPLEMENTATION -#include "ptracer.h" +#include #include "module_include.h" diff --git a/spec/tracebacks/singular/module.c b/spec/tracebacks/singular/module.c index 164e374..46f5d04 100644 --- a/spec/tracebacks/singular/module.c +++ b/spec/tracebacks/singular/module.c @@ -7,7 +7,7 @@ /* Static use of the library would suffice. */ #define PT_IMPLEMENTATION -#include "ptracer.h" +#include /* Here goes user specific macros when Pallene Tracer debug mode is active. */ #ifdef PT_DEBUG diff --git a/spec/tracebacks_spec.lua b/spec/tracebacks_spec.lua index 55b942f..d378e6d 100644 --- a/spec/tracebacks_spec.lua +++ b/spec/tracebacks_spec.lua @@ -9,9 +9,8 @@ local function assert_test(example, expected_content) assert(util.execute("make --quiet tests")) local cdir = util.shell_quote("spec/tracebacks/"..example) - local ptrun = util.shell_quote("../../../pt-run") local ok, _, output_content, err_content = - util.outputs_of_execute(string.format("cd %s && %s main.lua", cdir, ptrun)) + util.outputs_of_execute(string.format("cd %s && pt-run main.lua", cdir)) assert(not ok, output_content) assert.are.same(expected_content, err_content) end