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/05 19:44:07 UTC
[solr] branch branch_9_0 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_9_0
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_9_0 by this push:
new 13b44d836f6 Revert "SOLR-16133 Use tempfile module in smoketester (#806)"
13b44d836f6 is described below
commit 13b44d836f620c449a02ca399ceabb2670c22ca6
Author: Mike Drob <md...@apache.org>
AuthorDate: Thu May 5 14:43:44 2022 -0500
Revert "SOLR-16133 Use tempfile module in smoketester (#806)"
This reverts commit 9f5ba9d5772f39da3a5999183524e5b57d77038c.
---
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):