Commit Graph

10219 Commits

Author SHA1 Message Date
Andrew Johnson
9fe5ce82d3 Merged the db-test branch.
Also made additional changes:
* Simplified xRecord.c so it can run on vxWorks.
* Standard way to load DBD and DB files in tests

All test harnesses now run on vxWorks (but some tests still fail).
2012-07-02 11:03:55 -05:00
Andrew Johnson
da9982f875 libCom: Fix unsigned overflow limits in epicsParse*
The strtoul() routine accepts negative numbers.  This fix
ensures we handle them properly, and adds suitable tests.

Also fix the test for 1e300, in case the compiler gives a
slightly different literal constant than strtod() returns.
2012-06-30 15:34:29 -05:00
Michael Davidsaver
7d51031d60 RTEMS test harness show run directory 2012-06-29 17:02:25 -04:00
Michael Davidsaver
788d5a1ca1 minor 2012-06-29 17:02:25 -04:00
Michael Davidsaver
d6bda6fb3a arrTest cleanup on exit
Do test db cleanup after hooks registered by iocInit
2012-06-29 17:02:25 -04:00
Michael Davidsaver
b5c223f462 fix tsTest 2012-06-29 17:02:24 -04:00
Michael Davidsaver
f5bad40474 sync needs to free held events
The sync plugin may hold an update internally.
If this is done then it must be free'd when
the dbChannel is closed.
2012-06-29 17:02:24 -04:00
Michael Davidsaver
60b684a4dc update dbndTest 2012-06-29 17:02:24 -04:00
Michael Davidsaver
d2b0e92001 db_close_events cleanup
Move cleanup from event thread to caller.
This handles cases (unit tests) where the task
is never started.

The pexitsem flag serves as the indicatior that
the event task was started.
2012-06-29 17:02:23 -04:00
Michael Davidsaver
46fb21c880 dbnd must free dropped events 2012-06-29 17:02:22 -04:00
Michael Davidsaver
a103a2434a dbEvent don't queue dropped events 2012-06-29 17:02:22 -04:00
Michael Davidsaver
e6ae903f2c notes on db_field_log usage 2012-06-29 17:02:22 -04:00
Michael Davidsaver
aa17f317f8 define more of probe field log
plugins don't need to inspect more than
field_type, field_size, and no_elements.
In case they do define type=val to prevent
accidental use of uninitialized pointer.
2012-06-29 17:02:20 -04:00
Andrew Johnson
fb61234431 Change the epicsParse APIs to return a units pointer.
This lets us use epicsParseDouble() for scan rate parsing.

Ensure the scanOnce thread is a higher priority than the fastest
periodic scan thread, irrespective of how many threads there are.
2012-06-29 14:41:35 -05:00
Andrew Johnson
bde52418b9 Various fixes for vxWorks
Provide a separate dbd file for each test.
Don't require a writable filesystem.
Simplfy xRecord.c again.
2012-06-29 10:09:56 -05:00
Michael Davidsaver
2fd6004827 forgot to remove TODO 2012-06-28 13:57:24 -04:00
Michael Davidsaver
4986c184c7 cleanup for dbRegisterFilter() 2012-06-28 13:44:33 -04:00
Michael Davidsaver
683093222a integer type should be epicsInt32
Can't use long for this on 64-bit systems
2012-06-28 10:55:49 -04:00
Michael Davidsaver
61b285a5e3 booleans are stored as char not int 2012-06-28 10:55:48 -04:00
Michael Davidsaver
4a393a428d fix examples in chfPlugin.h 2012-06-28 10:55:47 -04:00
Michael Davidsaver
8eedb09395 chfPluginTest: more verbose error messages 2012-06-28 10:55:47 -04:00
Michael Davidsaver
4a6216534c rtems test harness setup to create temp files
Apparently the default location for tmp files
doesn't exist in the default IMFS tree.
2012-06-28 10:55:46 -04:00
Michael Davidsaver
39ccbeeb11 Make db unit tests self contained 2012-06-28 10:55:46 -04:00
Michael Davidsaver
026307c06d db cleanup
cleanup to allow database re-load
2012-06-28 10:55:44 -04:00
Andrew Johnson
4eb31d7edc Fix dbScan bug, add scan period units and checking. 2012-06-27 16:43:15 -05:00
Andrew Johnson
05f07d9ec8 tools/DBD: Improve error reporting
Better 'duplicate choice' message
Output messages to STDERR
2012-06-27 11:58:23 -05:00
Andrew Johnson
6595ff9518 Clean up some compiler warnings from gcc 4.6 2012-06-26 00:19:10 -05:00
Andrew Johnson
0dc67498ed libCom: Mark epicsStrtod() as extern "C" 2012-06-25 10:39:47 -05:00
Andrew Johnson
44a70cca5a merged server-side-plugins branch 2012-06-22 18:16:26 -05:00
Andrew Johnson
ddc675adc1 merged record-updates branch 2012-06-22 17:58:12 -05:00
Andrew Johnson
42ebafd6ae merged msi-join branch 2012-06-22 17:53:33 -05:00
Andrew Johnson
fb6dfe6210 merged remove-hpux-artifacts branch 2012-06-22 17:32:10 -05:00
Andrew Johnson
269fb01c63 libCom: Add routines for parsing strings into epicsTypes
Adds new routines for converting numeric strings into the
standard epicsInt8, epicsUInt8, epicsInt16, epicsUInt16,
epicsInt32 and epicsUInt32 types, along with Long, ULong,
Double and Float.  These all provide error checking and
detection of extraneous characters.  The epicsScanDouble
and epicsScanFloat routines originally in epicsStdlib.h
are replaced by macros that call the epicsParse routine,
and this also provides epicsScanLong and epicsScanULong
to match.

A test file is added to ensure conversions work properly
and report appropriate errors.  This file also checks the
native strtod() routine if not used to check whether the
epicsStrtod() code is required on this platform.
2012-06-22 14:06:52 -05:00
Andrew Johnson
7cae5ebd7b Fixes for build issues found on Darwin. 2012-06-21 17:58:07 -05:00
Andrew Johnson
e1e8f56d27 Moved filter plugins, fixed portability issues.
The filter plugins are now in src/std/filters
and their tests in the test subdirectory.

Various portability issues found and fixed:
 * Variable declarations after statements in a block
 * Code assuming that epicsInt32 = long
 * // comments in C files

Removed a number of tests that weren't really tests;
preconditions for future tests that don't actually check
the code being tested should call testAbort() if the
condition fails, which tells the test harness that you
meant to die at that point.

Split up lots of very long source lines.

Probably made a few other changes that I forget about now.
2012-06-21 15:27:32 -05:00
Andrew Johnson
84a8bacc58 Re-merged the dontcant branch.
Michael backed out a few changes and added some others.
I added some modifications to default/osdMessageQueue.cpp to
remove arguments from a couple of internal (static) functions.
2012-06-19 14:28:26 -05:00
Andrew Johnson
bd53941ac4 Cleanup of mbbi, mbbo record code.
Mostly just layout changes, removing unnecessary casts, and
replacing 'unsigned short' with epicsEnum16 types.
The only significant code change is in the alarm filtering
code of the mbbi record, which wasn't handling UDF alarms
or unknown state alarms quite right.
2012-06-18 12:13:14 -05:00
Andrew Johnson
c708bb1bac epicsTypes: Added epicsInt64 and epicsUInt64
With size checks for them in epicsTypesTest.
Also added static checks of type sizes there, since we can.
2012-06-08 16:28:31 -05:00
Andrew Johnson
24e2452bd4 libCom/test: epicsAtomic tests
Added C++ template instances, so this code loads on
a vxWorks 5.5.2 system.
2012-06-07 13:38:11 -05:00
Andrew Johnson
958b40f74c libCom: Silence errlog when running tests
Removes extraneous noise.
2012-06-05 15:53:32 -05:00
Andrew Johnson
e458e8fe2d Don't try to build dbltExpand on Win32. 2012-06-01 14:33:55 -05:00
Andrew Johnson
37a9efa290 Added test for msi -o option. 2012-06-01 14:16:13 -05:00
Andrew Johnson
efec22eea5 Add automated tests for msi. 2012-06-01 14:03:53 -05:00
Andrew Johnson
d5f050a9a2 Support ';'-separated path lists on Windows
Also renamed the '-c' option to '-g' (global scope)
Updated documentation to match.
2012-05-31 16:39:05 -05:00
Andrew Johnson
2b9d66273c Merged changes from 3.14 branch.
Includes everything up to revno 12343 on 2012-05-21
2012-05-29 16:44:49 -05:00
Andrew Johnson
cdaf05c7ac db/test: Create a test harness for vxWorks & RTEMS 2012-05-29 16:20:17 -05:00
Michael Davidsaver
3e9bae45b9 default MQ report event wait errors 2012-05-24 14:31:29 -04:00
Michael Davidsaver
5d2e5b46e5 minor 2012-05-24 14:31:28 -04:00
Michael Davidsaver
3333217f56 simplify 2012-05-24 14:31:28 -04:00
Michael Davidsaver
6060f2eaaa Only ignore errors when there is an error reporting path
can't report from thread free mutex unlock or implicit thread creation
2012-05-24 14:31:27 -04:00