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

Unit Testing #25

Closed
Meziu opened this issue Jan 20, 2022 · 2 comments · Fixed by #41
Closed

Unit Testing #25

Meziu opened this issue Jan 20, 2022 · 2 comments · Fixed by #41

Comments

@Meziu
Copy link
Member

Meziu commented Jan 20, 2022

I just discovered this exists: https://doc.rust-lang.org/unstable-book/language-features/custom-test-frameworks.html.
Would need integration with cargo-3ds.

This issue has no priority, but it would be cool if we ever ran out of issues to work on (unlikely...).

@ian-h-chamberlain
Copy link
Member

Just leaving a note as I tried to build a test executable for fun, and got these linker errors:

$ cargo 3ds test -vv --no-run --lib |& egrep -o 'undefined reference .+' | sort | uniq 
undefined reference to `execvp'
undefined reference to `getpwuid_r'
undefined reference to `getuid'
undefined reference to `pipe'
undefined reference to `pthread_sigmask'
undefined reference to `sigemptyset'
undefined reference to `sysconf'

Some of these (particularly pipe + execvp, maybe pthread_sigmask and sigemptyset) seem tricky or maybe impossible for us to stub out, but I believe that would be the minimum set of other symbols we'd need to use the default test implementation. Perhaps using the custom test framework would require less work than shoehorning the existing test runner, but that feature is unstable with very little documentation, so I'm not really sure. Just another option to potentially consider.

@Meziu
Copy link
Member Author

Meziu commented Jan 31, 2022

If the custom test runner lets us use tests implemented for the default runner, there is no problem trying.

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 a pull request may close this issue.

2 participants