From 9616c89d78c77fb246958e3bc54cd1e363064058 Mon Sep 17 00:00:00 2001 From: John Morris Date: Wed, 10 Jun 2020 13:47:56 +0800 Subject: [PATCH] Fix `halcompile` and `uspace` tests against system install These tests refer to files outside the `tests` directory. To make the tests function disembodied from the source tree and against a system install, add rules to the build to copy the needed files in place, and adjust the tests to work properly. Also, the `personalities_mod` test did something funky: it overwrote standard comps with modified versions, then replaced those when the test finished. This patch undoes that, and instead renames the comps. --- scripts/.gitignore | 1 + src/Makefile | 2 + tests/Submakefile | 37 ++++ tests/halcompile/personalities_mod/.gitignore | 3 + .../personalities_mod/4count_2pers.expected | 196 +++++++++--------- .../personalities_mod/4count_2pers.hal | 6 +- .../personalities_mod/4names_2pers.expected | 196 +++++++++--------- .../personalities_mod/4names_2pers.hal | 6 +- tests/halcompile/personalities_mod/test.sh | 12 +- .../halcompile/serial-out-of-tree/.gitignore | 5 +- .../serial-out-of-tree/mesa_uart.comp | 1 - tests/halcompile/serial-out-of-tree/test.sh | 2 +- tests/halcompile/userspace/.gitignore | 4 +- tests/halcompile/userspace/checkresult | 2 +- tests/halcompile/userspace/test.sh | 3 +- tests/uspace/spawnv-root/.gitignore | 1 + tests/uspace/spawnv-root/test.sh | 2 +- 17 files changed, 258 insertions(+), 221 deletions(-) create mode 100644 tests/Submakefile create mode 100644 tests/halcompile/personalities_mod/.gitignore delete mode 120000 tests/halcompile/serial-out-of-tree/mesa_uart.comp create mode 100644 tests/uspace/spawnv-root/.gitignore diff --git a/scripts/.gitignore b/scripts/.gitignore index 90538aa64dc..3a0e9be6252 100644 --- a/scripts/.gitignore +++ b/scripts/.gitignore @@ -1,4 +1,5 @@ linuxcnc +linuxcnc-checklink linuxcnc-python linuxcnc_info rip-environment diff --git a/src/Makefile b/src/Makefile index 9ca9d1e1a8d..0103339c7d2 100644 --- a/src/Makefile +++ b/src/Makefile @@ -153,6 +153,8 @@ SUBDIRS := \ po \ \ ../docs/src ../docs/src/source-highlight \ + \ + ../tests \ diff --git a/tests/Submakefile b/tests/Submakefile new file mode 100644 index 00000000000..608e64ee9c2 --- /dev/null +++ b/tests/Submakefile @@ -0,0 +1,37 @@ +# Prepare tests to run even when separated from the rest of +# the sources + +userspace: test-inputs + +PERSONALITIES_MOD_COMPS = \ + $(patsubst %,../tests/halcompile/personalities_mod/%_test.comp,\ + lincurve logic bitslice) +$(PERSONALITIES_MOD_COMPS): ../tests/halcompile/personalities_mod/%_test.comp: \ + hal/components/%.comp + $(ECHO) Copying test input $< + $(Q)sed $< -e "1 s/$(*)/$(*)_test/" > $@ + + +../tests/halcompile/serial-out-of-tree/mesa_uart_test.comp: \ + hal/drivers/mesa_uart.comp + sed $< -e "1 s/mesa_uart/mesa_uart_test/" > $@ + +../tests/halcompile/userspace/rand_test.comp: \ + ../docs/src/hal/rand.comp + sed $< -e "1 s/rand/rand_test/" > $@ + +../tests/uspace/spawnv-root/rtapi.conf: ../scripts/rtapi.conf + cp $< $@ + +test-inputs: $(PERSONALITIES_MOD_COMPS) \ + ../tests/halcompile/serial-out-of-tree/mesa_uart_test.comp \ + ../tests/halcompile/userspace/rand_test.comp \ + ../tests/uspace/spawnv-root/rtapi.conf + +clean: test-inputs-clean + +test-inputs-clean: + rm -f $(PERSONALITIES_MOD_COMPS) \ + ../tests/halcompile/serial-out-of-tree/mesa_uart_test.comp \ + ../tests/halcompile/userspace/rand_test.comp \ + ../tests/uspace/spawnv-root/rtapi.conf diff --git a/tests/halcompile/personalities_mod/.gitignore b/tests/halcompile/personalities_mod/.gitignore new file mode 100644 index 00000000000..13057753e84 --- /dev/null +++ b/tests/halcompile/personalities_mod/.gitignore @@ -0,0 +1,3 @@ +bitslice_test.comp +lincurve_test.comp +logic_test.comp diff --git a/tests/halcompile/personalities_mod/4count_2pers.expected b/tests/halcompile/personalities_mod/4count_2pers.expected index 855e044a0d6..01f5bc56498 100644 --- a/tests/halcompile/personalities_mod/4count_2pers.expected +++ b/tests/halcompile/personalities_mod/4count_2pers.expected @@ -1,100 +1,100 @@ -bitslice u32 IN 0 bitslice.0.in -bitslice bit OUT FALSE bitslice.0.out-00 -bitslice bit OUT FALSE bitslice.0.out-01 -bitslice s32 OUT 0 bitslice.0.time -bitslice u32 IN 0 bitslice.1.in -bitslice bit OUT FALSE bitslice.1.out-00 -bitslice bit OUT FALSE bitslice.1.out-01 -bitslice bit OUT FALSE bitslice.1.out-02 -bitslice s32 OUT 0 bitslice.1.time -bitslice u32 IN 0 bitslice.2.in -bitslice bit OUT FALSE bitslice.2.out-00 -bitslice bit OUT FALSE bitslice.2.out-01 -bitslice s32 OUT 0 bitslice.2.time -bitslice u32 IN 0 bitslice.3.in -bitslice bit OUT FALSE bitslice.3.out-00 -bitslice bit OUT FALSE bitslice.3.out-01 -bitslice bit OUT FALSE bitslice.3.out-02 -bitslice s32 OUT 0 bitslice.3.time -lincurve float IN 0 lincurve.0.in -lincurve float OUT 0 lincurve.0.out -lincurve float I/O 0 lincurve.0.out-io -lincurve s32 OUT 0 lincurve.0.time -lincurve float IN 0 lincurve.1.in -lincurve float OUT 0 lincurve.1.out -lincurve float I/O 0 lincurve.1.out-io -lincurve s32 OUT 0 lincurve.1.time -lincurve float IN 0 lincurve.2.in -lincurve float OUT 0 lincurve.2.out -lincurve float I/O 0 lincurve.2.out-io -lincurve s32 OUT 0 lincurve.2.time -lincurve float IN 0 lincurve.3.in -lincurve float OUT 0 lincurve.3.out -lincurve float I/O 0 lincurve.3.out-io -lincurve s32 OUT 0 lincurve.3.time -logic bit OUT FALSE logic.0.and -logic bit IN FALSE logic.0.in-00 -logic bit IN FALSE logic.0.in-01 -logic s32 OUT 0 logic.0.time -logic bit IN FALSE logic.1.in-00 -logic bit IN FALSE logic.1.in-01 -logic bit IN FALSE logic.1.in-02 -logic bit IN FALSE logic.1.in-03 -logic bit OUT FALSE logic.1.or -logic s32 OUT 0 logic.1.time -logic bit OUT FALSE logic.2.and -logic bit IN FALSE logic.2.in-00 -logic bit IN FALSE logic.2.in-01 -logic s32 OUT 0 logic.2.time -logic bit IN FALSE logic.3.in-00 -logic bit IN FALSE logic.3.in-01 -logic bit IN FALSE logic.3.in-02 -logic bit IN FALSE logic.3.in-03 -logic bit OUT FALSE logic.3.or -logic s32 OUT 0 logic.3.time +bitslice_test u32 IN 0 bitslice-test.0.in +bitslice_test bit OUT FALSE bitslice-test.0.out-00 +bitslice_test bit OUT FALSE bitslice-test.0.out-01 +bitslice_test s32 OUT 0 bitslice-test.0.time +bitslice_test u32 IN 0 bitslice-test.1.in +bitslice_test bit OUT FALSE bitslice-test.1.out-00 +bitslice_test bit OUT FALSE bitslice-test.1.out-01 +bitslice_test bit OUT FALSE bitslice-test.1.out-02 +bitslice_test s32 OUT 0 bitslice-test.1.time +bitslice_test u32 IN 0 bitslice-test.2.in +bitslice_test bit OUT FALSE bitslice-test.2.out-00 +bitslice_test bit OUT FALSE bitslice-test.2.out-01 +bitslice_test s32 OUT 0 bitslice-test.2.time +bitslice_test u32 IN 0 bitslice-test.3.in +bitslice_test bit OUT FALSE bitslice-test.3.out-00 +bitslice_test bit OUT FALSE bitslice-test.3.out-01 +bitslice_test bit OUT FALSE bitslice-test.3.out-02 +bitslice_test s32 OUT 0 bitslice-test.3.time +lincurve_test float IN 0 lincurve-test.0.in +lincurve_test float OUT 0 lincurve-test.0.out +lincurve_test float I/O 0 lincurve-test.0.out-io +lincurve_test s32 OUT 0 lincurve-test.0.time +lincurve_test float IN 0 lincurve-test.1.in +lincurve_test float OUT 0 lincurve-test.1.out +lincurve_test float I/O 0 lincurve-test.1.out-io +lincurve_test s32 OUT 0 lincurve-test.1.time +lincurve_test float IN 0 lincurve-test.2.in +lincurve_test float OUT 0 lincurve-test.2.out +lincurve_test float I/O 0 lincurve-test.2.out-io +lincurve_test s32 OUT 0 lincurve-test.2.time +lincurve_test float IN 0 lincurve-test.3.in +lincurve_test float OUT 0 lincurve-test.3.out +lincurve_test float I/O 0 lincurve-test.3.out-io +lincurve_test s32 OUT 0 lincurve-test.3.time +logic_test bit OUT FALSE logic-test.0.and +logic_test bit IN FALSE logic-test.0.in-00 +logic_test bit IN FALSE logic-test.0.in-01 +logic_test s32 OUT 0 logic-test.0.time +logic_test bit IN FALSE logic-test.1.in-00 +logic_test bit IN FALSE logic-test.1.in-01 +logic_test bit IN FALSE logic-test.1.in-02 +logic_test bit IN FALSE logic-test.1.in-03 +logic_test bit OUT FALSE logic-test.1.or +logic_test s32 OUT 0 logic-test.1.time +logic_test bit OUT FALSE logic-test.2.and +logic_test bit IN FALSE logic-test.2.in-00 +logic_test bit IN FALSE logic-test.2.in-01 +logic_test s32 OUT 0 logic-test.2.time +logic_test bit IN FALSE logic-test.3.in-00 +logic_test bit IN FALSE logic-test.3.in-01 +logic_test bit IN FALSE logic-test.3.in-02 +logic_test bit IN FALSE logic-test.3.in-03 +logic_test bit OUT FALSE logic-test.3.or +logic_test s32 OUT 0 logic-test.3.time -bitslice s32 RW 0 bitslice.0.tmax -bitslice bit RO FALSE bitslice.0.tmax-increased -bitslice s32 RW 0 bitslice.1.tmax -bitslice bit RO FALSE bitslice.1.tmax-increased -bitslice s32 RW 0 bitslice.2.tmax -bitslice bit RO FALSE bitslice.2.tmax-increased -bitslice s32 RW 0 bitslice.3.tmax -bitslice bit RO FALSE bitslice.3.tmax-increased -lincurve s32 RW 0 lincurve.0.tmax -lincurve bit RO FALSE lincurve.0.tmax-increased -lincurve float RW 0 lincurve.0.x-val-00 -lincurve float RW 0 lincurve.0.x-val-01 -lincurve float RW 0 lincurve.0.y-val-00 -lincurve float RW 0 lincurve.0.y-val-01 -lincurve s32 RW 0 lincurve.1.tmax -lincurve bit RO FALSE lincurve.1.tmax-increased -lincurve float RW 0 lincurve.1.x-val-00 -lincurve float RW 0 lincurve.1.x-val-01 -lincurve float RW 0 lincurve.1.x-val-02 -lincurve float RW 0 lincurve.1.y-val-00 -lincurve float RW 0 lincurve.1.y-val-01 -lincurve float RW 0 lincurve.1.y-val-02 -lincurve s32 RW 0 lincurve.2.tmax -lincurve bit RO FALSE lincurve.2.tmax-increased -lincurve float RW 0 lincurve.2.x-val-00 -lincurve float RW 0 lincurve.2.x-val-01 -lincurve float RW 0 lincurve.2.y-val-00 -lincurve float RW 0 lincurve.2.y-val-01 -lincurve s32 RW 0 lincurve.3.tmax -lincurve bit RO FALSE lincurve.3.tmax-increased -lincurve float RW 0 lincurve.3.x-val-00 -lincurve float RW 0 lincurve.3.x-val-01 -lincurve float RW 0 lincurve.3.x-val-02 -lincurve float RW 0 lincurve.3.y-val-00 -lincurve float RW 0 lincurve.3.y-val-01 -lincurve float RW 0 lincurve.3.y-val-02 -logic s32 RW 0 logic.0.tmax -logic bit RO FALSE logic.0.tmax-increased -logic s32 RW 0 logic.1.tmax -logic bit RO FALSE logic.1.tmax-increased -logic s32 RW 0 logic.2.tmax -logic bit RO FALSE logic.2.tmax-increased -logic s32 RW 0 logic.3.tmax -logic bit RO FALSE logic.3.tmax-increased +bitslice_test s32 RW 0 bitslice-test.0.tmax +bitslice_test bit RO FALSE bitslice-test.0.tmax-increased +bitslice_test s32 RW 0 bitslice-test.1.tmax +bitslice_test bit RO FALSE bitslice-test.1.tmax-increased +bitslice_test s32 RW 0 bitslice-test.2.tmax +bitslice_test bit RO FALSE bitslice-test.2.tmax-increased +bitslice_test s32 RW 0 bitslice-test.3.tmax +bitslice_test bit RO FALSE bitslice-test.3.tmax-increased +lincurve_test s32 RW 0 lincurve-test.0.tmax +lincurve_test bit RO FALSE lincurve-test.0.tmax-increased +lincurve_test float RW 0 lincurve-test.0.x-val-00 +lincurve_test float RW 0 lincurve-test.0.x-val-01 +lincurve_test float RW 0 lincurve-test.0.y-val-00 +lincurve_test float RW 0 lincurve-test.0.y-val-01 +lincurve_test s32 RW 0 lincurve-test.1.tmax +lincurve_test bit RO FALSE lincurve-test.1.tmax-increased +lincurve_test float RW 0 lincurve-test.1.x-val-00 +lincurve_test float RW 0 lincurve-test.1.x-val-01 +lincurve_test float RW 0 lincurve-test.1.x-val-02 +lincurve_test float RW 0 lincurve-test.1.y-val-00 +lincurve_test float RW 0 lincurve-test.1.y-val-01 +lincurve_test float RW 0 lincurve-test.1.y-val-02 +lincurve_test s32 RW 0 lincurve-test.2.tmax +lincurve_test bit RO FALSE lincurve-test.2.tmax-increased +lincurve_test float RW 0 lincurve-test.2.x-val-00 +lincurve_test float RW 0 lincurve-test.2.x-val-01 +lincurve_test float RW 0 lincurve-test.2.y-val-00 +lincurve_test float RW 0 lincurve-test.2.y-val-01 +lincurve_test s32 RW 0 lincurve-test.3.tmax +lincurve_test bit RO FALSE lincurve-test.3.tmax-increased +lincurve_test float RW 0 lincurve-test.3.x-val-00 +lincurve_test float RW 0 lincurve-test.3.x-val-01 +lincurve_test float RW 0 lincurve-test.3.x-val-02 +lincurve_test float RW 0 lincurve-test.3.y-val-00 +lincurve_test float RW 0 lincurve-test.3.y-val-01 +lincurve_test float RW 0 lincurve-test.3.y-val-02 +logic_test s32 RW 0 logic-test.0.tmax +logic_test bit RO FALSE logic-test.0.tmax-increased +logic_test s32 RW 0 logic-test.1.tmax +logic_test bit RO FALSE logic-test.1.tmax-increased +logic_test s32 RW 0 logic-test.2.tmax +logic_test bit RO FALSE logic-test.2.tmax-increased +logic_test s32 RW 0 logic-test.3.tmax +logic_test bit RO FALSE logic-test.3.tmax-increased diff --git a/tests/halcompile/personalities_mod/4count_2pers.hal b/tests/halcompile/personalities_mod/4count_2pers.hal index db6a81309a0..62a9c178680 100644 --- a/tests/halcompile/personalities_mod/4count_2pers.hal +++ b/tests/halcompile/personalities_mod/4count_2pers.hal @@ -2,9 +2,9 @@ # halcompiled personalities # 4 count, 2 personalities -loadrt logic count=4 personality=0x102,0x204 -loadrt lincurve count=4 personality=2,3 -loadrt bitslice count=4 personality=2,3 +loadrt logic_test count=4 personality=0x102,0x204 +loadrt lincurve_test count=4 personality=2,3 +loadrt bitslice_test count=4 personality=2,3 show pin show parameter diff --git a/tests/halcompile/personalities_mod/4names_2pers.expected b/tests/halcompile/personalities_mod/4names_2pers.expected index 3cb949bafdf..214ddaa56fc 100644 --- a/tests/halcompile/personalities_mod/4names_2pers.expected +++ b/tests/halcompile/personalities_mod/4names_2pers.expected @@ -1,100 +1,100 @@ -bitslice u32 IN 0 bs1.in -bitslice bit OUT FALSE bs1.out-00 -bitslice bit OUT FALSE bs1.out-01 -bitslice s32 OUT 0 bs1.time -bitslice u32 IN 0 bs2.in -bitslice bit OUT FALSE bs2.out-00 -bitslice bit OUT FALSE bs2.out-01 -bitslice bit OUT FALSE bs2.out-02 -bitslice s32 OUT 0 bs2.time -bitslice u32 IN 0 bs3.in -bitslice bit OUT FALSE bs3.out-00 -bitslice bit OUT FALSE bs3.out-01 -bitslice s32 OUT 0 bs3.time -bitslice u32 IN 0 bs4.in -bitslice bit OUT FALSE bs4.out-00 -bitslice bit OUT FALSE bs4.out-01 -bitslice bit OUT FALSE bs4.out-02 -bitslice s32 OUT 0 bs4.time -lincurve float IN 0 lc1.in -lincurve float OUT 0 lc1.out -lincurve float I/O 0 lc1.out-io -lincurve s32 OUT 0 lc1.time -lincurve float IN 0 lc2.in -lincurve float OUT 0 lc2.out -lincurve float I/O 0 lc2.out-io -lincurve s32 OUT 0 lc2.time -lincurve float IN 0 lc3.in -lincurve float OUT 0 lc3.out -lincurve float I/O 0 lc3.out-io -lincurve s32 OUT 0 lc3.time -lincurve float IN 0 lc4.in -lincurve float OUT 0 lc4.out -lincurve float I/O 0 lc4.out-io -lincurve s32 OUT 0 lc4.time -logic bit OUT FALSE lg1.and -logic bit IN FALSE lg1.in-00 -logic bit IN FALSE lg1.in-01 -logic s32 OUT 0 lg1.time -logic bit IN FALSE lg2.in-00 -logic bit IN FALSE lg2.in-01 -logic bit IN FALSE lg2.in-02 -logic bit IN FALSE lg2.in-03 -logic bit OUT FALSE lg2.or -logic s32 OUT 0 lg2.time -logic bit OUT FALSE lg3.and -logic bit IN FALSE lg3.in-00 -logic bit IN FALSE lg3.in-01 -logic s32 OUT 0 lg3.time -logic bit IN FALSE lg4.in-00 -logic bit IN FALSE lg4.in-01 -logic bit IN FALSE lg4.in-02 -logic bit IN FALSE lg4.in-03 -logic bit OUT FALSE lg4.or -logic s32 OUT 0 lg4.time +bitslice_test u32 IN 0 bs1.in +bitslice_test bit OUT FALSE bs1.out-00 +bitslice_test bit OUT FALSE bs1.out-01 +bitslice_test s32 OUT 0 bs1.time +bitslice_test u32 IN 0 bs2.in +bitslice_test bit OUT FALSE bs2.out-00 +bitslice_test bit OUT FALSE bs2.out-01 +bitslice_test bit OUT FALSE bs2.out-02 +bitslice_test s32 OUT 0 bs2.time +bitslice_test u32 IN 0 bs3.in +bitslice_test bit OUT FALSE bs3.out-00 +bitslice_test bit OUT FALSE bs3.out-01 +bitslice_test s32 OUT 0 bs3.time +bitslice_test u32 IN 0 bs4.in +bitslice_test bit OUT FALSE bs4.out-00 +bitslice_test bit OUT FALSE bs4.out-01 +bitslice_test bit OUT FALSE bs4.out-02 +bitslice_test s32 OUT 0 bs4.time +lincurve_test float IN 0 lc1.in +lincurve_test float OUT 0 lc1.out +lincurve_test float I/O 0 lc1.out-io +lincurve_test s32 OUT 0 lc1.time +lincurve_test float IN 0 lc2.in +lincurve_test float OUT 0 lc2.out +lincurve_test float I/O 0 lc2.out-io +lincurve_test s32 OUT 0 lc2.time +lincurve_test float IN 0 lc3.in +lincurve_test float OUT 0 lc3.out +lincurve_test float I/O 0 lc3.out-io +lincurve_test s32 OUT 0 lc3.time +lincurve_test float IN 0 lc4.in +lincurve_test float OUT 0 lc4.out +lincurve_test float I/O 0 lc4.out-io +lincurve_test s32 OUT 0 lc4.time +logic_test bit OUT FALSE lg1.and +logic_test bit IN FALSE lg1.in-00 +logic_test bit IN FALSE lg1.in-01 +logic_test s32 OUT 0 lg1.time +logic_test bit IN FALSE lg2.in-00 +logic_test bit IN FALSE lg2.in-01 +logic_test bit IN FALSE lg2.in-02 +logic_test bit IN FALSE lg2.in-03 +logic_test bit OUT FALSE lg2.or +logic_test s32 OUT 0 lg2.time +logic_test bit OUT FALSE lg3.and +logic_test bit IN FALSE lg3.in-00 +logic_test bit IN FALSE lg3.in-01 +logic_test s32 OUT 0 lg3.time +logic_test bit IN FALSE lg4.in-00 +logic_test bit IN FALSE lg4.in-01 +logic_test bit IN FALSE lg4.in-02 +logic_test bit IN FALSE lg4.in-03 +logic_test bit OUT FALSE lg4.or +logic_test s32 OUT 0 lg4.time -bitslice s32 RW 0 bs1.tmax -bitslice bit RO FALSE bs1.tmax-increased -bitslice s32 RW 0 bs2.tmax -bitslice bit RO FALSE bs2.tmax-increased -bitslice s32 RW 0 bs3.tmax -bitslice bit RO FALSE bs3.tmax-increased -bitslice s32 RW 0 bs4.tmax -bitslice bit RO FALSE bs4.tmax-increased -lincurve s32 RW 0 lc1.tmax -lincurve bit RO FALSE lc1.tmax-increased -lincurve float RW 0 lc1.x-val-00 -lincurve float RW 0 lc1.x-val-01 -lincurve float RW 0 lc1.y-val-00 -lincurve float RW 0 lc1.y-val-01 -lincurve s32 RW 0 lc2.tmax -lincurve bit RO FALSE lc2.tmax-increased -lincurve float RW 0 lc2.x-val-00 -lincurve float RW 0 lc2.x-val-01 -lincurve float RW 0 lc2.x-val-02 -lincurve float RW 0 lc2.y-val-00 -lincurve float RW 0 lc2.y-val-01 -lincurve float RW 0 lc2.y-val-02 -lincurve s32 RW 0 lc3.tmax -lincurve bit RO FALSE lc3.tmax-increased -lincurve float RW 0 lc3.x-val-00 -lincurve float RW 0 lc3.x-val-01 -lincurve float RW 0 lc3.y-val-00 -lincurve float RW 0 lc3.y-val-01 -lincurve s32 RW 0 lc4.tmax -lincurve bit RO FALSE lc4.tmax-increased -lincurve float RW 0 lc4.x-val-00 -lincurve float RW 0 lc4.x-val-01 -lincurve float RW 0 lc4.x-val-02 -lincurve float RW 0 lc4.y-val-00 -lincurve float RW 0 lc4.y-val-01 -lincurve float RW 0 lc4.y-val-02 -logic s32 RW 0 lg1.tmax -logic bit RO FALSE lg1.tmax-increased -logic s32 RW 0 lg2.tmax -logic bit RO FALSE lg2.tmax-increased -logic s32 RW 0 lg3.tmax -logic bit RO FALSE lg3.tmax-increased -logic s32 RW 0 lg4.tmax -logic bit RO FALSE lg4.tmax-increased +bitslice_test s32 RW 0 bs1.tmax +bitslice_test bit RO FALSE bs1.tmax-increased +bitslice_test s32 RW 0 bs2.tmax +bitslice_test bit RO FALSE bs2.tmax-increased +bitslice_test s32 RW 0 bs3.tmax +bitslice_test bit RO FALSE bs3.tmax-increased +bitslice_test s32 RW 0 bs4.tmax +bitslice_test bit RO FALSE bs4.tmax-increased +lincurve_test s32 RW 0 lc1.tmax +lincurve_test bit RO FALSE lc1.tmax-increased +lincurve_test float RW 0 lc1.x-val-00 +lincurve_test float RW 0 lc1.x-val-01 +lincurve_test float RW 0 lc1.y-val-00 +lincurve_test float RW 0 lc1.y-val-01 +lincurve_test s32 RW 0 lc2.tmax +lincurve_test bit RO FALSE lc2.tmax-increased +lincurve_test float RW 0 lc2.x-val-00 +lincurve_test float RW 0 lc2.x-val-01 +lincurve_test float RW 0 lc2.x-val-02 +lincurve_test float RW 0 lc2.y-val-00 +lincurve_test float RW 0 lc2.y-val-01 +lincurve_test float RW 0 lc2.y-val-02 +lincurve_test s32 RW 0 lc3.tmax +lincurve_test bit RO FALSE lc3.tmax-increased +lincurve_test float RW 0 lc3.x-val-00 +lincurve_test float RW 0 lc3.x-val-01 +lincurve_test float RW 0 lc3.y-val-00 +lincurve_test float RW 0 lc3.y-val-01 +lincurve_test s32 RW 0 lc4.tmax +lincurve_test bit RO FALSE lc4.tmax-increased +lincurve_test float RW 0 lc4.x-val-00 +lincurve_test float RW 0 lc4.x-val-01 +lincurve_test float RW 0 lc4.x-val-02 +lincurve_test float RW 0 lc4.y-val-00 +lincurve_test float RW 0 lc4.y-val-01 +lincurve_test float RW 0 lc4.y-val-02 +logic_test s32 RW 0 lg1.tmax +logic_test bit RO FALSE lg1.tmax-increased +logic_test s32 RW 0 lg2.tmax +logic_test bit RO FALSE lg2.tmax-increased +logic_test s32 RW 0 lg3.tmax +logic_test bit RO FALSE lg3.tmax-increased +logic_test s32 RW 0 lg4.tmax +logic_test bit RO FALSE lg4.tmax-increased diff --git a/tests/halcompile/personalities_mod/4names_2pers.hal b/tests/halcompile/personalities_mod/4names_2pers.hal index 42f6eaf1359..f112d75e1c2 100644 --- a/tests/halcompile/personalities_mod/4names_2pers.hal +++ b/tests/halcompile/personalities_mod/4names_2pers.hal @@ -2,9 +2,9 @@ # halcompiled personalities # 4 names, 2 personalities -loadrt logic names=lg1,lg2,lg3,lg4 personality=0x102,0x204 -loadrt lincurve names=lc1,lc2,lc3,lc4 personality=2,3 -loadrt bitslice names=bs1,bs2,bs3,bs4 personality=2,3 +loadrt logic_test names=lg1,lg2,lg3,lg4 personality=0x102,0x204 +loadrt lincurve_test names=lc1,lc2,lc3,lc4 personality=2,3 +loadrt bitslice_test names=bs1,bs2,bs3,bs4 personality=2,3 show pin show parameter diff --git a/tests/halcompile/personalities_mod/test.sh b/tests/halcompile/personalities_mod/test.sh index 6ebc4fc79df..91a6ed4ee9f 100755 --- a/tests/halcompile/personalities_mod/test.sh +++ b/tests/halcompile/personalities_mod/test.sh @@ -1,8 +1,7 @@ #!/bin/sh -DIR=../../../src/hal/components ;# use in-tree components -${SUDO} halcompile --personalities=2 --install $DIR/lincurve.comp -${SUDO} halcompile --personalities=2 --install $DIR/logic.comp -${SUDO} halcompile --personalities=2 --install $DIR/bitslice.comp +${SUDO} halcompile --personalities=2 --install lincurve_test.comp +${SUDO} halcompile --personalities=2 --install logic_test.comp +${SUDO} halcompile --personalities=2 --install bitslice_test.comp for HAL in *.hal; do echo "testing $HAL" @@ -10,8 +9,3 @@ for HAL in *.hal; do # use -s to avoid different user assignments in show output halrun -s $HAL >| $BASE.result done - -# restore using default to avoid interfering with other tests -${SUDO} halcompile --install $DIR/lincurve.comp -${SUDO} halcompile --install $DIR/logic.comp -${SUDO} halcompile --install $DIR/bitslice.comp diff --git a/tests/halcompile/serial-out-of-tree/.gitignore b/tests/halcompile/serial-out-of-tree/.gitignore index c3e2c0c890b..4870b75ba6a 100644 --- a/tests/halcompile/serial-out-of-tree/.gitignore +++ b/tests/halcompile/serial-out-of-tree/.gitignore @@ -1,2 +1,3 @@ -mesa_uart.so -mesa_uart.ko +mesa_uart_test.comp +mesa_uart_test.so +mesa_uart_test.ko diff --git a/tests/halcompile/serial-out-of-tree/mesa_uart.comp b/tests/halcompile/serial-out-of-tree/mesa_uart.comp deleted file mode 120000 index a037f1964d7..00000000000 --- a/tests/halcompile/serial-out-of-tree/mesa_uart.comp +++ /dev/null @@ -1 +0,0 @@ -../../../src/hal/drivers/mesa_uart.comp \ No newline at end of file diff --git a/tests/halcompile/serial-out-of-tree/test.sh b/tests/halcompile/serial-out-of-tree/test.sh index 176f33e4e81..6960220e9b3 100755 --- a/tests/halcompile/serial-out-of-tree/test.sh +++ b/tests/halcompile/serial-out-of-tree/test.sh @@ -1,3 +1,3 @@ #!/bin/bash set -e -halcompile --compile mesa_uart.comp +halcompile --compile mesa_uart_test.comp diff --git a/tests/halcompile/userspace/.gitignore b/tests/halcompile/userspace/.gitignore index 0e740dfbf1a..7b6bc151e54 100644 --- a/tests/halcompile/userspace/.gitignore +++ b/tests/halcompile/userspace/.gitignore @@ -1,2 +1,2 @@ -rand -rand.comp +rand_test +rand_test.comp diff --git a/tests/halcompile/userspace/checkresult b/tests/halcompile/userspace/checkresult index dfa8f42ae84..6936818f423 100755 --- a/tests/halcompile/userspace/checkresult +++ b/tests/halcompile/userspace/checkresult @@ -1,2 +1,2 @@ #!/bin/sh -[ -x $(dirname $1)/rand ] +[ -x $(dirname $1)/rand_test ] diff --git a/tests/halcompile/userspace/test.sh b/tests/halcompile/userspace/test.sh index fa8398a7ebf..6a9704c49f8 100755 --- a/tests/halcompile/userspace/test.sh +++ b/tests/halcompile/userspace/test.sh @@ -1,3 +1,2 @@ #!/bin/sh -cp ../../../docs/src/hal/rand.comp . -halcompile --compile rand.comp +halcompile --compile rand_test.comp diff --git a/tests/uspace/spawnv-root/.gitignore b/tests/uspace/spawnv-root/.gitignore new file mode 100644 index 00000000000..4bef03ca17d --- /dev/null +++ b/tests/uspace/spawnv-root/.gitignore @@ -0,0 +1 @@ +rtapi.conf diff --git a/tests/uspace/spawnv-root/test.sh b/tests/uspace/spawnv-root/test.sh index 44232259e1f..4485af3693c 100644 --- a/tests/uspace/spawnv-root/test.sh +++ b/tests/uspace/spawnv-root/test.sh @@ -2,7 +2,7 @@ set -eo pipefail set -x -. ../../../scripts/rtapi.conf +. ./rtapi.conf if [ "$RTPREFIX" != uspace ]; then echo "test only meaningful on uspace"