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

Make self-tests run after install by a typical user #760

Closed
noloader opened this Issue Dec 7, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@noloader
Copy link
Collaborator

noloader commented Dec 7, 2018

Currently our self tests only work when run from the build directory. The behavior can be changed such that they run from the install directory, but then the self tests don't run from the build directory.

To accommodate both cases we need to check the install location and the build directory. However, Debian err'd on the side of security and asked us to avoid searching. We honored Debian's request because it was a sound decision.

Revisiting the strategy I think we want the common case to be, the self tests "just work" under reasonable use cases. That is, they work when run from the build directory, and they work when run from the install directory. This helps regular users the most.

We can add a define to disable searching for test vectors for Debian.

noloader added a commit that referenced this issue Dec 7, 2018

@noloader

This comment has been minimized.

Copy link
Collaborator

noloader commented Dec 7, 2018

Commit 1c88fd6f5956 took care of this issue. Users can run the self tests from the current directory or the install directory and things should "just work".

A new define was added, CRYPTOPP_DISABLE_DATA_DIR_SEARCH, to preserve the former behavior. Folks like Debian can activate it if they like.

@noloader noloader closed this Dec 7, 2018

noloader added a commit that referenced this issue Dec 8, 2018

noloader added a commit that referenced this issue Jan 2, 2019

noloader added a commit that referenced this issue Jan 2, 2019

noloader added a commit that referenced this issue Jan 3, 2019

Use _get_pgmptr on Windows (GH #760)
Let's see how well this works across the versions of Visual Studio we support

noloader added a commit that referenced this issue Jan 3, 2019

Use _NSGetExecutablePath on OS X (GH #760)
Also test for symlinks and reject them, if found.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment