mirror of
				https://github.com/espressif/esp-idf.git
				synced 2025-11-04 06:11:06 +00:00 
			
		
		
		
	- Public API CMock based Host tests
    - USB Host layer: driver install/uninstall unit test
    - USBH layer: driver install/uninstall unit test
    - Host tests are run in CI
		
	
		
			
				
	
	
	
		
			943 B
		
	
	
	
	
	
	
	
			
		
		
	
	
			943 B
		
	
	
	
	
	
	
	
| Supported Targets | Linux | 
|---|
Description
This directory contains test code for USBH layer of USB Host stack. Namely:
- USBH public API calls to install and uninstall the USBH driver with partially mocked USB Host stack to test Linux build and Cmock run for this partial Mock
 - Mocked are all layers of the USB Host stack below the USBH layer, which is used as a real component
 
Tests are written using Catch2 test framework, use CMock, so you must install Ruby on your machine to run them.
This test directory uses freertos as a real component
Build
Tests build regularly like an idf project. Currently only working on Linux machines.
idf.py --preview set-target linux
idf.py build
Run
The build produces an executable in the build folder.
Just run:
idf.py monitor
or run the executable directly:
./build/host_test_usbh_layer.elf