-
Notifications
You must be signed in to change notification settings - Fork 10
Description
Test status should be easily trackable through each of the pavilion setup steps, and sub-steps within running tests. Each test will have a test status file, that contains the current and past states of the test. Within Pavilion, the test status object should provide the functionality to atomically update the test status file.
File format
The test status file shall be a utf-8 document containing a series of status messages, one per line, in the following format:
<timestamp>, <status code>, <status message>\n
- timestamp - UTC timezone, RFC 3339 ns format (36 bytes)
- status code - An up to 20 byte status code.
- status message - An up to 450 byte status message. Longer messages should be truncated.
The length limit on the status message is to ensure that the write fits into the posix PIPE_BUF limit of 512 bytes which ensures our file appends are atomic.
The current status of the test is the last line of the file.
File Naming
The file shall be consistently named pav_test_status.txt.
Status object
The status object should manage status file creation (when necessary), and provide an easy to use interface for updating the status. It need not be aware of the test itself, simply the location where the file should exist.
The list of valid states should reside within the same module.
Scripted status updates
The status will need to be updated by scripts as well as within the pavilion code itself. Pavilion should provide a command to both print and update the current status of a test by test id.