Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs/ioc: expand Integration tests tutorial #134

Merged
merged 8 commits into from
Aug 2, 2024
6 changes: 6 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@
},
}

# -- Options for Sphinx Copybutton -------------------------------------------
# https://sphinx-copybutton.readthedocs.io/en/latest/use.html

# Exclude copying line numbers, prompts, and prompt outputs
copybutton_exclude = ".linenos, .gp, .go"

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

Expand Down
14 changes: 7 additions & 7 deletions docs/ioc/tutorials/streamdevice.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ change yours like so:

# Add one of the supported modules here:
# ---
- #support.modules = with pkgs.epnix.support; [ StreamDevice ];
- #support.modules = with pkgs.epnix.support; [ StreamDevice mySupportModule ];
+ support.modules = with pkgs.epnix.support; [ StreamDevice ];

Then,
Expand Down Expand Up @@ -147,11 +147,11 @@ and what to expect in return.
Terminator = LF;

getVoltage {
out ":VOLT?"; in "%f";
out ":volt?"; in "%f";
minijackson marked this conversation as resolved.
Show resolved Hide resolved
}

setVoltage {
out ":VOLT %f";
out ":volt %f";
@init { getVoltage; }
}

Expand Down Expand Up @@ -207,7 +207,7 @@ and how to connect to the remote power supply.
# Where to find the protocol files
epicsEnvSet("STREAM_PROTOCOL_PATH", "${TOP}/db")
# The TCP/IP address of the power supply
drvAsynIPPortConfigure("PS1", "localhost:8727")
drvAsynIPPortConfigure("PS1", "localhost:9999")

## Load record instances
dbLoadRecords("${TOP}/db/example.db", "PREFIX=, PORT=PS1")
Expand Down Expand Up @@ -252,7 +252,7 @@ Then, run:

./st.cmd

You should see the IOC starting and connecting to ``localhost:8727``.
You should see the IOC starting and connecting to ``localhost:9999``.

Recompiling with make
---------------------
Expand All @@ -274,9 +274,9 @@ and open a direct connection to the simulator:

.. code-block:: bash

nc localhost 8727
nc localhost 9999
# or
telnet localhost 8727
telnet localhost 9999

You can install the ``nc`` command through the ``netcat`` package,
or you can install the ``telnet`` command through the ``telnet`` package,
Expand Down
4 changes: 2 additions & 2 deletions templates/top/checks/simple.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ pkgs.nixosTest {
machine.wait_for_unit("default.target")
machine.wait_for_unit("ioc.service")

machine.wait_until_succeeds("caget stringin")
machine.wait_until_succeeds("caget stringout")
machine.wait_until_succeeds("caget stringin", timeout=10)
machine.wait_until_succeeds("caget stringout", timeout=10)
machine.fail("caget non-existing")

with subtest("testing stringout"):
Expand Down