mirror of https://github.com/nirenjan/libx52.git
				
				
				
			feat: Add x52cli and test to meson
							parent
							
								
									f04e772590
								
							
						
					
					
						commit
						5c16e90a35
					
				|  | @ -462,12 +462,12 @@ static void do_help(const struct command_handler *cmd) | |||
|     if (cmd) { | ||||
|         fprintf(stderr, "Command usage: %s\n", cmd->help); | ||||
|     } else { | ||||
|         printf("\nCommands:\n"); | ||||
|         fprintf(stderr, "\nCommands:\n"); | ||||
|         for (i = 0; i < X52_CTL_CMD_MAX; i++) { | ||||
|             printf("\t%s\n", handlers[i].help); | ||||
|             fprintf(stderr, "\t%s\n", handlers[i].help); | ||||
|         } | ||||
| 
 | ||||
|         printf("\nWARNING: raw command may damage your device\n\n"); | ||||
|         fprintf(stderr, "\nWARNING: raw command may damage your device\n\n"); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										16
									
								
								meson.build
								
								
								
								
							
							
						
						
									
										16
									
								
								meson.build
								
								
								
								
							|  | @ -225,3 +225,19 @@ executable('x52bugreport', 'bugreport/bugreport.c', | |||
|   include_directories: 'libx52io', | ||||
|   dependencies: [dep_libusb, dep_hidapi], | ||||
|   link_with: [lib_libx52io]) | ||||
| 
 | ||||
| # x52cli | ||||
| executable('x52cli', 'cli/x52_cli.c', | ||||
|   include_directories: 'libx52', | ||||
|   link_with: lib_libx52) | ||||
| 
 | ||||
| if dep_cmocka.found() | ||||
|   test_cli = executable('test-cli', 'cli/x52_cli.c', 'cli/test_x52_cli.c', | ||||
|     build_by_default: false, | ||||
|     c_args: ['-DX52_CLI_TESTING'], | ||||
|     include_directories: 'libx52', | ||||
|     dependencies: [dep_cmocka], | ||||
|     ) | ||||
| 
 | ||||
|   test('test-cli', test_cli, protocol: 'tap') | ||||
| endif | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue