[x] Check unit tests pass
pytest -v -m "not integration and not only_without_driver"
Integration tests (without a signal generator connected)
In tests/configuration.py
Keep the same setup as shown above for the unit tests
But since no trigger signal will be connected to the device, make sure to set INTEGRATION_TEST_TRIGGER_SOURCE = TriggerSource.SPC_MASK_SOFTWARE.
Then:
[x] Check integration tests pass
pytest -v -m "integration and not only_without_driver"
Integration tests (with a signal generator)
Signal generator setup:
The example scripts used by the integration tests configure a sample rate of 40 MHz and acquisition length of 400 samples, generating 10-microsecond long waveforms.
So configure the signal generator to generate sine wave bursts shorter than 10 microseconds, e.g. 5 cycles at 1 MHz (a 5 microsecond burst)
Set the burst repetition rate 10 Hz
Set the sync (trigger) output to a level > 1 V (the example scripts used as integration tests configure the external trigger level to 1V)
Connect signal generator to Netbox:
Connect the signal generator output to channel 8 (i.e. channel 0 of the master card of the Netbox)
Connect the trigger signal to 'Trig In' (EXT_0) on the Netbox
In tests/configuration.py
Keep the same setup as shown above for the unit tests
But set INTEGRATION_TEST_TRIGGER_SOURCE = TriggerSource.SPC_MASK_EXT0.
Then:
[x] Check integration tests pass
pytest -v -m "integration and not only_without_driver"
Run example scripts with the Netbox
Manually run each of the example scripts in the example_scripts directory, with the signal generator set up as for the Integration tests (with a signal generator) above. You will need to temporarily modify the if __name__ == '__main__': of the scripts so that:
Mock mode is disabled
The device IP address is correct
The device number is set to 1 (the index of the master card of the Netbox)
Then:
[x] Verify that the plotted waveforms match the expected data (5 cycles at 1 MHz)
Tests on Spectrum PCIe Digitizer M2p.5961-x4
Unit tests
In tests/configuration.py
Set SINGLE_CARD_TEST_MODE = SpectrumTestMode.REAL_HARDWARE
Set TEST_DEVICE_IP = None
Set TEST_DEVICE_NUMBER = 0
Set NUM_MODULES_PER_CARD = 1
Set NUM_CHANNELS_PER_MODULE = 2
Then:
[x] Check unit tests pass
pytest -v -m "not star_hub and not integration and not only_without_driver"
Integration tests
Using the same configuration as above, and ensuring software triggering is selected in configuration.py:
[x] Check integration tests pass
pytest -v -m "not star_hub and integration and not only_without_driver"
Test plan for testing on lab machine with drivers installed and hardware connected (before release).
Mock mode
pytest -v -m "not integration and not only_without_driver"
pytest -v -m "integration and not only_without_driver"
Tests on Spectrum Digitizer Netbox DN2.593-16
Unit tests
In
tests/configuration.py
SINGLE_CARD_TEST_MODE = SpectrumTestMode.REAL_HARDWARE
STAR_HUB_TEST_MODE = SpectrumTestMode.REAL_HARDWARE
TEST_DEVICE_IP
equal to the device IP address shown in the Spectrum Control CentreTEST_DEVICE_NUMBER = 1
ACQUISITION_LENGTH = 4096
Then:
pytest -v -m "not integration and not only_without_driver"
Integration tests (without a signal generator connected)
In
tests/configuration.py
INTEGRATION_TEST_TRIGGER_SOURCE = TriggerSource.SPC_MASK_SOFTWARE
.Then:
pytest -v -m "integration and not only_without_driver"
Integration tests (with a signal generator)
Signal generator setup:
Connect signal generator to Netbox:
In
tests/configuration.py
INTEGRATION_TEST_TRIGGER_SOURCE = TriggerSource.SPC_MASK_EXT0
.Then:
pytest -v -m "integration and not only_without_driver"
Run example scripts with the Netbox
Manually run each of the example scripts in the
example_scripts
directory, with the signal generator set up as for the Integration tests (with a signal generator) above. You will need to temporarily modify theif __name__ == '__main__':
of the scripts so that:Then:
Tests on Spectrum PCIe Digitizer M2p.5961-x4
Unit tests
In
tests/configuration.py
SINGLE_CARD_TEST_MODE = SpectrumTestMode.REAL_HARDWARE
TEST_DEVICE_IP = None
TEST_DEVICE_NUMBER = 0
NUM_MODULES_PER_CARD = 1
NUM_CHANNELS_PER_MODULE = 2
Then:
pytest -v -m "not star_hub and not integration and not only_without_driver"
Integration tests
Using the same configuration as above, and ensuring software triggering is selected in configuration.py:
pytest -v -m "not star_hub and integration and not only_without_driver"