Commit graph

20 commits

Author SHA1 Message Date
Petter Reinholdtsen
eeb1fc0f9f Added runtests option -u to skip test requiring sudo access
This make it easier for non-privileged users to run tests automatically.

The tests requiring sudo are flagged using a mechanism inspired by
the autopkgtest system in Debian, where a control file contain
information about the test.  All tests requiring sudo get a
'sudo' flag in the Restrictions field there.

Also add reporting on number of skipped tests at the end.
2022-07-16 09:43:34 +02:00
John Morris
8dfc261ef3 Fix tests building RT comps against system install
Use `sudo halcompile` to install RT comps.
2020-06-10 13:54:40 +08:00
Dewey Garrett
f56515517e halcompile: more names= items for realtime comps
Users using twopass processing request increased number of
named component instances (typically for simple logic elements
like and2,or2,...).   This commit removes the maximum
limit of 16 for names= items for realtime components.

Notes:
  1) For realtime components (loadrt), the maxium number of
     names= items is not limited by halcompile.
  2) For userspace components (loadusr), the maximum number
     of names= remains fixed at: MAX_USERSPACE_NAMES=16
  3) The maxium number of personalities is by default:
     MAX_PERSONALITIES=16
  4) A command line option can set the maximum number of
     personalities: -P|--personalities
  5) Behavior for count= directives is unchanged.
  6) Current MAX_CMD_LENGTH=1024 in src/hal/halcmd.h may
     need increasing if using many very long names= names.
  7) For normal usage, all names= items (comma-separated)
     must (still) be on a single loadrt line.  Using twopass
     processing allows multiple loadrt lines for the same
     component type.
  8) Formerly, a loadrt directive that specified no count= parameter
     and an empty names= parameter resulted in an error and no
     component was loaded. With this commit, such a directive
     loads a single instance (like and2.0)

Updated tests/:
  a) module-loading/or2/17-names ---- remove, no longer applicable
  b) module-loading/or2/0-names  ---- adapt per Note 8 above
  c) module-loading/pid/17-names ---- no change (pid.c    hardcoded for 16)
  d) module-loading/siggen/17-names - no change (siggen.c hardcoded for 16)
  e) halcompile/personalities_mod --- new tests for personalites that are
                                      modulo the compiled-in personalities
                                      using the --personalities= option
2019-02-08 07:17:50 -07:00
Edward Tomasz Napierala
8033574151 Fix two regression tests to work under FreeBSD.
This adapts them to a different spelling of FreeBSD error messages.

Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2016-06-14 16:01:45 -05:00
Sebastian Kuzminsky
61ff89f2ad Merge branch '2.6' into 2.7
Conflicts:
	tests/module-loading/rtapi-app-main-fails/test.sh (comp/halcompile rename)
2014-12-28 14:09:04 -07:00
Sebastian Kuzminsky
78dc8f14cb rtapi_app_main_fails tests: make it work on rtai too
This makes the test pass on 2.6-sim, 2.6-rtai, 2.7-uspace,
and 2.7-rtai.

Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
2014-12-28 13:57:01 -07:00
Sebastian Kuzminsky
df197a9173 tests: change or2/0-names test to expect failure
In 2.6, an empty string for a name is weird but accepted.  In 2.7 it's
an error.

Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
2014-12-27 23:27:07 -07:00
Sebastian Kuzminsky
1aecae595b Merge remote-tracking branch 'origin/2.6' into 2.7 2014-12-27 23:25:07 -07:00
Sebastian Kuzminsky
135ea0610d tests: loadrt must handle failure from rtapi_app_main
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
2014-12-27 22:08:49 -07:00
Sebastian Kuzminsky
4eb90d2ff4 tests: test names=(empty string) of comp-generated components
This is currently accepted, and results in a single component with no
name.  HAL objects like pins and functions get names like ".pin-name"
and ".func", which seems kind of bogus.

This is probably a bug, but we shouldn't change it in 2.6.  We should
probably change 2.7 to reject this.

Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
2014-12-21 13:19:26 -07:00
Sebastian Kuzminsky
812d14f382 tests: test names=(16 values) of comp-generated components
This currently fails because of a bug in comp.

Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
2014-12-21 13:19:26 -07:00
Sebastian Kuzminsky
f2ba1eac4a tests: test some valid counts= of comp-generated components
There is no upper limit on counts= like there is on names=.  This tests
counts=1, =16, and =17, they're all accepted.

Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
2014-12-21 13:19:20 -07:00
Sebastian Kuzminsky
5072caab36 tests: test names=(17 values) of comp-generated components
This should be rejected (16 names is the max), and it is.  The component
fails to load.

Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
2014-12-21 13:18:52 -07:00
Sebastian Kuzminsky
ec106c695e tests: test names=(1 value) of comp-generated components
This tests one "names=" argument.  This works.

Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
2014-12-21 13:18:49 -07:00
Sebastian Kuzminsky
d17602ed2b add a test of sim-encoder module loading
This is like the recent encoder and pid module loading tests.  Load the
module with different args and make sure they get parsed correctly.
2012-12-14 23:12:08 -07:00
Sebastian Kuzminsky
2b735ad543 add a test of encoder-ratio module loading
This is like the recent encoder and pid module loading tests.  Load the
module with different args and make sure they get parsed correctly.
2012-12-14 23:12:07 -07:00
Sebastian Kuzminsky
f86c560877 add a test of siggen module loading
This is like the recent encoder and pid module loading tests.  Load the
module with different args and make sure they get parsed correctly.
2012-12-14 23:08:27 -07:00
Sebastian Kuzminsky
53a980c765 add a test of pid module loading
This is like the recent encoder module loading test.  Load the module
with different args and make sure they get parsed correctly.
2012-12-14 23:08:27 -07:00
Sebastian Kuzminsky
94b2fc210b remove some redundancy in encoder test
Each test case in this suite used to have its own copy of the pin
name regex, but it's enough to have one for 'names' loads and one for
'num_chan' loads.
2012-12-14 23:08:27 -07:00
Sebastian Kuzminsky
94c8a868db reorg module loading test to make room for more modules 2012-12-14 23:08:27 -07:00