CMakeLists.txt 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)
  2. cmake_policy(SET CMP0057 NEW)
  3. project(regression_test LANGUAGES C)
  4. set(SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/../../regression_test)
  5. set(regression_test_cases
  6. ${SOURCE_DIR}/filex_directory_attributes_read_set_test.c
  7. ${SOURCE_DIR}/filex_directory_create_delete_test.c
  8. ${SOURCE_DIR}/filex_directory_default_path_get_set_test.c
  9. ${SOURCE_DIR}/filex_directory_duplicate_entries_test.c
  10. ${SOURCE_DIR}/filex_directory_first_next_find_test.c
  11. ${SOURCE_DIR}/filex_directory_local_path_test.c
  12. ${SOURCE_DIR}/filex_directory_long_short_get_test.c
  13. ${SOURCE_DIR}/filex_directory_naming_test.c
  14. ${SOURCE_DIR}/filex_directory_rename_test.c
  15. ${SOURCE_DIR}/filex_fault_tolerant_corrupted_log_file_test.c
  16. ${SOURCE_DIR}/filex_fault_tolerant_delete_large_data_test.c
  17. ${SOURCE_DIR}/filex_fault_tolerant_directory_attributes_set_directory_interrupt_test.c
  18. ${SOURCE_DIR}/filex_fault_tolerant_directory_attributes_set_redo_log_interrupt_test.c
  19. ${SOURCE_DIR}/filex_fault_tolerant_directory_create_directory_interrupt_test.c
  20. ${SOURCE_DIR}/filex_fault_tolerant_directory_create_redo_log_interrupt_test.c
  21. ${SOURCE_DIR}/filex_fault_tolerant_directory_delete_directory_interrupt_test.c
  22. ${SOURCE_DIR}/filex_fault_tolerant_directory_delete_redo_log_interrupt_test.c
  23. ${SOURCE_DIR}/filex_fault_tolerant_directory_rename_directory_interrupt_test.c
  24. ${SOURCE_DIR}/filex_fault_tolerant_directory_rename_redo_log_interrupt_test.c
  25. ${SOURCE_DIR}/filex_fault_tolerant_enable_test.c
  26. ${SOURCE_DIR}/filex_fault_tolerant_enable_1_test.c
  27. ${SOURCE_DIR}/filex_fault_tolerant_enable_2_test.c
  28. ${SOURCE_DIR}/filex_fault_tolerant_enable_3_test.c
  29. ${SOURCE_DIR}/filex_fault_tolerant_enable_4_test.c
  30. ${SOURCE_DIR}/filex_fault_tolerant_media_check_test.c
  31. ${SOURCE_DIR}/filex_fault_tolerant_file_seek_test.c
  32. ${SOURCE_DIR}/filex_fault_tolerant_file_random_seek_test.c
  33. ${SOURCE_DIR}/filex_fault_tolerant_file_allocate_directory_interrupt_test.c
  34. ${SOURCE_DIR}/filex_fault_tolerant_file_allocate_fat_interrupt_test.c
  35. ${SOURCE_DIR}/filex_fault_tolerant_file_allocate_redo_log_interrupt_test.c
  36. ${SOURCE_DIR}/filex_fault_tolerant_file_allocate_test.c
  37. ${SOURCE_DIR}/filex_fault_tolerant_file_allocate_undo_log_interrupt_test.c
  38. ${SOURCE_DIR}/filex_fault_tolerant_file_attributes_set_directory_interrupt_test.c
  39. ${SOURCE_DIR}/filex_fault_tolerant_file_attributes_set_redo_log_interrupt_test.c
  40. ${SOURCE_DIR}/filex_fault_tolerant_file_best_allocate_directory_interrupt_test.c
  41. ${SOURCE_DIR}/filex_fault_tolerant_file_best_allocate_fat_interrupt_test.c
  42. ${SOURCE_DIR}/filex_fault_tolerant_file_best_allocate_redo_log_interrupt_test.c
  43. ${SOURCE_DIR}/filex_fault_tolerant_file_best_allocate_undo_log_interrupt_test.c
  44. ${SOURCE_DIR}/filex_fault_tolerant_file_create_directory_interrupt_test.c
  45. ${SOURCE_DIR}/filex_fault_tolerant_file_create_redo_log_interrupt_test.c
  46. ${SOURCE_DIR}/filex_fault_tolerant_file_delete_directory_interrupt_test.c
  47. ${SOURCE_DIR}/filex_fault_tolerant_file_delete_fat_interrupt_test.c
  48. ${SOURCE_DIR}/filex_fault_tolerant_file_delete_fat_multiple_sectors_test.c
  49. ${SOURCE_DIR}/filex_fault_tolerant_file_delete_redo_log_interrupt_test.c
  50. ${SOURCE_DIR}/filex_fault_tolerant_file_delete_test.c
  51. ${SOURCE_DIR}/filex_fault_tolerant_file_delete_undo_log_interrupt_test.c
  52. ${SOURCE_DIR}/filex_fault_tolerant_file_rename_directory_interrupt_test.c
  53. ${SOURCE_DIR}/filex_fault_tolerant_file_rename_redo_log_interrupt_test.c
  54. ${SOURCE_DIR}/filex_fault_tolerant_file_truncate_release_available_test.c
  55. ${SOURCE_DIR}/filex_fault_tolerant_file_truncate_directory_interrupt_test.c
  56. ${SOURCE_DIR}/filex_fault_tolerant_file_truncate_redo_log_interrupt_test.c
  57. ${SOURCE_DIR}/filex_fault_tolerant_file_truncate_release_directory_interrupt_test.c
  58. ${SOURCE_DIR}/filex_fault_tolerant_file_truncate_release_fat_interrupt_test.c
  59. ${SOURCE_DIR}/filex_fault_tolerant_file_truncate_release_redo_log_interrupt_test.c
  60. ${SOURCE_DIR}/filex_fault_tolerant_file_truncate_release_undo_log_interrupt_test.c
  61. ${SOURCE_DIR}/filex_fault_tolerant_file_write_available_test.c
  62. ${SOURCE_DIR}/filex_fault_tolerant_file_write_data_interrupt_test.c
  63. ${SOURCE_DIR}/filex_fault_tolerant_file_write_directory_interrupt_test.c
  64. ${SOURCE_DIR}/filex_fault_tolerant_file_write_fat_interrupt_test.c
  65. ${SOURCE_DIR}/filex_fault_tolerant_file_write_redo_log_interrupt_test.c
  66. ${SOURCE_DIR}/filex_fault_tolerant_file_write_undo_log_interrupt_test.c
  67. ${SOURCE_DIR}/filex_fault_tolerant_file_corruption_test.c
  68. ${SOURCE_DIR}/filex_fault_tolerant_log_full_test.c
  69. ${SOURCE_DIR}/filex_fault_tolerant_log_recover_directory_test.c
  70. ${SOURCE_DIR}/filex_fault_tolerant_log_recover_fat_test.c
  71. ${SOURCE_DIR}/filex_fault_tolerant_long_directory_create_directory_interrupt_test.c
  72. ${SOURCE_DIR}/filex_fault_tolerant_long_directory_create_redo_log_interrupt_test.c
  73. ${SOURCE_DIR}/filex_fault_tolerant_long_directory_rename_directory_interrupt_test.c
  74. ${SOURCE_DIR}/filex_fault_tolerant_long_directory_rename_redo_log_interrupt_test.c
  75. ${SOURCE_DIR}/filex_fault_tolerant_long_directory_rename_io_error_test.c
  76. ${SOURCE_DIR}/filex_fault_tolerant_long_file_create_directory_interrupt_test.c
  77. ${SOURCE_DIR}/filex_fault_tolerant_long_file_create_redo_log_interrupt_test.c
  78. ${SOURCE_DIR}/filex_fault_tolerant_loop_write_data_test.c
  79. ${SOURCE_DIR}/filex_fault_tolerant_media_full_test.c
  80. ${SOURCE_DIR}/filex_fault_tolerant_write_large_data_directory_interrupt_test.c
  81. ${SOURCE_DIR}/filex_fault_tolerant_write_large_data_fat_chain_cleanup_interrupt_test.c
  82. ${SOURCE_DIR}/filex_fault_tolerant_write_large_data_fat_interrupt_test.c
  83. ${SOURCE_DIR}/filex_fault_tolerant_write_large_data_interrupt_test.c
  84. ${SOURCE_DIR}/filex_fault_tolerant_write_large_data_redo_log_interrupt_test.c
  85. ${SOURCE_DIR}/filex_fault_tolerant_write_large_data_test.c
  86. ${SOURCE_DIR}/filex_fault_tolerant_write_large_data_undo_log_interrupt_test.c
  87. ${SOURCE_DIR}/filex_fault_tolerant_recover_fail_test.c
  88. ${SOURCE_DIR}/filex_fault_tolerant_unicode_directory_create_directory_interrupt_test.c
  89. ${SOURCE_DIR}/filex_fault_tolerant_unicode_directory_create_redo_log_interrupt_test.c
  90. ${SOURCE_DIR}/filex_fault_tolerant_unicode_directory_rename_directory_interrupt_test.c
  91. ${SOURCE_DIR}/filex_fault_tolerant_unicode_directory_rename_redo_log_interrupt_test.c
  92. ${SOURCE_DIR}/filex_fault_tolerant_unicode_file_create_directory_interrupt_test.c
  93. ${SOURCE_DIR}/filex_fault_tolerant_unicode_file_create_redo_log_interrupt_test.c
  94. ${SOURCE_DIR}/filex_fault_tolerant_unicode_file_rename_directory_interrupt_test.c
  95. ${SOURCE_DIR}/filex_fault_tolerant_unicode_file_rename_redo_log_interrupt_test.c
  96. ${SOURCE_DIR}/filex_fault_tolerant_file_write_fat_crossover_test.c
  97. ${SOURCE_DIR}/filex_fault_tolerant_file_write_fat_crossover_2_test.c
  98. ${SOURCE_DIR}/filex_fault_tolerant_file_allocate_fat_crossover_test.c
  99. ${SOURCE_DIR}/filex_fault_tolerant_file_best_effort_allocate_fat_crossover_test.c
  100. ${SOURCE_DIR}/filex_file_allocate_truncate_test.c
  101. ${SOURCE_DIR}/filex_file_allocate_test.c
  102. ${SOURCE_DIR}/filex_file_attributes_read_set_test.c
  103. ${SOURCE_DIR}/filex_file_create_delete_test.c
  104. ${SOURCE_DIR}/filex_file_date_time_set_test.c
  105. ${SOURCE_DIR}/filex_file_naming_test.c
  106. ${SOURCE_DIR}/filex_file_read_write_test.c
  107. ${SOURCE_DIR}/filex_file_rename_test.c
  108. ${SOURCE_DIR}/filex_file_seek_test.c
  109. ${SOURCE_DIR}/filex_file_name_test.c
  110. ${SOURCE_DIR}/filex_media_abort_test.c
  111. ${SOURCE_DIR}/filex_media_cache_invalidate_test.c
  112. ${SOURCE_DIR}/filex_media_check_test.c
  113. ${SOURCE_DIR}/filex_media_flush_test.c
  114. ${SOURCE_DIR}/filex_media_format_open_close_test.c
  115. ${SOURCE_DIR}/filex_media_multiple_open_close_test.c
  116. ${SOURCE_DIR}/filex_media_read_write_sector_test.c
  117. ${SOURCE_DIR}/filex_media_volume_directory_entry_test.c
  118. ${SOURCE_DIR}/filex_media_volume_get_set_test.c
  119. ${SOURCE_DIR}/filex_media_hidden_sectors_test.c
  120. ${SOURCE_DIR}/filex_system_date_time_test.c
  121. ${SOURCE_DIR}/filex_unicode_directory_rename_test.c
  122. ${SOURCE_DIR}/filex_unicode_file_directory_rename_extra_test.c
  123. ${SOURCE_DIR}/filex_unicode_file_directory_rename_extra_2_test.c
  124. ${SOURCE_DIR}/filex_unicode_file_rename_test.c
  125. ${SOURCE_DIR}/filex_unicode_test.c
  126. ${SOURCE_DIR}/filex_unicode_2_test.c
  127. ${SOURCE_DIR}/filex_unicode_3_test.c
  128. ${SOURCE_DIR}/filex_unicode_4_test.c
  129. ${SOURCE_DIR}/filex_unicode_name_string_test.c
  130. ${SOURCE_DIR}/filex_unicode_directory_entry_test.c
  131. ${SOURCE_DIR}/filex_unicode_directory_entry_2_test.c
  132. ${SOURCE_DIR}/filex_unicode_directory_entry_change_test.c
  133. ${SOURCE_DIR}/filex_unicode_fat_entry_test.c
  134. ${SOURCE_DIR}/filex_unicode_fat_entry_1_test.c
  135. ${SOURCE_DIR}/filex_unicode_fat_entry_2_test.c
  136. ${SOURCE_DIR}/filex_unicode_fat_entry_3_test.c
  137. ${SOURCE_DIR}/filex_file_write_seek_test.c
  138. ${SOURCE_DIR}/filex_file_write_notify_test.c
  139. ${SOURCE_DIR}/filex_file_write_available_cluster_test.c
  140. ${SOURCE_DIR}/filex_utility_test.c
  141. ${SOURCE_DIR}/filex_utility_fat_flush_test.c)
  142. add_library(test_utility ${SOURCE_DIR}/fx_ram_driver_test.c
  143. ${SOURCE_DIR}/filextestcontrol.c)
  144. target_link_libraries(test_utility PUBLIC azrtos::filex)
  145. target_compile_definitions(test_utility PUBLIC BATCH_TEST CTEST)
  146. foreach(test_case ${regression_test_cases})
  147. get_filename_component(test_name ${test_case} NAME_WE)
  148. add_executable(${test_name} ${test_case})
  149. target_link_libraries(${test_name} PRIVATE test_utility)
  150. add_test(${CMAKE_BUILD_TYPE}::${test_name} ${test_name})
  151. endforeach()