Commit Graph

462 Commits (a3cc0adb844104dd5775ec111691b4092cca881f)

Author SHA1 Message Date
nirenjan f9639a9a00 Update ChangeLog
[skip ci]
2020-04-13 00:44:33 -07:00
nirenjan 243b0330af Update build status in README
[skip ci]
2020-04-12 22:23:47 -07:00
nirenjan a5b69124a4 Update build matrix to include OSX, Xenial and Bionic
This commit adds OSX to the build matrix, as well as building on Trusty,
Xenial and Bionic, both with GCC and CLang on all distributions. For
now, the OSX build uses the default image provided by Travis CI, but we
may decide to add more images in the future.

Also move realpath installation out of addons::apt::packages, since on
Xenial and newer distributions, realpath is included in the coreutils
package and doesn't need to be explicitly installed. However, we still
need it on Trusty, so add a line to manually install it.
2020-04-12 22:04:43 -07:00
nirenjan dc80a0f2f1 Add option to run test without delay
x52test by default expects to run with an attached X52 unit. Since the
primary goal of the program is to test the hardware, it has embedded
delays to allow the user to verify the individual LEDs, MFD, brightness,
etc.

However, the complete test takes about 6 minutes. When using the stub
libusb library, the goal is to capture the requests, not verify it
against the hardware. In this case, the delays serve no useful purpose.

This change adds a nodelay flag, which is controlled by the presence of
a `NO_DELAY` environment variable, or the `LD_PRELOAD` environment
variable. As long as either of these variables are present in the
environment block, there will be no delays in the test execution.
2020-04-12 16:48:29 -07:00
nirenjan a7caba19df Set debug output to be line buffered
The stub libusb library used for testing writes the control request to a
dump file. By default, this file is block-buffered, and on a typical
Linux system, it waits until it receives about a page worth of data
before flushing it to disk. This results in a delay in monitoring
packets when running a debug program.

This change makes the file line-buffered instead, which results in the
debug output for every single packet getting flushed to disk without
having to wait for a full page of data.
2020-04-12 16:29:22 -07:00
nirenjan 40b2e9bdac Remove debugs from MFD test script 2020-03-31 23:22:04 -07:00
nirenjan 40c14fed24 Update calls to libusb_set_debug
With the release of libusb 1.0.22, `libusb_set_debug` has been
deprecated and replaced by `libusb_set_option`. This function is a new
generic API to add additional functionality in the future without having
to introduce new functions.

This change checks for `LIBUSB_API_VERSION` of at least `0x01000106`,
which is the version corresponding to 1.0.22, and if it matches, it
replaces the calls to `libusb_set_debug` with equivalent calls to
`libusb_set_option`.
2019-02-01 21:31:57 -08:00
nirenjan 1d51429f10 Make x52test use X macros 2018-07-17 17:21:21 -07:00
nirenjan 9e581bf051 Let libx52_init also translate libusb error codes 2018-07-17 16:00:19 -07:00
nirenjan b1139806f5 Use X-macros for x52cli commands 2018-07-17 15:46:54 -07:00
nirenjan 7dcd3049ec Add SPDX license identifiers in all files 2018-04-18 12:19:29 -07:00
nirenjan e31f1e442b Move license text to LICENSE file 2018-04-18 12:16:48 -07:00
nirenjan 0913212ecc Always return translated error code
LIBUSB_SUCCESS is also handled by libx52_translate_libusb_error.
2017-10-27 14:20:19 -07:00
nirenjan 02c24cc964 Fix timezone offset calculations for large negative offsets 2017-10-27 14:19:38 -07:00
nirenjan 46cba64e6b Update build requirements in README
[skip ci]
2017-10-12 21:35:58 -07:00
nirenjan 86642e5b16 Use pkg-config for libusb 2017-09-10 17:13:38 -07:00
nirenjan 3845c81229 Add libx52_strerror API 2017-08-28 22:54:46 -07:00
nirenjan 6f3f8d7c46 Add more error codes and translation from libusb
These new error codes correspond to similar ones returned by libusb, but
abstract away the usage of libusb underneath libx52. This lets the
application rely solely on libx52 error codes to perform error handling.
2017-08-28 19:10:41 -07:00
nirenjan d4afbd6de2 Build libusbx52 only for tests 2017-08-25 06:39:04 -07:00
nirenjan e5ea621899 Fix libtool version info for libx52
Also update package version to indicate it is in pre-release stage.
2017-08-25 06:04:36 -07:00
nirenjan f3270def9d API change for libx52
- libx52_init returns the libx52_device in an output parameter and
  returns a libx52_error_code
