mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-21 06:13:41 +00:00
actually run temperature test + sanity check update
This commit is contained in:
parent
e8482783f7
commit
4725942727
3 changed files with 10 additions and 1 deletions
|
|
@ -5,6 +5,7 @@ testmodules = [
|
|||
'tests.TestConnect',
|
||||
'tests.TestStatusRegisters',
|
||||
'tests.TestMode',
|
||||
'tests.TestTemperature',
|
||||
'tests.TestSync',
|
||||
'tests.TestVNASweep',
|
||||
'tests.TestCalibration',
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ from tests.TestBase import TestBase
|
|||
class TestConnect(TestBase):
|
||||
def test_temperature(self):
|
||||
res = self.vna.query(":DEV:INF:TEMP?")
|
||||
self.assertEqual(res.split("/"), 3)
|
||||
self.assertEqual(len(res.split("/")), 3)
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,15 @@
|
|||
from tests.TestBase import TestBase
|
||||
import time
|
||||
import subprocess
|
||||
|
||||
class TestUpdate(TestBase):
|
||||
def test_Update(self):
|
||||
self.vna.cmd("DEV:UPDATE ../../combined.vnafw", timeout=60)
|
||||
|
||||
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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue