test_slice_tests.sh 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415
  1. #!/bin/bash
  2. LEVEL=$1
  3. set -ex
  4. if [ "$LEVEL" == '1' ]; then
  5. echo "slicing level 1"
  6. # no ticket action
  7. rm test/browser/aaa_getting_started_test.rb
  8. cp contrib/auto_wizard_test.json auto_wizard.json
  9. cp test/integration/aaa_auto_wizard_base_setup_test.rb test/browser/aaa_auto_wizard_base_setup_test.rb
  10. # test/browser/aab_basic_urls_test.rb
  11. # test/browser/aab_unit_test.rb
  12. # test/browser/aac_basic_richtext_test.rb
  13. rm test/browser/abb_one_group_test.rb
  14. rm test/browser/admin_channel_email_test.rb
  15. rm test/browser/admin_calendar_sla_test.rb
  16. rm test/browser/admin_object_manager_test.rb
  17. rm test/browser/admin_object_manager_tree_select_test.rb
  18. rm test/browser/admin_overview_test.rb
  19. rm test/browser/admin_role_test.rb
  20. # test/browser/agent_navigation_and_title_test.rb
  21. # test/browser/agent_organization_profile_test.rb
  22. rm test/browser/agent_ticket_attachment_test.rb
  23. rm test/browser/agent_ticket_auto_assignment_test.rb
  24. rm test/browser/agent_ticket_create_cc_tokenizer_test.rb
  25. rm test/browser/agent_ticket_create_reset_customer_selection_test.rb
  26. rm test/browser/agent_ticket_create_template_test.rb
  27. rm test/browser/agent_ticket_email_reply_keep_body_test.rb
  28. rm test/browser/agent_ticket_email_signature_test.rb
  29. rm test/browser/agent_ticket_link_test.rb
  30. rm test/browser/agent_ticket_macro_test.rb
  31. rm test/browser/agent_ticket_merge_test.rb
  32. rm test/browser/agent_ticket_online_notification_test.rb
  33. rm test/browser/agent_ticket_overview_level0_test.rb
  34. rm test/browser/agent_ticket_overview_level1_test.rb
  35. rm test/browser/agent_ticket_overview_tab_test.rb
  36. rm test/browser/agent_ticket_tag_test.rb
  37. rm test/browser/agent_ticket_text_module_test.rb
  38. rm test/browser/agent_ticket_time_accounting_test.rb
  39. rm test/browser/agent_ticket_update1_test.rb
  40. rm test/browser/agent_ticket_update2_test.rb
  41. rm test/browser/agent_ticket_update3_test.rb
  42. rm test/browser/agent_ticket_update4_test.rb
  43. rm test/browser/agent_ticket_update_and_reload_test.rb
  44. rm test/browser/agent_user_manage_test.rb
  45. rm test/browser/agent_user_profile_test.rb
  46. # test/browser/auth_test.rb
  47. rm test/browser/chat_test.rb
  48. rm test/browser/customer_ticket_create_fields_test.rb
  49. rm test/browser/customer_ticket_create_test.rb
  50. rm test/browser/first_steps_test.rb
  51. # test/browser/form_test.rb
  52. rm test/browser/integration_test.rb
  53. rm test/browser/keyboard_shortcuts_test.rb
  54. # test/browser/maintenance_app_version_test.rb
  55. # test/browser/maintenance_login_message_test.rb
  56. # test/browser/maintenance_mode_test.rb
  57. # test/browser/maintenance_session_message_test.rb
  58. # test/browser/manage_test.rb
  59. # test/browser/monitoring_test.rb
  60. rm test/browser/preferences_language_test.rb
  61. rm test/browser/preferences_permission_check_test.rb
  62. rm test/browser/preferences_token_access_test.rb
  63. rm test/browser/setting_test.rb
  64. # test/browser/signup_password_change_and_reset_test.rb
  65. # test/browser/swich_to_user_test.rb
  66. # test/browser/taskbar_session_test.rb
  67. # test/browser/taskbar_task_test.rb
  68. # test/browser/translation_test.rb
  69. rm test/browser/user_access_permissions_test.rb
  70. rm test/browser/user_switch_cache_test.rb
  71. elif [ "$LEVEL" == '2' ]; then
  72. echo "slicing level 2"
  73. # only ticket action 2/3
  74. # test/browser/aaa_getting_started_test.rb
  75. rm test/browser/aab_basic_urls_test.rb
  76. rm test/browser/aab_unit_test.rb
  77. rm test/browser/aac_basic_richtext_test.rb
  78. # test/browser/abb_one_group_test.rb
  79. rm test/browser/admin_channel_email_test.rb
  80. rm test/browser/admin_calendar_sla_test.rb
  81. rm test/browser/admin_object_manager_test.rb
  82. rm test/browser/admin_object_manager_tree_select_test.rb
  83. rm test/browser/admin_overview_test.rb
  84. #rm test/browser/admin_role_test.rb
  85. rm test/browser/agent_navigation_and_title_test.rb
  86. rm test/browser/agent_organization_profile_test.rb
  87. rm test/browser/agent_ticket_attachment_test.rb
  88. rm test/browser/agent_ticket_auto_assignment_test.rb
  89. rm test/browser/agent_ticket_create_cc_tokenizer_test.rb
  90. rm test/browser/agent_ticket_create_reset_customer_selection_test.rb
  91. rm test/browser/agent_ticket_create_template_test.rb
  92. rm test/browser/agent_ticket_email_reply_keep_body_test.rb
  93. rm test/browser/agent_ticket_email_signature_test.rb
  94. rm test/browser/agent_ticket_link_test.rb
  95. rm test/browser/agent_ticket_macro_test.rb
  96. # test/browser/agent_ticket_merge_test.rb
  97. rm test/browser/agent_ticket_online_notification_test.rb
  98. rm test/browser/agent_ticket_overview_level0_test.rb
  99. rm test/browser/agent_ticket_overview_level1_test.rb
  100. rm test/browser/agent_ticket_overview_tab_test.rb
  101. rm test/browser/agent_ticket_tag_test.rb
  102. # test/browser/agent_ticket_text_module_test.rb
  103. # test/browser/agent_ticket_time_accounting_test.rb
  104. # test/browser/agent_ticket_update1_test.rb
  105. # test/browser/agent_ticket_update2_test.rb
  106. # test/browser/agent_ticket_update3_test.rb
  107. # test/browser/agent_ticket_update4_test.rb
  108. # test/browser/agent_ticket_update_and_reload_test.rb
  109. rm test/browser/agent_user_manage_test.rb
  110. rm test/browser/agent_user_profile_test.rb
  111. rm test/browser/auth_test.rb
  112. rm test/browser/chat_test.rb
  113. rm test/browser/customer_ticket_create_fields_test.rb
  114. rm test/browser/customer_ticket_create_test.rb
  115. rm test/browser/first_steps_test.rb
  116. rm test/browser/form_test.rb
  117. rm test/browser/integration_test.rb
  118. rm test/browser/keyboard_shortcuts_test.rb
  119. rm test/browser/maintenance_app_version_test.rb
  120. rm test/browser/maintenance_login_message_test.rb
  121. rm test/browser/maintenance_mode_test.rb
  122. rm test/browser/maintenance_session_message_test.rb
  123. rm test/browser/manage_test.rb
  124. rm test/browser/monitoring_test.rb
  125. rm test/browser/preferences_language_test.rb
  126. rm test/browser/preferences_permission_check_test.rb
  127. rm test/browser/preferences_token_access_test.rb
  128. rm test/browser/setting_test.rb
  129. rm test/browser/signup_password_change_and_reset_test.rb
  130. rm test/browser/switch_to_user_test.rb
  131. rm test/browser/taskbar_session_test.rb
  132. rm test/browser/taskbar_task_test.rb
  133. rm test/browser/translation_test.rb
  134. # test/browser/user_access_permissions_test.rb
  135. # test/browser/user_switch_cache_test.rb
  136. elif [ "$LEVEL" == '3' ]; then
  137. echo "slicing level 3"
  138. # only ticket action 2/3
  139. # test/browser/aaa_getting_started_test.rb
  140. rm test/browser/aab_basic_urls_test.rb
  141. rm test/browser/aab_unit_test.rb
  142. rm test/browser/aac_basic_richtext_test.rb
  143. # test/browser/abb_one_group_test.rb
  144. rm test/browser/admin_channel_email_test.rb
  145. rm test/browser/admin_calendar_sla_test.rb
  146. rm test/browser/admin_object_manager_test.rb
  147. rm test/browser/admin_object_manager_tree_select_test.rb
  148. rm test/browser/admin_overview_test.rb
  149. rm test/browser/admin_role_test.rb
  150. rm test/browser/agent_navigation_and_title_test.rb
  151. rm test/browser/agent_organization_profile_test.rb
  152. # test/browser/agent_ticket_attachment_test.rb
  153. # test/browser/agent_ticket_auto_assignment_test.rb
  154. #rm test/browser/agent_ticket_create_cc_tokenizer_test.rb
  155. # test/browser/agent_ticket_create_reset_customer_selection_test.rb
  156. # test/browser/agent_ticket_create_template_test.rb
  157. # test/browser/agent_ticket_email_reply_keep_body_test.rb
  158. # test/browser/agent_ticket_email_signature_test.rb
  159. # test/browser/agent_ticket_link_test.rb
  160. # test/browser/agent_ticket_macro_test.rb
  161. rm test/browser/agent_ticket_merge_test.rb
  162. rm test/browser/agent_ticket_online_notification_test.rb
  163. rm test/browser/agent_ticket_overview_level0_test.rb
  164. rm test/browser/agent_ticket_overview_level1_test.rb
  165. rm test/browser/agent_ticket_overview_tab_test.rb
  166. # test/browser/agent_ticket_tag_test.rb
  167. rm test/browser/agent_ticket_text_module_test.rb
  168. rm test/browser/agent_ticket_time_accounting_test.rb
  169. rm test/browser/agent_ticket_update1_test.rb
  170. rm test/browser/agent_ticket_update2_test.rb
  171. rm test/browser/agent_ticket_update3_test.rb
  172. rm test/browser/agent_ticket_update4_test.rb
  173. rm test/browser/agent_ticket_update_and_reload_test.rb
  174. rm test/browser/agent_user_manage_test.rb
  175. rm test/browser/agent_user_profile_test.rb
  176. rm test/browser/auth_test.rb
  177. rm test/browser/chat_test.rb
  178. rm test/browser/customer_ticket_create_fields_test.rb
  179. rm test/browser/customer_ticket_create_test.rb
  180. rm test/browser/first_steps_test.rb
  181. rm test/browser/form_test.rb
  182. rm test/browser/integration_test.rb
  183. rm test/browser/keyboard_shortcuts_test.rb
  184. rm test/browser/maintenance_app_version_test.rb
  185. rm test/browser/maintenance_login_message_test.rb
  186. rm test/browser/maintenance_mode_test.rb
  187. rm test/browser/maintenance_session_message_test.rb
  188. rm test/browser/manage_test.rb
  189. rm test/browser/monitoring_test.rb
  190. rm test/browser/preferences_language_test.rb
  191. rm test/browser/preferences_permission_check_test.rb
  192. rm test/browser/preferences_token_access_test.rb
  193. rm test/browser/setting_test.rb
  194. rm test/browser/signup_password_change_and_reset_test.rb
  195. rm test/browser/switch_to_user_test.rb
  196. rm test/browser/taskbar_session_test.rb
  197. rm test/browser/taskbar_task_test.rb
  198. rm test/browser/translation_test.rb
  199. rm test/browser/user_access_permissions_test.rb
  200. rm test/browser/user_switch_cache_test.rb
  201. elif [ "$LEVEL" == '4' ]; then
  202. echo "slicing level 4"
  203. # only ticket action 3/3
  204. # test/browser/aaa_getting_started_test.rb
  205. rm test/browser/aab_basic_urls_test.rb
  206. rm test/browser/aab_unit_test.rb
  207. rm test/browser/aac_basic_richtext_test.rb
  208. # test/browser/abb_one_group_test.rb
  209. rm test/browser/admin_channel_email_test.rb
  210. rm test/browser/admin_calendar_sla_test.rb
  211. rm test/browser/admin_object_manager_test.rb
  212. rm test/browser/admin_object_manager_tree_select_test.rb
  213. rm test/browser/admin_overview_test.rb
  214. rm test/browser/admin_role_test.rb
  215. rm test/browser/agent_navigation_and_title_test.rb
  216. rm test/browser/agent_organization_profile_test.rb
  217. rm test/browser/agent_ticket_attachment_test.rb
  218. rm test/browser/agent_ticket_auto_assignment_test.rb
  219. rm test/browser/agent_ticket_create_cc_tokenizer_test.rb
  220. rm test/browser/agent_ticket_create_reset_customer_selection_test.rb
  221. rm test/browser/agent_ticket_create_template_test.rb
  222. rm test/browser/agent_ticket_email_reply_keep_body_test.rb
  223. rm test/browser/agent_ticket_email_signature_test.rb
  224. rm test/browser/agent_ticket_link_test.rb
  225. rm test/browser/agent_ticket_macro_test.rb
  226. rm test/browser/agent_ticket_merge_test.rb
  227. # test/browser/agent_ticket_online_notification_test.rb
  228. # test/browser/agent_ticket_overview_level0_test.rb
  229. # test/browser/agent_ticket_overview_level1_test.rb
  230. # test/browser/agent_ticket_overview_tab_test.rb
  231. rm test/browser/agent_ticket_tag_test.rb
  232. rm test/browser/agent_ticket_text_module_test.rb
  233. rm test/browser/agent_ticket_time_accounting_test.rb
  234. rm test/browser/agent_ticket_update1_test.rb
  235. rm test/browser/agent_ticket_update2_test.rb
  236. rm test/browser/agent_ticket_update3_test.rb
  237. rm test/browser/agent_ticket_update4_test.rb
  238. rm test/browser/agent_ticket_update_and_reload_test.rb
  239. rm test/browser/agent_user_manage_test.rb
  240. rm test/browser/agent_user_profile_test.rb
  241. rm test/browser/auth_test.rb
  242. rm test/browser/chat_test.rb
  243. # test/browser/customer_ticket_create_fields_test.rb
  244. # test/browser/customer_ticket_create_test.rb
  245. rm test/browser/first_steps_test.rb
  246. rm test/browser/form_test.rb
  247. rm test/browser/integration_test.rb
  248. rm test/browser/keyboard_shortcuts_test.rb
  249. rm test/browser/maintenance_app_version_test.rb
  250. rm test/browser/maintenance_login_message_test.rb
  251. rm test/browser/maintenance_mode_test.rb
  252. rm test/browser/maintenance_session_message_test.rb
  253. rm test/browser/manage_test.rb
  254. rm test/browser/monitoring_test.rb
  255. rm test/browser/preferences_language_test.rb
  256. rm test/browser/preferences_permission_check_test.rb
  257. rm test/browser/preferences_token_access_test.rb
  258. rm test/browser/setting_test.rb
  259. rm test/browser/signup_password_change_and_reset_test.rb
  260. rm test/browser/switch_to_user_test.rb
  261. rm test/browser/taskbar_session_test.rb
  262. rm test/browser/taskbar_task_test.rb
  263. rm test/browser/translation_test.rb
  264. rm test/browser/user_access_permissions_test.rb
  265. rm test/browser/user_switch_cache_test.rb
  266. elif [ "$LEVEL" == '5' ]; then
  267. echo "slicing level 5"
  268. # only profile action & admin
  269. rm test/browser/aab_basic_urls_test.rb
  270. rm test/browser/aab_unit_test.rb
  271. rm test/browser/aac_basic_richtext_test.rb
  272. # test/browser/abb_one_group_test.rb
  273. # test/browser/admin_channel_email_test.rb
  274. # test/browser/admin_calendar_sla_test.rb
  275. # test/browser/admin_object_manager_test.rb
  276. # test/browser/admin_object_manager_tree_select_test.rb
  277. # test/browser/admin_overview_test.rb
  278. rm test/browser/admin_role_test.rb
  279. rm test/browser/agent_navigation_and_title_test.rb
  280. rm test/browser/agent_organization_profile_test.rb
  281. rm test/browser/agent_ticket_attachment_test.rb
  282. rm test/browser/agent_ticket_auto_assignment_test.rb
  283. rm test/browser/agent_ticket_create_cc_tokenizer_test.rb
  284. rm test/browser/agent_ticket_create_reset_customer_selection_test.rb
  285. rm test/browser/agent_ticket_create_template_test.rb
  286. rm test/browser/agent_ticket_email_reply_keep_body_test.rb
  287. rm test/browser/agent_ticket_email_signature_test.rb
  288. rm test/browser/agent_ticket_link_test.rb
  289. rm test/browser/agent_ticket_macro_test.rb
  290. rm test/browser/agent_ticket_merge_test.rb
  291. rm test/browser/agent_ticket_online_notification_test.rb
  292. rm test/browser/agent_ticket_overview_level0_test.rb
  293. rm test/browser/agent_ticket_overview_level1_test.rb
  294. rm test/browser/agent_ticket_overview_tab_test.rb
  295. rm test/browser/agent_ticket_tag_test.rb
  296. rm test/browser/agent_ticket_text_module_test.rb
  297. rm test/browser/agent_ticket_time_accounting_test.rb
  298. rm test/browser/agent_ticket_update1_test.rb
  299. rm test/browser/agent_ticket_update2_test.rb
  300. rm test/browser/agent_ticket_update3_test.rb
  301. rm test/browser/agent_ticket_update4_test.rb
  302. rm test/browser/agent_ticket_update_and_reload_test.rb
  303. # test/browser/agent_user_manage_test.rb
  304. # test/browser/agent_user_profile_test.rb
  305. rm test/browser/auth_test.rb
  306. rm test/browser/chat_test.rb
  307. rm test/browser/customer_ticket_create_fields_test.rb
  308. rm test/browser/customer_ticket_create_test.rb
  309. rm test/browser/first_steps_test.rb
  310. rm test/browser/form_test.rb
  311. rm test/browser/integration_test.rb
  312. rm test/browser/keyboard_shortcuts_test.rb
  313. rm test/browser/maintenance_app_version_test.rb
  314. rm test/browser/maintenance_login_message_test.rb
  315. rm test/browser/maintenance_mode_test.rb
  316. rm test/browser/maintenance_session_message_test.rb
  317. rm test/browser/manage_test.rb
  318. rm test/browser/monitoring_test.rb
  319. rm test/browser/preferences_language_test.rb
  320. rm test/browser/preferences_permission_check_test.rb
  321. rm test/browser/preferences_token_access_test.rb
  322. rm test/browser/setting_test.rb
  323. rm test/browser/signup_password_change_and_reset_test.rb
  324. rm test/browser/switch_to_user_test.rb
  325. rm test/browser/taskbar_session_test.rb
  326. rm test/browser/taskbar_task_test.rb
  327. rm test/browser/translation_test.rb
  328. rm test/browser/user_access_permissions_test.rb
  329. rm test/browser/user_switch_cache_test.rb
  330. elif [ "$LEVEL" == '6' ]; then
  331. echo "slicing level 6"
  332. # only profile action & admin
  333. rm test/browser/aaa_getting_started_test.rb
  334. cp contrib/auto_wizard_test.json auto_wizard.json
  335. cp test/integration/aaa_auto_wizard_base_setup_test.rb test/browser/aaa_auto_wizard_base_setup_test.rb
  336. rm test/browser/aab_basic_urls_test.rb
  337. rm test/browser/aab_unit_test.rb
  338. rm test/browser/aac_basic_richtext_test.rb
  339. rm test/browser/abb_one_group_test.rb
  340. rm test/browser/admin_channel_email_test.rb
  341. rm test/browser/admin_calendar_sla_test.rb
  342. rm test/browser/admin_object_manager_test.rb
  343. rm test/browser/admin_object_manager_tree_select_test.rb
  344. rm test/browser/admin_overview_test.rb
  345. rm test/browser/admin_role_test.rb
  346. rm test/browser/agent_navigation_and_title_test.rb
  347. rm test/browser/agent_organization_profile_test.rb
  348. rm test/browser/agent_ticket_attachment_test.rb
  349. rm test/browser/agent_ticket_auto_assignment_test.rb
  350. rm test/browser/agent_ticket_create_cc_tokenizer_test.rb
  351. rm test/browser/agent_ticket_create_reset_customer_selection_test.rb
  352. rm test/browser/agent_ticket_create_template_test.rb
  353. rm test/browser/agent_ticket_email_reply_keep_body_test.rb
  354. rm test/browser/agent_ticket_email_signature_test.rb
  355. rm test/browser/agent_ticket_link_test.rb
  356. rm test/browser/agent_ticket_macro_test.rb
  357. rm test/browser/agent_ticket_merge_test.rb
  358. rm test/browser/agent_ticket_online_notification_test.rb
  359. rm test/browser/agent_ticket_overview_level0_test.rb
  360. rm test/browser/agent_ticket_overview_level1_test.rb
  361. rm test/browser/agent_ticket_overview_tab_test.rb
  362. rm test/browser/agent_ticket_tag_test.rb
  363. rm test/browser/agent_ticket_text_module_test.rb
  364. rm test/browser/agent_ticket_time_accounting_test.rb
  365. rm test/browser/agent_ticket_update1_test.rb
  366. rm test/browser/agent_ticket_update2_test.rb
  367. rm test/browser/agent_ticket_update3_test.rb
  368. rm test/browser/agent_ticket_update4_test.rb
  369. rm test/browser/agent_ticket_update_and_reload_test.rb
  370. rm test/browser/agent_user_manage_test.rb
  371. rm test/browser/agent_user_profile_test.rb
  372. rm test/browser/auth_test.rb
  373. # test/browser/chat_test.rb
  374. rm test/browser/customer_ticket_create_fields_test.rb
  375. rm test/browser/customer_ticket_create_test.rb
  376. # test/browser/first_steps_test.rb
  377. rm test/browser/form_test.rb
  378. # test/browser/integration_test.rb
  379. # test/browser/keyboard_shortcuts_test.rb
  380. rm test/browser/maintenance_app_version_test.rb
  381. rm test/browser/maintenance_login_message_test.rb
  382. rm test/browser/maintenance_mode_test.rb
  383. rm test/browser/maintenance_session_message_test.rb
  384. rm test/browser/manage_test.rb
  385. rm test/browser/monitoring_test.rb
  386. # test/browser/preferences_language_test.rb
  387. # test/browser/preferences_permission_check_test.rb
  388. # test/browser/preferences_token_access_test.rb
  389. # test/browser/setting_test.rb
  390. rm test/browser/signup_password_change_and_reset_test.rb
  391. rm test/browser/switch_to_user_test.rb
  392. rm test/browser/taskbar_session_test.rb
  393. rm test/browser/taskbar_task_test.rb
  394. rm test/browser/translation_test.rb
  395. rm test/browser/user_access_permissions_test.rb
  396. rm test/browser/user_switch_cache_test.rb
  397. else
  398. echo "ERROR: Invalid level $LEVEL - 1, 2, 3, 4, 5 or 6 is available"
  399. exit 1
  400. fi