| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b7f81ae commit afdfc4d
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1410,6 +1410,9 @@ def BuildOptions(): | |||
| 1410 | 1410 | result.add_option('--abort-on-timeout', | |
| 1411 | 1411 | help='Send SIGABRT instead of SIGTERM to kill processes that time out', | |
| 1412 | 1412 | default=False, action="store_true", dest="abort_on_timeout") | |
| 1413 | + result.add_option("--type", | ||
| 1414 | + help="Type of build (simple, fips)", | ||
| 1415 | + default=None) | ||
| 1413 | 1416 | return result | |
| 1414 | 1417 | ||
| 1415 | 1418 | ||
@@ -1559,6 +1562,21 @@ def ArgsToTestPaths(test_root, args, suites): | |||
| 1559 | 1562 | return paths | |
| 1560 | 1563 | ||
| 1561 | 1564 | ||
| 1565 | + def get_env_type(vm, options_type): | ||
| 1566 | + if options_type is not None: | ||
| 1567 | + env_type = options_type | ||
| 1568 | + else: | ||
| 1569 | + if "fips" in subprocess.check_output([vm, "-p", | ||
| 1570 | + "process.versions.openssl"]): | ||
| 1571 | + env_type = "fips" | ||
| 1572 | + # NOTE(nikhil): "simple" is the default value for var 'env_type' and should | ||
| 1573 | + # be set last if no if/elif matches. If you plan to add more values, use | ||
| 1574 | + # 'elif' above. | ||
| 1575 | + else: | ||
| 1576 | + env_type = "simple" | ||
| 1577 | + return env_type | ||
| 1578 | + | ||
| 1579 | + | ||
| 1562 | 1580 | def Main(): | |
| 1563 | 1581 | parser = BuildOptions() | |
| 1564 | 1582 | (options, args) = parser.parse_args() | |
@@ -1641,6 +1659,7 @@ def Main(): | |||
| 1641 | 1659 | 'mode': mode, | |
| 1642 | 1660 | 'system': utils.GuessOS(), | |
| 1643 | 1661 | 'arch': vmArch, | |
| 1662 | + 'type': get_env_type(vm, options.type), | ||
| 1644 | 1663 | } | |
| 1645 | 1664 | test_list = root.ListTests([], path, context, arch, mode) | |
| 1646 | 1665 | unclassified_tests += test_list | |
| Back | FazBrowse Home | New Git URL |
0 commit comments