-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add tests #7
Merged
Merged
Add tests #7
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
633f5b9
git subrepo pull (merge) libgfxd
Dragorn421 9f0d064
Fix https://github.com/Thar0/pygfxd/issues/5
Dragorn421 6066f7a
Fix/update `gfx_ucode` structure in py binding
Dragorn421 afb8dfa
Update python bindings to libgfxd 7dd7fa1
Dragorn421 b5e08a0
Some test setup
Dragorn421 04f51ee
remove test.py, shebang gang
Dragorn421 d796607
Introduce unittest usage
Dragorn421 b2620c1
Add CROSS as binutils prefix
Dragorn421 905c7fc
Add `test_gfxd_vtx_callback`
Dragorn421 c480e12
fix unsetting buf/cb (wip), rework anti-gc buf/cb dict, fix https://g…
Dragorn421 a153459
Merge branch 'master' into dev
Dragorn421 2fc6146
Fix somehow removed actual call to output_buffer
Dragorn421 e58393b
Merge branch 'master' into dev
Dragorn421 d4e4c94
Fix: replace del with .pop(..., None) to fix KeyError if no callback …
Dragorn421 c600fbe
Merge branch 'master' into dev
Dragorn421 31026e3
Fix `gfxd_arg_value`, `gfxd_value_by_type` bindings
Dragorn421 4df2c33
Merge branch 'master' into dev
Dragorn421 8cc4876
more tests
Dragorn421 9167d4c
fix
Dragorn421 7ac147e
Have gfxd_vtx_callback binding take None
Dragorn421 359d3e7
Merge branch 'master' into dev
Dragorn421 3791ea9
test nulling "missing" callback
Dragorn421 065541d
fix
Dragorn421 1508695
Merge branch 'master' into dev
Dragorn421 4187a3b
Merge remote-tracking branch 'upstream/master' into dev
Dragorn421 7c55e08
Merge remote-tracking branch 'upstream/master' into dev
Dragorn421 842028f
revert pygfxd.py
Dragorn421 5859756
make CI run tests, attempt 1
Dragorn421 732f2f1
run tests in CI, attempt 2
Dragorn421 204a19c
run tests in CI, attempt 3
Dragorn421 dcf76fa
run tests in CI, attempt 4
Dragorn421 2ee7c00
run tests in CI, attempt 5
Dragorn421 0338c7b
Fix unsetting callbacks: pass None
Dragorn421 32a5ccf
Merge branch 'fix_unsetting_callbacks' into dev
Dragorn421 a4299bf
fix fix
Dragorn421 bbcd94b
Merge remote-tracking branch 'upstream/master' into dev
Dragorn421 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Run tests | ||
|
||
# Build on every branch push, tag push, and pull request change: | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
run_tests: | ||
name: Run tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Compile libgfxd | ||
run: gcc -shared -fPIC libgfxd/gfxd.c libgfxd/uc_f3d.c libgfxd/uc_f3db.c libgfxd/uc_f3dex.c libgfxd/uc_f3dex2.c libgfxd/uc_f3dexb.c libgfxd/uc.c -o libgfxd.so | ||
|
||
- name: Install cross compiler and binutils | ||
run: sudo apt-get install gcc-mips-linux-gnu binutils-mips-linux-gnu | ||
|
||
- name: Build test data | ||
run: make -C test | ||
|
||
- name: Run tests | ||
run: ./test/test.py |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.o | ||
*.bin | ||
*.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Compile C files and dump their .data section to binary | ||
|
||
CROSS := mips-linux-gnu- | ||
|
||
CC := $(CROSS)gcc | ||
OBJCOPY := $(CROSS)objcopy | ||
NM := $(CROSS)nm | ||
|
||
C_FILES := f3dex2.c | ||
BIN_FILES := $(C_FILES:.c=.bin) | ||
|
||
bin_files: $(BIN_FILES) | ||
|
||
test: bin_files | ||
./test.py | ||
|
||
.PHONY: bin_files test | ||
|
||
%.bin: %.o | ||
$(OBJCOPY) -O binary -j .data $< $@ | ||
$(NM) -f sysv $< > $(@:.bin=.txt) | ||
|
||
%.o: %.c | ||
$(CC) -c -o $@ $^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#define F3DEX_GBI_2 | ||
#include "gbi.h" | ||
|
||
Gfx emptyDList[] = { | ||
gsSPEndDisplayList(), | ||
}; | ||
|
||
Gfx oneTriDList[] = { | ||
gsSPVertex(0x42042069, 3, 0), | ||
gsSP1Triangle(0, 1, 2, 0), | ||
gsSPEndDisplayList(), | ||
}; | ||
|
||
Gfx setLights1DList[] = { | ||
gsSPSetLights1(*(Lightsn *)0x09000000), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "../libgfxd/gbi.h" | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could an include path for libgfxd be specified in the makefile rather than this dummy file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea with this wrapper .h would also be to let someone try another gbi.h, since libgfxd's is glank's i.e. not sgi's / decomp's
But yeah this can be changed idk