- Make all functions return libx52_error_code
- Update package version to indicate incompatible API change
2017-08-23 19:30:35 -07:00
nirenjan fb222dda89 Add Changelog 2017-08-19 15:59:57 -07:00
nirenjan 82fa0cea28 Bump version number 2017-08-18 07:50:12 -07:00
nirenjan 21d6b503a7 travis-ci: Enable parallel make 2017-08-18 07:32:50 -07:00
nirenjan d54e02be5a Add test cases for raw time and date APIs 2017-08-18 07:28:23 -07:00
nirenjan acdcebc52e Add CLI commands to access raw date and time APIs 2017-08-18 07:26:50 -07:00
nirenjan 52abd335ab Add raw time and date APIs to libx52
The raw time and date APIs bypass the timezone calculation and update
the internal data structures with the requested time in hh:mm and date
in dd/mm/yy formats.

This is unlikely to be used often, but it is useful during testing.
2017-08-18 07:23:49 -07:00
nirenjan 6b89a9d7f9 Clarify Doxygen comments for libx52 2017-08-16 23:38:19 -07:00
nirenjan 533a472b10 Fix formatting for x52cli manual 2017-08-16 00:05:05 -07:00
nirenjan 780447122c Reduce number of included headers for libx52util.h 2017-08-16 00:04:10 -07:00
nirenjan b5f4e72148 Add test cases for MFD text 2017-08-14 22:58:22 -07:00
nirenjan 2e96378f80 Add test cases for MFD clock display 2017-08-12 08:43:13 -07:00
nirenjan b9a7e5de1f Remove redundant make check from Travis build
make distcheck already runs make check in the new location, so any
failures should start showing up there.

[skip ci]
2017-08-11 18:19:29 -07:00
nirenjan 3eb837df1b Merge tests into corresponding test-suites
This eliminates the large number of small generated test case files and
somewhat simplifies the actual management of test cases and test suites.
2017-08-11 18:10:53 -07:00
nirenjan 994c39ce3c Add test cases for blink and shift indicators 2017-08-04 08:26:21 -07:00
nirenjan 8f7c262ea6 Merge pull request #13 from Polynomial-C/newline
x52_cli: Print error messages with trailing newline.
2017-08-04 08:25:13 -07:00
Lars Wendler 44d46b70e0
x52_cli: Print error messages with trailing newline. 2017-08-04 11:12:24 +02:00
nirenjan e0d7cb8341 Add brightness test cases 2017-08-03 19:14:29 -07:00
nirenjan 2c2dbb3c42 Reorganize test scripts
This allows for a cleaner organization of different test categories.
2017-08-03 16:59:07 -07:00
nirenjan d9732d498d Fix environment for parallel tests 2017-08-03 16:56:06 -07:00
nirenjan b776101cb6 Add test-driver to .gitignore 2017-08-01 22:05:03 -07:00
nirenjan 0a8db132dc Make test setup routines use environment variables 2017-08-01 21:49:58 -07:00
nirenjan f6bf25d66f Add environment file to enable parallel tests 2017-08-01 21:45:02 -07:00
nirenjan 991218a8b0 Skip tests on OSX 2017-07-29 10:07:12 -07:00
nirenjan 0a45bd5ddf Use x52test_log_action to capture test output 2017-07-27 23:34:39 -07:00
nirenjan 55963ba824 Merge branch 'feature/automated-tests' 2017-07-27 20:52:09 -07:00
nirenjan a2496d5d28 Add realpath to Travis-CI
This package is necessary for the tests, otherwise the script will error
out with a missing "realpath" error.
2017-07-27 20:47:59 -07:00
nirenjan c79373676f Fix distcheck failure 2017-07-27 20:10:21 -07:00
nirenjan e463d9b890 Add tests framework and LED tests 2017-07-27 20:00:35 -07:00
nirenjan f0a0a7dcaf Reorganize source layout 2017-07-27 17:56:51 -07:00