Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/artiq
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ca8a075f462b^
Choose a base ref
...
head repository: m-labs/artiq
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 89f68f34706d
Choose a head ref
  • 3 commits
  • 26 files changed
  • 1 contributor

Commits on Feb 2, 2016

  1. Copy the full SHA
    ca8a075 View commit details
  2. Copy the full SHA
    9ca8b48 View commit details
  3. style

    sbourdeauducq committed Feb 2, 2016
    Copy the full SHA
    89f68f3 View commit details
2 changes: 1 addition & 1 deletion artiq/compiler/testbench/jit.py
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
from ..targets import NativeTarget

def main():
libartiq_support = os.getenv('LIBARTIQ_SUPPORT')
libartiq_support = os.getenv("LIBARTIQ_SUPPORT")
if libartiq_support is not None:
llvm.load_library_permanently(libartiq_support)

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
35 changes: 0 additions & 35 deletions artiq/test/harness.py

This file was deleted.

42 changes: 21 additions & 21 deletions artiq/test/lit/lit.cfg
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
# -*- python -*-

import os, subprocess
import os
import sys
import subprocess
import lit.util
import lit.formats

root = os.path.join(os.path.dirname(__file__), '..')
root = os.path.join(os.path.dirname(__file__), "..")

config.name = 'ARTIQ'
config.name = "ARTIQ"
config.test_format = lit.formats.ShTest()
config.suffixes = ['.py']
config.suffixes = [".py"]

python_executable = 'python3.5'

harness = os.path.join(root, 'harness.py')
if os.getenv('COVERAGE'):
harness = 'coverage run --parallel-mode --source=artiq {}'.format(harness)
config.environment['COVERAGE_FILE'] = os.path.join(root, '..', '.coverage')
config.substitutions.append( ('%python', harness) )
if os.getenv("COVERAGE"):
config.environment["COVERAGE_FILE"] = os.path.join(root, "..", ".coverage")
python = "coverage run --parallel-mode --source=artiq"
else:
harness = '{} {}'.format(python_executable, harness)
config.substitutions.append( ('%python', harness) )
python = sys.executable
config.substitutions.append( ("%python", python) )

config.environment["PYTHONPATH"] = os.getenv("PYTHONPATH")

not_ = '{} {}'.format(python_executable, os.path.join(root, 'not.py'))
config.substitutions.append( ('%not', not_) )
not_ = "{} {}".format(sys.executable, os.path.join(root, "not.py"))
config.substitutions.append( ("%not", not_) )

if os.name == 'posix':
support_build = os.path.join(root, 'libartiq_support')
if subprocess.call(['make', '-sC', support_build]) != 0:
if os.name == "posix":
support_build = os.path.join(root, "libartiq_support")
if subprocess.call(["make", "-sC", support_build]) != 0:
lit_config.fatal("Unable to build JIT support library")

support_lib = os.path.join(support_build, 'libartiq_support.so')
config.environment['LIBARTIQ_SUPPORT'] = support_lib
support_lib = os.path.join(support_build, "libartiq_support.so")
config.environment["LIBARTIQ_SUPPORT"] = support_lib

config.available_features.add('exceptions')
config.available_features.add("exceptions")
File renamed without changes.
6 changes: 4 additions & 2 deletions artiq/test/ctlmgr.py → artiq/test/test_ctlmgr.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import sys
import unittest
import logging
import asyncio
@@ -55,12 +56,13 @@ async def wait_for_ping(self, host, port, retries=5, timeout=2):
raise asyncio.TimeoutError

def test_start_ping_stop_controller(self):
command = sys.executable + " -m "
entry = {
"type": "controller",
"host": "::1",
"port": 3253,
"command": "lda_controller -p {port} --bind {bind} "
"--no-localhost-bind --simulation",
"command": sys.executable + " -m artiq.frontend.lda_controller "
"-p {port} --simulation"
}
async def test():
await self.start("lda_sim", entry)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions doc/manual/faq.rst
Original file line number Diff line number Diff line change
@@ -86,3 +86,8 @@ URL: it allows to select the serial device by its USB vendor ID, product
ID and/or serial number. Those never change, unlike the device file name.

See the :ref:`TDC001 documentation <tdc001-controller-usage-example>` for an example of ``hwgrep://`` usage.

run unit tests?
---------------

The unit tests assume that the Python environment has been set up in such a way that ``import artiq`` will import the code being tested, and that this is still true for any subprocess created. This is not the way setuptools operates as it adds the path to ARTIQ to ``sys.path`` which is not passed to subprocesses; as a result, running the tests via ``setup.py`` is not supported. The user must first install the package or set ``PYTHONPATH``, and then run the tests with e.g. ``python3.5 -m unittest discover`` in the ``artiq/test`` folder and ``lit .`` in the ``artiq/test/lit`` folder.
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -57,7 +57,6 @@
],
packages=find_packages(),
namespace_packages=[],
test_suite="artiq.test",
include_package_data=True,
ext_modules=[],
entry_points={