Skip to content

Commit

Permalink
enhance the function getProperty() to deal with quotations (#3008)
Browse files Browse the repository at this point in the history
* enhance the function getProperty() to deal with quotations

reword removed the echo  in getProperty()

reword removed the logic of parsing and removing the quotes in set_test_info()

reword updated set_test_info()

updated set_test_info() to resolve conflict

* modified set_test_info()

* modified line 226
  • Loading branch information
norbline authored Oct 27, 2021
1 parent b12e3cf commit 44d27bf
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions external/common_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ function set_build() {
function getProperty() {
PROP_KEY=$1
PROP_VALUE=`cat $PROPERTY_FILE | grep "$PROP_KEY" | cut -d'=' -f2`
echo $PROP_VALUE
echo `sed -e 's/^"//' -e 's/"$//' <<<"$PROP_VALUE"`
}

# Used for external_custom tests
Expand Down Expand Up @@ -207,29 +207,23 @@ function set_test_info() {
echo ${path_to_file}
PROPERTY_FILE=${path_to_file}/${test}/test.properties
github_url=$(getProperty "github_url")
github_url=`sed -e 's/^"//' -e 's/"$//' <<<"$github_url"`
script=$(getProperty "script")
script=`sed -e 's/^"//' -e 's/"$//' <<<"$script"`
test_results=$(getProperty "test_results")
ant_version=$(getProperty "ant_version")
ivy_version=$(getProperty "ivy_version")
tag_version=$(getProperty "tag_version")
tag_version=`sed -e 's/^"//' -e 's/"$//' <<<"$tag_version"`
environment_variable=$(getProperty "environment_variable")
if [[ ! -z "$environment_variable" ]]; then
environment_variable="MODE=\"java\""
fi
debian_packages=$(getProperty "debian_packages")
debian_packages=`sed -e 's/^"//' -e 's/"$//' <<<"$debian_packages"`
debianslim_packages=${debian_packages}
ubuntu_packages=${debian_packages}
alpine_packages=$(getProperty "alpine_packages")
centos_packages=$(getProperty "centos_packages")
clefos_packages=${centos_packages}
ubi_packages=$(getProperty "ubi_packages")
ubi_minimal_packages=$(getProperty "ubi_minimal_packages")
ubi_minimal_packages=`echo "$ubi_minimal_packages" | awk -F'"' '{print $2}'`

ubi_minimal_packages=${ubi_packages}
}

function cleanup_images() {
Expand Down

0 comments on commit 44d27bf

Please sign in to comment.