Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Create Release Build Test #7877

Merged
merged 29 commits into from
Sep 12, 2019
Merged

Create Release Build Test #7877

merged 29 commits into from
Sep 12, 2019

Conversation

kj4ezj
Copy link
Contributor

@kj4ezj kj4ezj commented Sep 10, 2019

Change Description

We have no good way of knowing whether a binary was built with compiler optimizations enabled or not. To address this, I created an integration test which fails when the debug flag is set in nodeos.

While the debug flag does not necessarily indicate whether compiler optimizations were used, this flag does correlate for common build types (debug, release, etc).

Notes

  • This variant of the test calls nodeos --extract-build-info, then checks the JSON file it creates to determine if the debug byte is set or not.
    • This is different from how the same test on eos:develop works.
  • Though I can write the test to only fail in a CI environment like Buildkite, it currently fails for local debugging builds as well. I know a lot of members of our community build and install EOSIO for production systems from source, and I wanted this test to be able to catch build-type errors for those users despite any inconvenience to our own developers. This test behavior is open to persuasion from any stakeholders.
  • The test provides useful error messages when test prerequisites are not met, and when the test fails.
  • Base-Image changes:
    • The vim-common package is now installed because it includes xxd, which is required for hex dumps.
      • Though this is not required for this variant of this test (it is required for the other variant), it is useful to have in the base-images for manual debugging or for future tests.
    • The jq package is now installed (from epel-release on CentOS) to parse JSON output from nodeos.
  • This test is not being added to release/1.7.x because there is no easy, programmatic way to check for debug symbols prior to release/1.8.x.

See Also

Consensus Changes

  • Consensus Changes
    None.

API Changes

  • API Changes
    None.

Documentation Additions

  • Documentation Additions
    None.

@heifner
Copy link
Contributor

heifner commented Sep 10, 2019

This information is available via the new --extract-build-info #7864

{
  "debug": false,
  "os": "OS_LINUX",
  "arch": "ARCH_X86_64",
  "boost_version": 107000,
  "compiler": "4.2.1 Compatible Clang 7.0.0 (tags/RELEASE_700/final)"
}

@kj4ezj kj4ezj mentioned this pull request Sep 10, 2019
3 tasks
@kj4ezj kj4ezj marked this pull request as ready for review September 10, 2019 18:13
tests/release-build.sh Outdated Show resolved Hide resolved
tests/release-build.sh Show resolved Hide resolved
tests/release-build.sh Show resolved Hide resolved
@spoonincode
Copy link
Contributor

fwiw -frecord-gcc-switches works really well in clang (not so much gcc). If you really wanted to check it was really made with optimization turned on and/or track other flags.

@kj4ezj
Copy link
Contributor Author

kj4ezj commented Sep 12, 2019

fwiw -frecord-gcc-switches works really well in clang (not so much gcc). If you really wanted to check it was really made with optimization turned on and/or track other flags.

After discussing this test with the others, we have decided we want several of these build environment tests. I will add this check to my notes.

@arhag arhag merged commit d9a366f into develop Sep 12, 2019
@arhag arhag deleted the zach-release-build-test branch September 12, 2019 16:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants