| OLD | NEW |
| 1 # Copyright 2014 The LUCI Authors. All rights reserved. | 1 # Copyright 2014 The LUCI Authors. All rights reserved. |
| 2 # Use of this source code is governed under the Apache License, Version 2.0 | 2 # Use of this source code is governed under the Apache License, Version 2.0 |
| 3 # that can be found in the LICENSE file. | 3 # that can be found in the LICENSE file. |
| 4 | 4 |
| 5 """Generates the swarming_bot.zip archive for the bot. | 5 """Generates the swarming_bot.zip archive for the bot. |
| 6 | 6 |
| 7 Unlike the other source files, this file can be run from ../tools/bot_archive.py | 7 Unlike the other source files, this file can be run from ../tools/bot_archive.py |
| 8 stand-alone to generate a swarming_bot.zip for local testing so it doesn't | 8 stand-alone to generate a swarming_bot.zip for local testing so it doesn't |
| 9 import anything from the AppEngine SDK. | 9 import anything from the AppEngine SDK. |
| 10 | 10 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 'infra_libs/ts_mon/common/errors.py', | 80 'infra_libs/ts_mon/common/errors.py', |
| 81 'infra_libs/ts_mon/common/helpers.py', | 81 'infra_libs/ts_mon/common/helpers.py', |
| 82 'infra_libs/ts_mon/common/http_metrics.py', | 82 'infra_libs/ts_mon/common/http_metrics.py', |
| 83 'infra_libs/ts_mon/common/interface.py', | 83 'infra_libs/ts_mon/common/interface.py', |
| 84 'infra_libs/ts_mon/common/metric_store.py', | 84 'infra_libs/ts_mon/common/metric_store.py', |
| 85 'infra_libs/ts_mon/common/metrics.py', | 85 'infra_libs/ts_mon/common/metrics.py', |
| 86 'infra_libs/ts_mon/common/monitors.py', | 86 'infra_libs/ts_mon/common/monitors.py', |
| 87 'infra_libs/ts_mon/common/pb_to_popo.py', | 87 'infra_libs/ts_mon/common/pb_to_popo.py', |
| 88 'infra_libs/ts_mon/common/standard_metrics.py', | 88 'infra_libs/ts_mon/common/standard_metrics.py', |
| 89 'infra_libs/ts_mon/common/targets.py', | 89 'infra_libs/ts_mon/common/targets.py', |
| 90 'infra_libs/ts_mon/config.proto', | |
| 91 'infra_libs/ts_mon/config.py', | 90 'infra_libs/ts_mon/config.py', |
| 92 'infra_libs/ts_mon/protos/__init__.py', | 91 'infra_libs/ts_mon/protos/__init__.py', |
| 93 'infra_libs/ts_mon/protos/current/__init__.py', | 92 'infra_libs/ts_mon/protos/acquisition_network_device_pb2.py', |
| 94 'infra_libs/ts_mon/protos/current/acquisition_network_device.proto', | 93 'infra_libs/ts_mon/protos/acquisition_task_pb2.py', |
| 95 'infra_libs/ts_mon/protos/current/acquisition_network_device_pb2.py', | 94 'infra_libs/ts_mon/protos/any_pb2.py', |
| 96 'infra_libs/ts_mon/protos/current/acquisition_task.proto', | 95 'infra_libs/ts_mon/protos/metrics_pb2.py', |
| 97 'infra_libs/ts_mon/protos/current/acquisition_task_pb2.py', | 96 'infra_libs/ts_mon/protos/timestamp_pb2.py', |
| 98 'infra_libs/ts_mon/protos/current/metrics.proto', | |
| 99 'infra_libs/ts_mon/protos/current/metrics_pb2.py', | |
| 100 'infra_libs/ts_mon/protos/new/__init__.py', | |
| 101 'infra_libs/ts_mon/protos/new/acquisition_network_device.proto', | |
| 102 'infra_libs/ts_mon/protos/new/acquisition_network_device_pb2.py', | |
| 103 'infra_libs/ts_mon/protos/new/acquisition_task.proto', | |
| 104 'infra_libs/ts_mon/protos/new/acquisition_task_pb2.py', | |
| 105 'infra_libs/ts_mon/protos/new/any.proto', | |
| 106 'infra_libs/ts_mon/protos/new/any_pb2.py', | |
| 107 'infra_libs/ts_mon/protos/new/metrics.proto', | |
| 108 'infra_libs/ts_mon/protos/new/metrics_pb2.py', | |
| 109 'infra_libs/ts_mon/protos/new/timestamp.proto', | |
| 110 'infra_libs/ts_mon/protos/new/timestamp_pb2.py', | |
| 111 'infra_libs/utils.py', | 97 'infra_libs/utils.py', |
| 112 'libs/__init__.py', | 98 'libs/__init__.py', |
| 113 'libs/arfile/__init__.py', | 99 'libs/arfile/__init__.py', |
| 114 'libs/arfile/arfile.py', | 100 'libs/arfile/arfile.py', |
| 115 'libs/luci_context/__init__.py', | 101 'libs/luci_context/__init__.py', |
| 116 'libs/luci_context/luci_context.py', | 102 'libs/luci_context/luci_context.py', |
| 117 'proto_bot/__init__.py', | 103 'proto_bot/__init__.py', |
| 118 'proto_bot/swarming_bot_pb2.py', | 104 'proto_bot/swarming_bot_pb2.py', |
| 119 'python_libusb1/__init__.py', | 105 'python_libusb1/__init__.py', |
| 120 'python_libusb1/libusb1.py', | 106 'python_libusb1/libusb1.py', |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 h.update(str(len(name))) | 458 h.update(str(len(name))) |
| 473 h.update(name) | 459 h.update(name) |
| 474 h.update(str(len(content))) | 460 h.update(str(len(content))) |
| 475 h.update(content) | 461 h.update(content) |
| 476 except IOError: | 462 except IOError: |
| 477 logging.warning('Missing expected file. Hash will be invalid.') | 463 logging.warning('Missing expected file. Hash will be invalid.') |
| 478 bot_version = h.hexdigest() | 464 bot_version = h.hexdigest() |
| 479 logging.info( | 465 logging.info( |
| 480 'get_swarming_bot_version(%s) = %s', sorted(additionals), bot_version) | 466 'get_swarming_bot_version(%s) = %s', sorted(additionals), bot_version) |
| 481 return bot_version | 467 return bot_version |
| OLD | NEW |