2024-04-22 15:23:35 +02:00
|
|
|
from tests.TestBase import TestBase
|
|
|
|
|
import time
|
2024-12-15 18:11:25 +01:00
|
|
|
import subprocess
|
2024-04-22 15:23:35 +02:00
|
|
|
|
|
|
|
|
class TestUpdate(TestBase):
|
|
|
|
|
def test_Update(self):
|
|
|
|
|
self.vna.cmd("DEV:UPDATE ../../combined.vnafw", timeout=60)
|
|
|
|
|
|
2024-12-15 18:11:25 +01:00
|
|
|
reported = self.vna.query("DEV:INF:FWREVISION?")
|
|
|
|
|
major = subprocess.check_output("grep -oP '(?<=FW_MAJOR=)[0-9]+' ../VNA_embedded/Makefile", shell=True).strip()
|
|
|
|
|
minor = subprocess.check_output("grep -oP '(?<=FW_MINOR=)[0-9]+' ../VNA_embedded/Makefile", shell=True).strip()
|
|
|
|
|
patch = subprocess.check_output("grep -oP '(?<=FW_PATCH=)[0-9]+' ../VNA_embedded/Makefile", shell=True).strip()
|
|
|
|
|
expected = major.decode("utf-8") + "." + minor.decode("utf-8") + "." + patch.decode("utf-8")
|
|
|
|
|
self.assertEqual(reported, expected)
|
|
|
|
|
|