(java, artifact, unpackPath, version, testArgs)
| 602 | raise RuntimeError('unpack produced entries %s; expected only %s' % (l, expected)) |
| 603 | |
| 604 | return '%s/%s' % (destDir, expected) |
| 605 | |
| 606 | SOLR_NOTICE = None |
| 607 | SOLR_LICENSE = None |
| 608 | |
| 609 | def is_in_list(in_folder, files, indent=4): |
| 610 | for file_name in files: |
| 611 | print("%sChecking %s" % (" "*indent, file_name)) |
| 612 | found = False |
| 613 | for f in [file_name, file_name + '.txt', file_name + '.md']: |
| 614 | if f in in_folder: |
| 615 | in_folder.remove(f) |
| 616 | found = True |
| 617 | if not found: |
| 618 | raise RuntimeError('file "%s" is missing' % file_name) |
| 619 | |
| 620 | |
| 621 | def verifySrcUnpacked(java, artifact, unpackPath, version, testArgs): |
| 622 | # The source release is everything in source control minus excluded paths, so we don't |
| 623 | # check that it has specific things — the build will fail if something critical is missing. |
| 624 | # Also the binary release checks for presence of things that come from source control, so we're |
| 625 | # covered that way too. |
| 626 | os.chdir(unpackPath) |
| 627 | print(" %s" % artifact) |
| 628 | |
| 629 | print(' make sure no JARs/WARs in src dist...') |
| 630 | lines = os.popen('find . -name \\*.jar').readlines() |
| 631 | if len(lines) != 0: |
| 632 | print(' FAILED:') |
| 633 | for line in lines: |
| 634 | print(' %s' % line.strip()) |
| 635 | raise RuntimeError('source release has JARs...') |
| 636 | lines = os.popen('find . -name \\*.war').readlines() |
| 637 | if len(lines) != 0: |
| 638 | print(' FAILED:') |
| 639 | for line in lines: |
| 640 | print(' %s' % line.strip()) |
| 641 | raise RuntimeError('source release has WARs...') |
| 642 | |
| 643 | logDir = '%s/build' % unpackPath |
| 644 | os.makedirs(logDir, exist_ok=True) |
| 645 | |
| 646 | validateCmd = './gradlew rat' |
| 647 | print(' run "%s"' % validateCmd) |
no test coverage detected
searching dependent graphs…