mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 19:28:26 +08:00
Merge branch 'master' into nac3
This commit is contained in:
commit
42e42df43f
3
.gitignore
vendored
3
.gitignore
vendored
@ -28,6 +28,7 @@ __pycache__/
|
|||||||
/repository/
|
/repository/
|
||||||
/results
|
/results
|
||||||
/last_rid.pyon
|
/last_rid.pyon
|
||||||
/dataset_db.pyon
|
/dataset_db.mdb
|
||||||
|
/dataset_db.mdb-lock
|
||||||
/device_db*.py
|
/device_db*.py
|
||||||
/test*
|
/test*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
def get_version():
|
def get_version():
|
||||||
return os.getenv("VERSIONEER_OVERRIDE", default="8.0.beta")
|
return os.getenv("VERSIONEER_OVERRIDE", default="8.0+unknown.beta")
|
||||||
|
@ -5,6 +5,7 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
import unittest
|
import unittest
|
||||||
import logging
|
import logging
|
||||||
|
from tempfile import TemporaryDirectory
|
||||||
|
|
||||||
from nac3artiq import CompileError
|
from nac3artiq import CompileError
|
||||||
|
|
||||||
@ -20,9 +21,10 @@ logger = logging.getLogger(__name__)
|
|||||||
@unittest.skipUnless(artiq_root, "no ARTIQ_ROOT")
|
@unittest.skipUnless(artiq_root, "no ARTIQ_ROOT")
|
||||||
class ExperimentCase(unittest.TestCase):
|
class ExperimentCase(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
self.tempdir = TemporaryDirectory(prefix="artiq_hw_test")
|
||||||
self.device_db = DeviceDB(os.path.join(artiq_root, "device_db.py"))
|
self.device_db = DeviceDB(os.path.join(artiq_root, "device_db.py"))
|
||||||
self.dataset_db = DatasetDB(
|
self.dataset_db = DatasetDB(
|
||||||
os.path.join(artiq_root, "dataset_db.mdb"))
|
os.path.join(self.tempdir.name, "dataset_db.mdb"))
|
||||||
self.device_mgr = DeviceManager(
|
self.device_mgr = DeviceManager(
|
||||||
self.device_db, virtual_devices={"scheduler": DummyScheduler()})
|
self.device_db, virtual_devices={"scheduler": DummyScheduler()})
|
||||||
self.dataset_mgr = DatasetManager(self.dataset_db)
|
self.dataset_mgr = DatasetManager(self.dataset_db)
|
||||||
@ -30,6 +32,7 @@ class ExperimentCase(unittest.TestCase):
|
|||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
self.device_mgr.close_devices()
|
self.device_mgr.close_devices()
|
||||||
self.dataset_db.close_db()
|
self.dataset_db.close_db()
|
||||||
|
self.tempdir.cleanup()
|
||||||
|
|
||||||
def create(self, cls, *args, **kwargs):
|
def create(self, cls, *args, **kwargs):
|
||||||
try:
|
try:
|
||||||
|
@ -29,8 +29,8 @@ def get_env():
|
|||||||
|
|
||||||
class TestClient(unittest.TestCase):
|
class TestClient(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.tmp_dir = TemporaryDirectory(prefix="test")
|
self.tmp_dir = TemporaryDirectory(prefix="artiq_client_test")
|
||||||
self.tmp_empty_dir = TemporaryDirectory(prefix="empty_repo")
|
self.tmp_empty_dir = TemporaryDirectory(prefix="artiq_empty_repo")
|
||||||
self.exp_name = "experiment.py"
|
self.exp_name = "experiment.py"
|
||||||
self.exp_path = os.path.join(self.tmp_dir.name, self.exp_name)
|
self.exp_path = os.path.join(self.tmp_dir.name, self.exp_name)
|
||||||
self.device_db_path = os.path.join(self.tmp_dir.name, "device_db.py")
|
self.device_db_path = os.path.join(self.tmp_dir.name, "device_db.py")
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
artiqVersionMajor = 9;
|
artiqVersionMajor = 9;
|
||||||
artiqVersionMinor = self.sourceInfo.revCount or 0;
|
artiqVersionMinor = self.sourceInfo.revCount or 0;
|
||||||
artiqVersionId = self.sourceInfo.shortRev or "unknown";
|
artiqVersionId = self.sourceInfo.shortRev or "unknown";
|
||||||
artiqVersion = (builtins.toString artiqVersionMajor) + "." + (builtins.toString artiqVersionMinor) + "." + artiqVersionId + ".beta";
|
artiqVersion = (builtins.toString artiqVersionMajor) + "." + (builtins.toString artiqVersionMinor) + "+" + artiqVersionId + ".beta";
|
||||||
artiqRev = self.sourceInfo.rev or "unknown";
|
artiqRev = self.sourceInfo.rev or "unknown";
|
||||||
|
|
||||||
rustManifest = pkgs.fetchurl {
|
rustManifest = pkgs.fetchurl {
|
||||||
|
@ -11,7 +11,7 @@ def get_rev():
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def get_version():
|
def get_version():
|
||||||
return os.getenv("VERSIONEER_OVERRIDE", default="9.0.beta")
|
return os.getenv("VERSIONEER_OVERRIDE", default="9.0+unknown.beta")
|
||||||
|
|
||||||
def get_rev():
|
def get_rev():
|
||||||
return os.getenv("VERSIONEER_REV", default="unknown")
|
return os.getenv("VERSIONEER_REV", default="unknown")
|
||||||
|
Loading…
Reference in New Issue
Block a user