Commit Graph

20 Commits (f754533a67d24c2ee1d0dce1f78caeb376bcafa5)

Author SHA1 Message Date
nirenjan 071162a907 Replace backticks with $(...) in test scripts 2020-06-11 16:03:16 -07:00
nirenjan d53e56c491 Use $(...) instead of `...` in test scripts 2020-06-08 23:55:27 -07:00
nirenjan af49ce6500 Fix daylight savings offset calculation bug
This commit changes the local timezone calculation to use tm.tm_gmtoff,
and falling back to calculating it manually from the output of strftime
when tm_gmtoff is not a member of struct tm.

This also fixes the tests so that they are no longer expected to fail.

Fixes #20.
2020-06-06 17:48:17 -07:00
nirenjan 1188bea444 Use TAP for tests
Prior to this change, the tests were using the automake simple test
harness. The limitation was that for each set of test cases (e.g.
timezone tests), even if one test failed, it would report every test in
that set as failed. Migrating to TAP allows fine-grained reporting on
every single test case, and allows better investigation into checking
which individual tests failed.

This change also updates the timezone tests to explicitly mark the ones
that check when the timezone is Pacific Daylight Time as expected to
fail. It also updates the clock tests to improve the formatting of the
test case identifier.
2020-06-06 08:33:30 -07:00
nirenjan 79bd8466c1 Add test suite for timezone tests
Previously, when testing the clock command of x52cli, we had forced the
system timezone to UTC. As a result, the offset calculations for clocks
2 and 3 were never computed and always resulted in 0, which hid the bug
when the local time and local standard time did not match (#20).

This commit adds a test case that uses faketime to test setting the
clock to local (Pacific Time) and verifying that the offsets are
computed correctly. Given that the bug is still present as of this
commit, add the test suite to XFAIL_TESTS as well, so that it doesn't
break the CI build.
2020-06-02 14:48:46 -07:00
nirenjan 40b2e9bdac Remove debugs from MFD test script 2020-03-31 23:22:04 -07:00
nirenjan 7dcd3049ec Add SPDX license identifiers in all files 2018-04-18 12:19:29 -07:00
nirenjan d54e02be5a Add test cases for raw time and date APIs 2017-08-18 07:28:23 -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 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 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 0a8db132dc Make test setup routines use environment variables 2017-08-01 21:49:58 -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 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