You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ho...@apache.org on 2024/02/07 17:14:54 UTC
(solr) branch branch_9x updated: SOLR-15960: Find unexported variables with compgen (#2250)
This is an automated email from the ASF dual-hosted git repository.
houston 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 f9744939e92 SOLR-15960: Find unexported variables with compgen (#2250)
f9744939e92 is described below
commit f9744939e92d0957f41316c06b1d65e548c87c70
Author: Houston Putman <ho...@apache.org>
AuthorDate: Wed Feb 7 12:11:39 2024 -0500
SOLR-15960: Find unexported variables with compgen (#2250)
(cherry picked from commit f23c8deb18862a84af055bf71c5e6f6dd9f960f9)
---
solr/bin/solr | 2 +-
solr/packaging/test/test_modules.bats | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/solr/bin/solr b/solr/bin/solr
index 331c8e54461..f6ce4027f56 100755
--- a/solr/bin/solr
+++ b/solr/bin/solr
@@ -113,7 +113,7 @@ elif [ -r "$SOLR_INCLUDE" ]; then
fi
# Export variables we want to make visible to Solr sub-process
-for var in $(compgen -e); do
+for var in $(compgen -v); do
if [[ "$var" =~ ^(SOLR_.*|DEFAULT_CONFDIR|ZK_.*|GCS_BUCKET|GCS_.*|S3_.*|OTEL_.*|AWS_.*)$ ]]; then
export "${var?}"
fi
diff --git a/solr/packaging/test/test_modules.bats b/solr/packaging/test/test_modules.bats
index 17ba8912661..698a5f2bbda 100644
--- a/solr/packaging/test/test_modules.bats
+++ b/solr/packaging/test/test_modules.bats
@@ -61,7 +61,11 @@ teardown() {
}
@test "icu collation in analysis-extras module" {
- run solr start -c -Dsolr.modules=analysis-extras
+ local solr_include_file="${BATS_TEST_TMPDIR}/solr.include"
+ echo "SOLR_MODULES=analysis-extras" > "${solr_include_file}"
+
+ export SOLR_INCLUDE="${solr_include_file}"
+ run solr start -c
run solr create_collection -c COLL_NAME -d test/analysis_extras_config/conf
assert_output --partial "Created collection 'COLL_NAME'"
}