MCPcopy Create free account
hub / github.com/apache/impala / main

Function main

docker/test-with-docker.py:129–221  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

127
128
129def main():
130 logging.basicConfig(level=logging.INFO, format=LOG_FORMAT)
131
132 default_parallel_test_concurrency, default_suite_concurrency, default_memlimit_gb = \
133 _compute_defaults()
134 parser = argparse.ArgumentParser(
135 description=CLI_HELP, formatter_class=argparse.ArgumentDefaultsHelpFormatter)
136 group = parser.add_mutually_exclusive_group()
137 group.add_argument('--cleanup-containers', dest="cleanup_containers",
138 action='store_true', default=True,
139 help='Removes containers when finished.')
140 group.add_argument('--no-cleanup-containers',
141 dest="cleanup_containers", action='store_false')
142 group = parser.add_mutually_exclusive_group()
143 parser.add_argument(
144 '--parallel-test-concurrency', type=int,
145 default=default_parallel_test_concurrency,
146 help='For the ee-test-parallel suite, how many tests to run concurrently.')
147 parser.add_argument(
148 '--suite-concurrency', type=int, default=default_suite_concurrency,
149 help='Number of concurrent suites to run in parallel.')
150 parser.add_argument(
151 '--impalad-mem-limit-bytes', type=int, default=default_memlimit_gb,
152 help='Memlimit to pass to impalad for miniclusters.')
153 group.add_argument(
154 '--cleanup-image', dest="cleanup_image",
155 action='store_true', default=True,
156 help="Whether to remove image when done.")
157 group.add_argument('--no-cleanup-image', dest="cleanup_image", action='store_false')
158 parser.add_argument('--base-image', dest="base_image", default="ubuntu:16.04",
159 help="Base OS image to use. ubuntu:16.04 and centos:6 are known to work.")
160 parser.add_argument(
161 '--build-image', metavar='IMAGE',
162 help='Skip building, and run tests on pre-existing image.')
163
164 suite_group = parser.add_mutually_exclusive_group()
165 suite_group.add_argument(
166 '--suite', metavar='VARIANT', action='append',
167 help="""
168 Run specific test suites; can be specified multiple times.
169 Test-with-docker may shard some suites to improve parallelism.
170 If not specified, default tests are run.
171 Default: %s, All Choices: %s
172 """ % (",".join([ s.name for s in DEFAULT_SUITES]),
173 ",".join([ s.name for s in ALL_SUITES ])))
174 suite_group.add_argument('--all-suites', action='store_true', default=False,
175 help="If set, run all available suites.")
176 parser.add_argument(
177 '--name', metavar='NAME',
178 help="Use a specific name for the test run. The name is used " +
179 "as a prefix for the container and image names, and " +
180 "as part of the log directory naming. Defaults to include a timestamp.",
181 default=datetime.datetime.now().strftime("i-%Y%m%d-%H%M%S"))
182 parser.add_argument('--ccache-dir', metavar='DIR',
183 help="CCache directory to use",
184 default=os.path.expanduser("~/.ccache"))
185 parser.add_argument('--tail', action="store_true",
186 help="Run tail on all container log files.")

Callers 1

Calls 8

runMethod · 0.95
create_timelineMethod · 0.95
log_summaryMethod · 0.95
_compute_defaultsFunction · 0.85
TestWithDockerClass · 0.85
_make_dir_if_not_existFunction · 0.85
nowMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected