diff --git a/artiq/test/gateware/__init__.py b/artiq/gateware/test/__init__.py similarity index 100% rename from artiq/test/gateware/__init__.py rename to artiq/gateware/test/__init__.py diff --git a/artiq/test/gateware/drtio/__init__.py b/artiq/gateware/test/drtio/__init__.py similarity index 100% rename from artiq/test/gateware/drtio/__init__.py rename to artiq/gateware/test/drtio/__init__.py diff --git a/artiq/test/gateware/drtio/test_aux_controller.py b/artiq/gateware/test/drtio/test_aux_controller.py similarity index 100% rename from artiq/test/gateware/drtio/test_aux_controller.py rename to artiq/gateware/test/drtio/test_aux_controller.py diff --git a/artiq/test/gateware/drtio/test_full_stack.py b/artiq/gateware/test/drtio/test_full_stack.py similarity index 100% rename from artiq/test/gateware/drtio/test_full_stack.py rename to artiq/gateware/test/drtio/test_full_stack.py diff --git a/artiq/test/gateware/drtio/test_link_layer.py b/artiq/gateware/test/drtio/test_link_layer.py similarity index 100% rename from artiq/test/gateware/drtio/test_link_layer.py rename to artiq/gateware/test/drtio/test_link_layer.py diff --git a/artiq/test/gateware/drtio/test_rt_packets.py b/artiq/gateware/test/drtio/test_rt_packets.py similarity index 100% rename from artiq/test/gateware/drtio/test_rt_packets.py rename to artiq/gateware/test/drtio/test_rt_packets.py diff --git a/artiq/test/gateware/dsp/__init__.py b/artiq/gateware/test/dsp/__init__.py similarity index 100% rename from artiq/test/gateware/dsp/__init__.py rename to artiq/gateware/test/dsp/__init__.py diff --git a/artiq/test/gateware/dsp/fir.py b/artiq/gateware/test/dsp/fir.py similarity index 100% rename from artiq/test/gateware/dsp/fir.py rename to artiq/gateware/test/dsp/fir.py diff --git a/artiq/test/gateware/dsp/test_accu.py b/artiq/gateware/test/dsp/test_accu.py similarity index 100% rename from artiq/test/gateware/dsp/test_accu.py rename to artiq/gateware/test/dsp/test_accu.py diff --git a/artiq/test/gateware/dsp/test_sawg.py b/artiq/gateware/test/dsp/test_sawg.py similarity index 100% rename from artiq/test/gateware/dsp/test_sawg.py rename to artiq/gateware/test/dsp/test_sawg.py diff --git a/artiq/test/gateware/dsp/test_sawg_fe.py b/artiq/gateware/test/dsp/test_sawg_fe.py similarity index 100% rename from artiq/test/gateware/dsp/test_sawg_fe.py rename to artiq/gateware/test/dsp/test_sawg_fe.py diff --git a/artiq/test/gateware/dsp/test_sawg_phy.py b/artiq/gateware/test/dsp/test_sawg_phy.py similarity index 100% rename from artiq/test/gateware/dsp/test_sawg_phy.py rename to artiq/gateware/test/dsp/test_sawg_phy.py diff --git a/artiq/test/gateware/dsp/test_spline.py b/artiq/gateware/test/dsp/test_spline.py similarity index 100% rename from artiq/test/gateware/dsp/test_spline.py rename to artiq/gateware/test/dsp/test_spline.py diff --git a/artiq/test/gateware/dsp/tools.py b/artiq/gateware/test/dsp/tools.py similarity index 100% rename from artiq/test/gateware/dsp/tools.py rename to artiq/gateware/test/dsp/tools.py diff --git a/artiq/test/gateware/rtio/__init__.py b/artiq/gateware/test/rtio/__init__.py similarity index 100% rename from artiq/test/gateware/rtio/__init__.py rename to artiq/gateware/test/rtio/__init__.py diff --git a/artiq/test/gateware/rtio/test_dma.py b/artiq/gateware/test/rtio/test_dma.py similarity index 100% rename from artiq/test/gateware/rtio/test_dma.py rename to artiq/gateware/test/rtio/test_dma.py