Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check that everything works with ptracer and pt-run from /usr/local #20

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down
2 changes: 1 addition & 1 deletion examples/fibonacci/fibonacci.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

#define PT_IMPLEMENTATION
#include "ptracer.h"
#include <ptracer.h>

/* User specific macros when Pallene Tracer debug mode is enabled. */
#ifdef PT_DEBUG
Expand Down
1 change: 1 addition & 0 deletions run-tests
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$@"
2 changes: 1 addition & 1 deletion spec/tracebacks/anon_lua/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/* Static use of the library would suffice. */
#define PT_IMPLEMENTATION
#include "ptracer.h"
#include <ptracer.h>

/* Here goes user specifc macros when Pallene Tracer debug mode is active. */
#ifdef PT_DEBUG
Expand Down
2 changes: 1 addition & 1 deletion spec/tracebacks/depth_recursion/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/* Static use of the library would suffice. */
#define PT_IMPLEMENTATION
#include "ptracer.h"
#include <ptracer.h>

/* Here goes user specific macros when Pallene Tracer debug mode is active. */
#ifdef PT_DEBUG
Expand Down
2 changes: 1 addition & 1 deletion spec/tracebacks/dispatch/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/* Static use of the library would suffice. */
#define PT_IMPLEMENTATION
#include "ptracer.h"
#include <ptracer.h>

/* Here goes user specific macros when Pallene Tracer debug mode is active. */
#ifdef PT_DEBUG
Expand Down
2 changes: 1 addition & 1 deletion spec/tracebacks/ellipsis/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/* Static use of the library would suffice. */
#define PT_IMPLEMENTATION
#include "ptracer.h"
#include <ptracer.h>

/* Here goes user specific macros when Pallene Tracer debug mode is active. */
#ifdef PT_DEBUG
Expand Down
2 changes: 1 addition & 1 deletion spec/tracebacks/multimod/module_a.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

#define PT_IMPLEMENTATION
#include "ptracer.h"
#include <ptracer.h>

#include "module_include.h"

Expand Down
2 changes: 1 addition & 1 deletion spec/tracebacks/multimod/module_b.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

#define PT_IMPLEMENTATION
#include "ptracer.h"
#include <ptracer.h>

#include "module_include.h"

Expand Down
2 changes: 1 addition & 1 deletion spec/tracebacks/singular/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/* Static use of the library would suffice. */
#define PT_IMPLEMENTATION
#include "ptracer.h"
#include <ptracer.h>

/* Here goes user specific macros when Pallene Tracer debug mode is active. */
#ifdef PT_DEBUG
Expand Down
3 changes: 1 addition & 2 deletions spec/tracebacks_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading