AU/unittest: fix to OmahaResponseHandlerAction unit tests

The said class uses a fixed named file for communicating data (in this
case, a deadline marker) to Chrome, which causes unit tests to fail when
run in parallel. This change makes this file parametric for testing
purposes, allowing the tests to be run in parallel.

Note that we only override the file name for tests that actually examine
the file. For other invocations there may still be race conditions when
writing to the marker file, but they should not affect the outcome of
the tests.

BUG=chromium:236465
TEST=Tests successful

Change-Id: Ieb2a3ef1b4d9c5d5d2e06cf8e281eb832b2a9ff8
Reviewed-on: https://gerrit.chromium.org/gerrit/62825
Tested-by: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Queue: Gilad Arnold <garnold@chromium.org>
3 files changed
tree: 951d08dbd544e6cd3e35dadcca85e89bbf6d6e2b
  1. .gitignore
  2. 99-gpio-dutflag.rules
  3. action.h
  4. action_mock.h
  5. action_pipe.h
  6. action_pipe_unittest.cc
  7. action_processor.cc
  8. action_processor.h
  9. action_processor_mock.h
  10. action_processor_unittest.cc
  11. action_unittest.cc
  12. build
  13. bzip.cc
  14. bzip.h
  15. bzip_extent_writer.cc
  16. bzip_extent_writer.h
  17. bzip_extent_writer_unittest.cc
  18. certificate_checker.cc
  19. certificate_checker.h
  20. certificate_checker_mock.h
  21. certificate_checker_unittest.cc
  22. chrome_browser_proxy_resolver.cc
  23. chrome_browser_proxy_resolver.h
  24. chrome_browser_proxy_resolver_unittest.cc
  25. chrome_proxy_resolver.cc
  26. chrome_proxy_resolver.h
  27. chrome_proxy_resolver_unittest.cc
  28. clock.cc
  29. clock.h
  30. clock_interface.h
  31. connection_manager.cc
  32. connection_manager.h
  33. connection_manager_unittest.cc
  34. constants.cc
  35. constants.h
  36. cycle_breaker.cc
  37. cycle_breaker.h
  38. cycle_breaker_unittest.cc
  39. dbus_constants.h
  40. dbus_interface.h
  41. dbus_service.cc
  42. dbus_service.h
  43. delta_diff_generator.cc
  44. delta_diff_generator.h
  45. delta_diff_generator_unittest.cc
  46. delta_performer.cc
  47. delta_performer.h
  48. delta_performer_unittest.cc
  49. download_action.cc
  50. download_action.h
  51. download_action_unittest.cc
  52. error_code.h
  53. extent_mapper.cc
  54. extent_mapper.h
  55. extent_mapper_unittest.cc
  56. extent_ranges.cc
  57. extent_ranges.h
  58. extent_ranges_unittest.cc
  59. extent_writer.cc
  60. extent_writer.h
  61. extent_writer_unittest.cc
  62. fake_clock.h
  63. file_descriptor.cc
  64. file_descriptor.h
  65. file_writer.cc
  66. file_writer.h
  67. file_writer_mock.h
  68. file_writer_unittest.cc
  69. filesystem_copier_action.cc
  70. filesystem_copier_action.h
  71. filesystem_copier_action_unittest.cc
  72. filesystem_iterator.cc
  73. filesystem_iterator.h
  74. filesystem_iterator_unittest.cc
  75. full_update_generator.cc
  76. full_update_generator.h
  77. full_update_generator_unittest.cc
  78. gen_coverage_html
  79. generate_delta_main.cc
  80. gpio_handler.cc
  81. gpio_handler.h
  82. gpio_handler_unittest.cc
  83. gpio_handler_unittest.h
  84. gpio_mock_file_descriptor.cc
  85. gpio_mock_file_descriptor.h
  86. gpio_mock_udev_interface.cc
  87. gpio_mock_udev_interface.h
  88. graph_types.h
  89. graph_utils.cc
  90. graph_utils.h
  91. graph_utils_unittest.cc
  92. http_common.cc
  93. http_common.h
  94. http_fetcher.cc
  95. http_fetcher.h
  96. http_fetcher_unittest.cc
  97. inherit-review-settings-ok
  98. install_plan.cc
  99. install_plan.h
  100. integration_unittest.cc
  101. libcurl_http_fetcher.cc
  102. libcurl_http_fetcher.h
  103. LICENSE
  104. local_coverage_rate
  105. main.cc
  106. marshal.list
  107. metadata.cc
  108. metadata.h
  109. metadata_unittest.cc
  110. mock_connection_manager.h
  111. mock_dbus_interface.h
  112. mock_file_writer.h
  113. mock_gpio_handler.h
  114. mock_http_fetcher.cc
  115. mock_http_fetcher.h
  116. mock_payload_state.h
  117. mock_system_state.cc
  118. mock_system_state.h
  119. multi_range_http_fetcher.cc
  120. multi_range_http_fetcher.h
  121. omaha_hash_calculator.cc
  122. omaha_hash_calculator.h
  123. omaha_hash_calculator_unittest.cc
  124. omaha_request_action.cc
  125. omaha_request_action.h
  126. omaha_request_action_unittest.cc
  127. omaha_request_params.cc
  128. omaha_request_params.h
  129. omaha_request_params_unittest.cc
  130. omaha_response.h
  131. omaha_response_handler_action.cc
  132. omaha_response_handler_action.h
  133. omaha_response_handler_action_unittest.cc
  134. org.chromium.UpdateEngine.service
  135. payload_signer.cc
  136. payload_signer.h
  137. payload_signer_unittest.cc
  138. payload_state.cc
  139. payload_state.h
  140. payload_state_interface.h
  141. payload_state_unittest.cc
  142. postinstall_runner_action.cc
  143. postinstall_runner_action.h
  144. postinstall_runner_action_unittest.cc
  145. prefs.cc
  146. prefs.h
  147. prefs_interface.h
  148. prefs_mock.h
  149. prefs_unittest.cc
  150. proxy_resolver.cc
  151. proxy_resolver.h
  152. real_system_state.h
  153. run_unittests
  154. sample_omaha_v3_response.xml
  155. SConstruct
  156. setup_dev_packages
  157. simple_key_value_store.cc
  158. simple_key_value_store.h
  159. simple_key_value_store_unittest.cc
  160. subprocess.cc
  161. subprocess.h
  162. subprocess_unittest.cc
  163. system_state.cc
  164. system_state.h
  165. tarjan.cc
  166. tarjan.h
  167. tarjan_unittest.cc
  168. terminator.cc
  169. terminator.h
  170. terminator_unittest.cc
  171. test_http_server.cc
  172. test_utils.cc
  173. test_utils.h
  174. testrunner.cc
  175. topological_sort.cc
  176. topological_sort.h
  177. topological_sort_unittest.cc
  178. udev_interface.h
  179. unittest_key.pem
  180. unittest_key2.pem
  181. update_attempter.cc
  182. update_attempter.h
  183. update_attempter_mock.h
  184. update_attempter_unittest.cc
  185. update_check_scheduler.cc
  186. update_check_scheduler.h
  187. update_check_scheduler_unittest.cc
  188. update_engine.xml
  189. update_engine_client.cc
  190. update_metadata.proto
  191. UpdateEngine.conf
  192. utils.cc
  193. utils.h
  194. utils_unittest.cc
  195. WATCHLISTS
  196. zip_unittest.cc