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

Set up new unittest system #448

Merged
merged 2 commits into from
Aug 6, 2023

Conversation

TheDuckCow
Copy link
Member

Currently, all two tests pass over all targeted versions of blender. See some different sample commands below (may eventually add this into a README, but that will be a later PR).

cmd: python3 run_tests.py

-------------------------------------------------------------------------------
bversion   	ran_tests	ran	failed	errors
-------------------------------------------------------------------------------
(3.6.0)   	all_tests	2	0	No errors

cmd: python3 run_tests.py -a

-------------------------------------------------------------------------------
bversion   	ran_tests	ran	failed	errors
-------------------------------------------------------------------------------
(3.6.0)   	all_tests	2	0	No errors
(3.5.1)   	all_tests	2	0	No errors
(3.4.0)   	all_tests	2	0	No errors
(3.2.1)   	all_tests	2	0	No errors
(3.3.1)   	all_tests	2	0	No errors
(3.1.0)   	all_tests	2	0	No errors
(3.0.0)   	all_tests	2	0	No errors
(2.93.0)   	all_tests	2	0	No errors
(2.90.1)   	all_tests	2	0	No errors
(2.80.75)   	all_tests	2	0	No errors

cmd: python3 run_tests.py -t test_enable -v 3.6,2 (showing up running a specific test, and specific blender versions)

-------------------------------------------------------------------------------
bversion   	ran_tests	ran	failed	errors
-------------------------------------------------------------------------------
(3.6.0)   	test_enable	1	0	No errors
(2.93.0)   	test_enable	1	0	No errors
(2.90.1)   	test_enable	1	0	No errors
(2.80.75)   	test_enable	1	0	No errors

Relates to #424 but does not itself complete the change, as individual tests still need to be migrated.

This sets up the framework and ability to test the addon on multiple
versions of blender. It continues to use the blender_execs.txt file
to indicate which versions of blender are for running tests, but expands
on controls to let the user specify which specific versions of blender
they want to test, and with nice commandline documentation for args.
@TheDuckCow TheDuckCow changed the title Migrate to the unittest library Set up new unittest system Jul 23, 2023
@TheDuckCow TheDuckCow self-assigned this Jul 23, 2023
@TheDuckCow
Copy link
Member Author

FYI that this isn't yet using the new build system, so in the meantime you'll have to modify the line:
COMPILE_CMD = ["./compile.sh", "-fast"] in the run_tests.py for now.

Once #422 is merged, we'll update the script here.

@TheDuckCow TheDuckCow linked an issue Jul 23, 2023 that may be closed by this pull request
@StandingPadAnimations
Copy link
Collaborator

I think I'm missing something, cause my output is barebones when running the test scripts. I did get the following error when running on Arch Linux, but it didn't seem to do much:

Failed to open dir (No such file or directory): /run/user/1000/gvfs/

/run/user is a Flatpak think so I don't know why that happened (since I'm using the native Blender package)

@TheDuckCow
Copy link
Member Author

Happy to debug live in the later part of the dev team meeting in ~1h 45m, can you tell which line this is hailing from?

I realize that nothing stops you from trying to use the bpy-build command, if you want to locally swap for those args in the run_tests.py file COMPILE_CMD command args list.

@StandingPadAnimations
Copy link
Collaborator

Happy to debug live in the later part of the dev team meeting in ~1h 45m, can you tell which line this is hailing from?

I'm not sure; doesn't impact much though. I'll test with bpy-build later today.

@TheDuckCow
Copy link
Member Author

Any newfound luck with the latest bpy build structure @StandingPadAnimations? If not, I can separatley try to test on another machine in a fresh space.

@StandingPadAnimations
Copy link
Collaborator

Haven't tested with bpy-build yet, might try later today

@StandingPadAnimations
Copy link
Collaborator

Still get the error with bpy-build (had to do a local merge for bpy-build). Like I said, it doesn't seem to impact anything (and frankly it's a little confusing to me since I'm not running Blender as a Flatpak, but /run is normally associated with Flatpaks).

This is my test output:

-------------------------------------------------------------------------------
bversion   	ran_tests	ran	failed	errors
-------------------------------------------------------------------------------
(3.6.0)   	all_tests	2	0	No errors

@TheDuckCow TheDuckCow merged commit d0a5c76 into milestone-3-5-0 Aug 6, 2023
@TheDuckCow TheDuckCow deleted the 424-migrate-to-the-unittest-library branch August 6, 2023 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate to the unittest library
2 participants