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

[3.1 -> main] use a temp dir for release-build test as it can leak creation of config.ini in to default location #167

Merged
merged 3 commits into from
Sep 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tests/release-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ echo 'nodeos from source should perform a "release build" which excludes asserts
echo 'debugging symbols, and performs compiler optimizations.'
echo ''

NODEOS_DEBUG=$(programs/nodeos/nodeos --extract-build-info >(python3 -c 'import json,sys; print(str(json.load(sys.stdin)["debug"]).lower());') &> /dev/null)
TDIR=$(mktemp -d || exit 1)
NODEOS_DEBUG=$(programs/nodeos/nodeos --config-dir "${TDIR}" --data-dir "${TDIR}" --extract-build-info >(python3 -c 'import json,sys; print(str(json.load(sys.stdin)["debug"]).lower());') &> /dev/null)
#avoiding an rm -rf out of paranoia, but with the tradeoff this could change somehow in the future
rm "${TDIR}/config.ini" || exit 1
rmdir "${TDIR}" || exit 1
if [[ "${NODEOS_DEBUG}" == 'false' ]]; then
echo 'PASS: Debug flag is not set.'
echo ''
Expand Down