Re: [libgpiod][RFC/RFT PATCH] tools: tests: port tests to shunit2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 15, 2023 at 04:38:10PM +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
> 
> BATS seems to run pretty slowly. Part of it may be the n+1 time parsing
> the test files mentioned in the BATS docs.
> 
> This is a quick and dirty port of test cases to shunit2 - a different
> testing framework for shell scripts. It sped up test execution for me
> by ~40%.
> 

That is a lot faster for me too:

Ran 165 tests.

OK

real	0m41.300s
user	0m10.122s
sys	0m22.926s

while it is > 2m30 with bats, so ~75% speedup.

Though I get these errors on some tests:

test_gpiodetect_all_chips
./gpio-tools-test.bash: line 40: assertContains: command not found
./gpio-tools-test.bash: line 40: assertContains: command not found
./gpio-tools-test.bash: line 40: assertContains: command not found
test_gpiodetect_a_chip

and the overall test suite still passed, which is a bit of a worry.

Hmmm, seems assertContains was added in 2.1.8 and I'm still on 2.1.6.
I'll have to update.

Overall looks promising.

Cheers,
Kent.



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux