mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 02:12:45 +00:00 
			
		
		
		
	Tests: Build automatically, fix compilation errors
This commit is contained in:
		
							parent
							
								
									538b985487
								
							
						
					
					
						commit
						29eceebdbf
					
				
					 21 changed files with 31 additions and 1 deletions
				
			
		|  | @ -37,3 +37,5 @@ target_link_libraries(test-crypto LibCrypto LibTLS LibLine) | |||
| target_link_libraries(test-js LibJS LibLine LibCore) | ||||
| target_link_libraries(test-web LibWeb) | ||||
| target_link_libraries(tt LibPthread) | ||||
| 
 | ||||
| add_subdirectory(Tests) | ||||
|  |  | |||
							
								
								
									
										2
									
								
								Userland/Tests/CMakeLists.txt
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								Userland/Tests/CMakeLists.txt
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,2 @@ | |||
| add_subdirectory(Kernel) | ||||
| add_subdirectory(LibC) | ||||
							
								
								
									
										15
									
								
								Userland/Tests/Kernel/CMakeLists.txt
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								Userland/Tests/Kernel/CMakeLists.txt
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| file(GLOB CMD_SOURCES "*.cpp") | ||||
| 
 | ||||
| foreach(CMD_SRC ${CMD_SOURCES}) | ||||
|     get_filename_component(CMD_NAME ${CMD_SRC} NAME_WE) | ||||
|     add_executable(${CMD_NAME} ${CMD_SRC}) | ||||
|     target_link_libraries(${CMD_NAME} LibCore) | ||||
|     install(TARGETS ${CMD_NAME} RUNTIME DESTINATION usr/Tests/Kernel) | ||||
| endforeach() | ||||
| 
 | ||||
| target_link_libraries(elf-execve-mmap-race LibPthread) | ||||
| target_link_libraries(nanosleep-race-outbuf-munmap LibPthread) | ||||
| target_link_libraries(null-deref-close-during-select LibPthread) | ||||
| target_link_libraries(null-deref-crash-during-pthread_join LibPthread) | ||||
| target_link_libraries(uaf-close-while-blocked-in-read LibPthread) | ||||
| target_link_libraries(pthread-cond-timedwait-example LibPthread) | ||||
|  | @ -4,6 +4,7 @@ | |||
| #include <stdio.h> | ||||
| #include <string.h> | ||||
| #include <sys/mman.h> | ||||
| #include <sys/wait.h> | ||||
| #include <unistd.h> | ||||
| 
 | ||||
| volatile bool hax = false; | ||||
|  | @ -1,7 +1,7 @@ | |||
| #include <stdio.h> | ||||
| #include <unistd.h> | ||||
| 
 | ||||
| int main(int argc, char** argv) | ||||
| int main() | ||||
| { | ||||
|     int res = pledge("stdio unix rpath", "stdio"); | ||||
|     if (res < 0) { | ||||
							
								
								
									
										10
									
								
								Userland/Tests/LibC/CMakeLists.txt
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								Userland/Tests/LibC/CMakeLists.txt
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,10 @@ | |||
| file(GLOB CMD_SOURCES "*.cpp") | ||||
| 
 | ||||
| foreach(CMD_SRC ${CMD_SOURCES}) | ||||
|     get_filename_component(CMD_NAME ${CMD_SRC} NAME_WE) | ||||
|     add_executable(${CMD_NAME} ${CMD_SRC}) | ||||
|     target_link_libraries(${CMD_NAME} LibCore) | ||||
|     install(TARGETS ${CMD_NAME} RUNTIME DESTINATION usr/Tests/LibC) | ||||
| endforeach() | ||||
| 
 | ||||
| #target_link_libraries(foobar LibPthread) | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Ben Wiederhake
						Ben Wiederhake