Commit Graph

20 Commits (1dcadb942896d6809e0563edc34b33d21db6b036)

Author SHA1 Message Date
nirenjan 0ac3a3d0c4 Add additional tests for x52cli
This change adds additional tests to verify the parser behavior, as well
as the handling of any error conditions from libx52 itself.
2022-06-12 03:37:21 -07:00
nirenjan 552e638b27 Remove obsolete check for invalid handler
Since the introduction of X macros to the CLI handling code, there will
never be a condition where the handler will be NULL. This is a legacy
check from when the code had individual maps that were maintained by
hand.
2022-06-12 03:34:53 -07:00
nirenjan 44fba0c6cd Always return 1 from x52cli for any failure
Prior to this change, on failure condition, x52cli would exit with a
code that mapped directly to the return code of the function. This was
inconsistent with the behaviour if the initialization or connect steps
failed for any reason.
2022-06-12 03:32:25 -07:00
nirenjan 699f663df3 Use TEST_DEF as a function macro, instead of #if/#endif blocks 2021-08-02 10:35:37 -07:00
nirenjan 38917ed6e5 Add documentation for x52d 2021-08-01 23:47:24 -07:00
nirenjan dbd683a98b Add vendor command test cases
This change adds test cases to validate the `raw` command in x52cli.
2021-07-30 12:02:02 -07:00
nirenjan 377aea90b5 Remove spurious test cases
Prior to this change, the tests file contained every test that was in
the original script based test suite. However, we don't need to test
every single scenario within libx52, since those are already handled in
the libx52 specific tests. This also causes a slow compilation, since
the tests are written as a series of macros, and the result is a 2000+
line file before preprocessing.

This change removes some of the spurious test cases, and simply checks
that the parameters passed to the corresponding libx52 function are as
expected for a few test cases.
2021-07-30 11:48:14 -07:00
nirenjan 9047485204 Include CLI tests file into distribution 2021-07-30 03:09:21 -07:00
nirenjan 51913094cb Use cmocka to test CLI 2021-07-30 03:03:16 -07:00
nirenjan ac68ee07e5 Use non-recursive Automake 2021-07-29 23:53:21 -07:00
nirenjan f0a0a7dcaf Reorganize source layout 2017-07-27 17:56:51 -07:00
nirenjan 6d8d5a4fd4 Fix return from void function
While gcc on Linux (Travis CI) throws a warning, but otherwise ignores
this return value from void function, clang on OSX throws a fit.
2016-10-08 09:44:44 -07:00
nirenjan 1b9c52ea07 Merge pull request #10 from ryandrake08/master
Clang/OSX cleanups
2016-10-08 09:31:53 -07:00
nirenjan e5229b6aa2 Clean up enum_conversion warnings on clang/OSX 2016-10-07 22:27:13 -07:00
Ryan Drake 15b8abf3c6 Fix warnings about unused variables 2016-10-06 15:28:18 -07:00
Ryan Drake 30622eefa8 Fix control may reach end of non-void function error 2016-10-06 15:19:00 -07:00
nirenjan bbe86d554f Clear up return-type warnings 2016-10-06 10:39:16 -07:00
nirenjan b39c13fe1b x52_cli: Add stdlib.h include to prevent warnings 2016-07-31 12:25:07 -07:00
nirenjan b45c9fd9a2 Add man page for x52cli 2015-12-09 09:25:03 -08:00
nirenjan c87e785a18 Restructure code layout
Copy files to individual folders. This makes it cleaner to add new
functionality in the future.
2015-12-08 21:46:42 -08:00