fix(pam/integration-tests): Use absolute paths for compiling and reference external files #274
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.
PAM integration tests highly depend on C code and sometimes we need to debug them using the good old gdb or address sanitizer. This implies using
go test -c
to generate the binaries to inspect with the proper debug symbols.At the current state to be able to run the tests from the generated binary, we need to
chdir
inside the integration-tests folder, but this is a bit annoying.So basically this change allows to just do
go test -C ./pam/integration-tests -c
andgdb --args ./pam/integration-tests/integration-tests.test -test.run TestCLI
. Tiny change but it makes my life happier :).Since we're building the test files for local usage only, it's seems fine to use absolute paths to refer to any asset they build or require.