• Home
  • Raw
  • Download

Lines Matching +full:build +full:- +full:tests

2 """Run Python tests against multiple installations of OpenSSL and LibreSSL
14 The script must be run with Python's build directory as current working
23 (c) 2013-2017 Christian Heimes <christian@python.org>
70 "Run CPython tests with multiple OpenSSL and LibreSSL "
75 '--debug',
80 '--disable-ancient',
85 '--openssl',
94 '--libressl',
103 '--tests',
106 help="Python tests to run, defaults to all SSL related tests.",
109 '--base-directory',
114 '--no-network',
117 help="Disable network tests."
120 '--steps',
121 choices=['library', 'modules', 'tests'],
122 default='tests',
125 "or LibreSSL. 'module' also compiles Python modules. 'tests' builds "
130 '--system',
135 '--force',
138 help="Force build and installation."
141 '--keep-sources',
174 # build directory (removed after install)
214 '-c', 'import ssl; print(ssl.OPENSSL_VERSION)'
244 return out.strip().decode("utf-8")
282 # force extraction into build dir
294 """Now build openssl"""
295 log.info("Running build in {}".format(self.build_dir))
299 "shared", "--debug",
300 "--prefix={}".format(self.install_dir)
302 # cmd.extend(["no-deprecated", "--api=1.1.0"])
311 ["make", "-j1", self.depend_target], cwd=cwd, env=env
313 self._subprocess_call(["make", f"-j{self.jobs}"], cwd=cwd, env=env)
317 ["make", "-j1", self.install_target],
345 log.warning("Using build from {}".format(self.build_dir))
349 # remove all build artefacts
350 for root, dirs, files in os.walk('build'):
357 env["CPPFLAGS"] = "-I{}".format(self.include_dir)
358 env["LDFLAGS"] = "-L{}".format(self.lib_dir)
363 cmd = [sys.executable, os.path.join(PYTHONROOT, "setup.py"), "build"]
368 cmd = [sys.executable, "-c", "import _ssl; import _hashlib"]
376 def run_python_tests(self, tests, network=True): argument
377 if not tests:
381 '-j0'
384 cmd = [sys.executable, '-m', 'test.regrtest']
386 cmd = [sys.executable, '-m', 'test', '-j0']
388 cmd.extend(['-u', 'network', '-u', 'urlfetch'])
389 cmd.extend(['-w', '-r'])
390 cmd.extend(tests)
397 "https://www.openssl.org/source/openssl-{v}.tar.gz",
398 "https://www.openssl.org/source/old/{s}/openssl-{v}.tar.gz"
400 src_template = "openssl-{}.tar.gz"
401 build_template = "openssl-{}"
412 config_args += ("enable-fips",)
419 ["make", "-j1", "install_ssldirs", "install_fips"],
423 # 3.0.0-beta2 uses lib64 on 64 bit platforms
435 # OpenSSL 3.0.0 -> /old/3.0/
442 "https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-{v}.tar.gz",
444 src_template = "libressl-{}.tar.gz"
445 build_template = "libressl-{}"
452 './configure', '--config-cache', '--quiet',
453 '--with-pydebug'
457 subprocess.check_call(['make', '--quiet'])
476 if args.steps in {'modules', 'tests'}:
480 "Must be executed from CPython build dir"
484 "Must be executed with ./python from CPython build dir"
493 build = BuildOpenSSL(
497 build.install()
498 builds.append(build)
501 build = BuildLibreSSL(
505 build.install()
506 builds.append(build)
508 if args.steps in {'modules', 'tests'}:
509 for build in builds:
511 build.recompile_pymods()
512 build.check_pyssl()
513 if args.steps == 'tests':
514 build.run_python_tests(
515 tests=args.tests,
519 log.exception("%s failed", build)
520 print("{} failed: {}".format(build, e), file=sys.stderr)
525 datetime.now() - start
528 if args.steps == 'tests':
529 if args.tests:
530 print('Executed Tests:', ' '.join(args.tests))
532 print('Executed all SSL tests.')
535 for build in builds:
536 print(" * {0.library} {0.version}".format(build))