"1. Rename the notebook to the name of the test,\n",
"1. Update the title at the top of this section,\n",
"1. Fill in the sections with empty blocks with code and text,\n",
"1. Execute the provided initialisation code,\n",
"1. Run the tests,\n",
"1. *Rerun everything top to bottom to make sure the notebook is correct*,\n",
"1. Fill in the results & verdict.\n",
"1. Export the Jupyter Notebook to PDF and upload the file to the Polarion test results page.\n",
"1. ...and you're done!"
]
},
{
"cell_type": "markdown",
"id": "63785004",
"metadata": {},
"source": [
"## Author\n",
"Descibe who ran this test, and who helped (if applicable):"
]
},
{
"cell_type": "markdown",
"id": "3c720d4b",
"metadata": {},
"source": [
"(your name)"
]
},
{
"cell_type": "markdown",
"id": "ff837bcb",
"metadata": {},
"source": [
"## Timestamp\n",
"\n",
"This test was executed at:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "00418ee4",
"metadata": {},
"outputs": [],
"source": [
"# Run this code\n",
"import datetime\n",
"print(f\"Test was executed at {datetime.datetime.isoformat(datetime.datetime.now(), ' ')}\")"
]
},
{
"cell_type": "markdown",
"id": "0b4a59a5",
"metadata": {},
"source": [
"## Purpose\n",
"\n",
"Describe the purpose and context of this notebook, possibly including any links to external references, e.g. the Polarion reference number:"
]
},
{
"cell_type": "markdown",
"id": "09d4d0a1",
"metadata": {},
"source": [
"(purpose)"
]
},
{
"cell_type": "markdown",
"id": "4c6489f3",
"metadata": {},
"source": [
"## Methodology\n",
"\n",
"Provide a summary of how we are going to prove compliance:"
]
},
{
"cell_type": "markdown",
"id": "ceae21d4",
"metadata": {},
"source": [
"(methodology)"
]
},
{
"cell_type": "markdown",
"id": "9033f262",
"metadata": {},
"source": [
"## Initialisation\n",
"\n",
"The following sections contain boilerplate code to get the station to a well-defined state. If this is not applicable or broken, just note that here:"
]
},
{
"cell_type": "markdown",
"id": "00d4e336",
"metadata": {},
"source": []
},
{
"cell_type": "markdown",
"id": "7532d05e",
"metadata": {},
"source": [
"### Hot reboot\n",
"\n",
"Makes sure the software and hardware are all in a known state."
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "c7a3effa",
"metadata": {},
"outputs": [],
"source": [
"# Restart boot device\n",
"boot.off()\n",
"boot.initialise()\n",
"boot.on()"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "b4dd21b1",
"metadata": {},
"outputs": [],
"source": [
"# Reboot the station\n",
"boot.boot()"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "78a4db84",
"metadata": {},
"outputs": [],
"source": [
"# Wait for reboot to complete\n",
"import time\n",
"while boot.booting_R:\n",
" time.sleep(2)\n",
" print(f\"Initialisation at {boot.progress_R}%: {boot.status_R}\")\n",
" \n",
"assert boot.progress_R == 100, f\"Failed to fully initialise station: {boot.status_R}\"\n",
"if boot.uninitialised_devices_R:\n",
" print(f\"Warning! Did not initialise {boot.uninitialised_devices_R}. This might be inconsequential for this test.\")"
]
},
{
"cell_type": "markdown",
"id": "9bc072af",
"metadata": {},
"source": [
"### Active versions\n",
"\n",
"List the versions currently running on the station."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "35b815d4",
"metadata": {},
"outputs": [],
"source": [
"def summarise(l: list) -> list:\n",
" return [f\"{idx}: {version}\" for idx,version in enumerate(l) if version] or [\"no versions reported\"]\n",
"\n",
"versions = {\n",
" \"SC\": {dev.name():dev.version_R for dev in devices},\n",