The build command in the nix develop shell ends up creating an "s2n_head" clone in the main repo. That's annoying because 1) the new folder shows up in "git diff" (although tbf that could be fixed by an update to .gitignore) 2) duplicate results show up in any search not specifically configured to ignore the clone. This is particularly annoying because the folder is created even when running the unit tests, not the integration tests (s2n_head is used by the cross_compatibility integ test).
Test scripts shouldn't be writing build artifacts to our source directory, or even keeping them around at all. Persisting the build artifacts is unnecessary-- all we need are the s2nc_head and s2nd_head executables. $BUILD_DIR is a temporary folder, so we can instead put all the intermediate build artifacts there. Alternatively, if we don't want the build artifacts in a temporary folder, I could put them in the build folder.
We also don't need to build all the tests, just s2nc and s2nd. So I switched to targeted build commands. It's much faster.
Testing:
I kicked off a manual build of the standard integ tests: here
I also kicked off a manual build of the nix integ tests: here. However, I had to manually add the "cross_compatibility" test to the spec, because it looks like the nix integ tests don't include it. I'm not sure if that's intentional or an oversight, but the tests do pass with it added.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Description of changes:
The
build
command in the nix develop shell ends up creating an "s2n_head" clone in the main repo. That's annoying because 1) the new folder shows up in "git diff" (although tbf that could be fixed by an update to .gitignore) 2) duplicate results show up in any search not specifically configured to ignore the clone. This is particularly annoying because the folder is created even when running the unit tests, not the integration tests (s2n_head is used by the cross_compatibility integ test).Test scripts shouldn't be writing build artifacts to our source directory, or even keeping them around at all. Persisting the build artifacts is unnecessary-- all we need are the s2nc_head and s2nd_head executables. $BUILD_DIR is a temporary folder, so we can instead put all the intermediate build artifacts there. Alternatively, if we don't want the build artifacts in a temporary folder, I could put them in the build folder.
We also don't need to build all the tests, just s2nc and s2nd. So I switched to targeted build commands. It's much faster.
Testing:
I kicked off a manual build of the standard integ tests: here I also kicked off a manual build of the nix integ tests: here. However, I had to manually add the "cross_compatibility" test to the spec, because it looks like the nix integ tests don't include it. I'm not sure if that's intentional or an oversight, but the tests do pass with it added.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.