You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by md...@apache.org on 2022/05/10 15:16:27 UTC
[solr] branch branch_9x updated: Revert "SOLR-16133 Use tempfile module in smoketester (#806)"
This is an automated email from the ASF dual-hosted git repository.
mdrob pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_9x by this push:
new 76b19591577 Revert "SOLR-16133 Use tempfile module in smoketester (#806)"
76b19591577 is described below
commit 76b1959157721d92edcf2a45e41dbed62e189fd0
Author: Mike Drob <md...@apache.org>
AuthorDate: Tue May 10 10:16:10 2022 -0500
Revert "SOLR-16133 Use tempfile module in smoketester (#806)"
This reverts commit 1de3b049dc08af7e5e98afa3e9e3b5eafdd09c9a.
---
dev-tools/scripts/smokeTestRelease.py | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/dev-tools/scripts/smokeTestRelease.py b/dev-tools/scripts/smokeTestRelease.py
index dc9b76dbf79..1a715c67f70 100755
--- a/dev-tools/scripts/smokeTestRelease.py
+++ b/dev-tools/scripts/smokeTestRelease.py
@@ -27,7 +27,6 @@ import re
import shutil
import subprocess
import sys
-import tempfile
import textwrap
import traceback
import urllib.error
@@ -1014,7 +1013,7 @@ def parse_config():
parser = argparse.ArgumentParser(description=description, epilog=epilogue,
formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument('--tmp-dir', metavar='PATH',
- help='Temporary directory to test inside, defaults to $TMPDIR/smoke_solr_$version_$revision ')
+ help='Temporary directory to test inside, defaults to /tmp/smoke_solr_$version_$revision')
parser.add_argument('--not-signed', dest='is_signed', action='store_false', default=True,
help='Indicates the release is not signed')
parser.add_argument('--local-keys', metavar='PATH',
@@ -1058,7 +1057,12 @@ def parse_config():
if c.tmp_dir:
c.tmp_dir = os.path.abspath(c.tmp_dir)
else:
- c.tmp_dir = tempfile.mkdtemp(prefix = 'smoke_solr_%s_%s' % (c.version, c.revision))
+ tmp = '/tmp/smoke_solr_%s_%s' % (c.version, c.revision)
+ c.tmp_dir = tmp
+ i = 1
+ while os.path.exists(c.tmp_dir):
+ c.tmp_dir = tmp + '_%d' % i
+ i += 1
return c
@@ -1088,7 +1092,7 @@ def smokeTest(java, baseURL, gitRevision, version, tmpDir, isSigned, local_keys,
testArgs = '-Dtests.nightly=false -Dtests.badapples=false %s' % testArgs
if FORCE_CLEAN:
- if os.path.exists(tmpDir) and len(os.listdir(tmpDir)) > 0:
+ if os.path.exists(tmpDir):
raise RuntimeError('temp dir %s exists; please remove first' % tmpDir)
if not os.path.exists(tmpDir):