Page MenuHomeFreeBSD

tests/ci: Collect environment information
ClosedPublic

Authored by bofh on Tue, Dec 16, 9:29 AM.
Tags
None
Referenced Files
F140005411: D54247.diff
Thu, Dec 18, 10:21 PM
F140003237: D54247.diff
Thu, Dec 18, 9:38 PM
F139960595: D54247.diff
Thu, Dec 18, 10:29 AM
F139958248: D54247.id168230.diff
Thu, Dec 18, 9:57 AM
F139939702: D54247.id168230.diff
Thu, Dec 18, 5:32 AM
F139926851: D54247.id168177.diff
Thu, Dec 18, 2:19 AM
F139923395: D54247.id168248.diff
Thu, Dec 18, 1:28 AM
Unknown Object (File)
Wed, Dec 17, 11:15 PM
Subscribers

Details

Summary

For reproducing errors or test results it is important to gather
environment information. These environments are divided into two parts.
One part is in which environment the artifacts were built into and the
second part is in which environment the tests were run.

This patch collects thesee information and saves into a .env file in
the metadir. After this patch lands we will also need to change our
jenkins job where we are uploading the artifact to a central location.
This environment file should also be stored along with the artifact.
For easier location the image basename and the environment basename are
kept same.

Test Plan

# make -C tests/ci ci-get-env gives a small glimpse of what are collected from the host system

After the end of make ci there will be an additional file ending with an extension .env which will also include the output of env from inside the vm.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bofh requested review of this revision.Tue, Dec 16, 9:29 AM
bofh added reviewers: lwhsu, emaste, markj, jrm, olivier.

There is no tar cvf ${tardev} -C ${metadir} . part in the "$freebsdci_type" = "smoke" path, will that be a problem?

There is no tar cvf ${tardev} -C ${metadir} . part in the "$freebsdci_type" = "smoke" path, will that be a problem?

Other than this I think this is fine. I would prefer separating the logic of handling meta file/device to other routines, but that can be done later.

There is no tar cvf ${tardev} -C ${metadir} . part in the "$freebsdci_type" = "smoke" path, will that be a problem?

Other than this I think this is fine. I would prefer separating the logic of handling meta file/device to other routines, but that can be done later.

To be frank I don't even see the point on getting the output of env for the smoke test as no applications are actually running. So I will most probably remove the set_environment routine from the "smoke" test.

Address the issue brought by @lshsu. Get env output in CI for smoke tests too.

There is no tar cvf ${tardev} -C ${metadir} . part in the "$freebsdci_type" = "smoke" path, will that be a problem?

For clarity and uniformity I have added it for both the cases.

This revision is now accepted and ready to land.Wed, Dec 17, 3:45 AM
This revision was automatically updated to reflect the committed changes.