Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update test scripts [skip ci] #715

Merged

Conversation

jihoon-seo
Copy link
Member

Related PR: #677 (Change method to input parameters for script)

ref: #650

  1. testscript 커맨드의 파라미터 입력 방식을 named parameter 형태로 변경
    named parameter의 key
    -f: testset 설정 파일
    -n: mcis명칭 postfix (중복된 명칭 방지)
    -x: 커맨드별 옵션 1 (ex: 복제 vm 수, vm_id 등 커맨드가 필요하는 값에 매핑)
    -y: 커맨드별 옵션 2
    -z: 커맨드별 옵션 3
    -h: 도움말
    기존 예시: ./create-all.sh all 1 developername ../testset.env
    변경 예시: ./create-all.sh -n developername -f ../testset.env
  2. 각 스크립트의 환경설정 코드 간소화
  • init.sh 로 모두 처리하도록 변경
  • named parameter 적용
  • mcis create scripts, mcis clean scripts, mcis wv deploy script, cmd scripts, change-mcis-hostname.sh 등에 대해 처리

Todo

  • 모든 script 파일에 적용 필요
  • 기존 사용 방식 deprecated 처리 필요 (readme 등 문서 개선)

(일부 테스트 스크립트 파일에는 여전히 미적용되었을 수 있음)

@jihoon-seo jihoon-seo changed the title Update test scripts Update test scripts [skip ci] Sep 8, 2021
Copy link
Member

@seokho-son seokho-son left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jihoon-seo 출력 방식 관련 의견이 있습니다.. ^^

Comment on lines 41 to 50
if [ "${INDEX}" == "0" ]; then
echo "[Parallel excution for all CSP regions]"

INDEXX=${NumCSP}
for ((cspi = 1; cspi <= INDEXX; cspi++)); do
echo $i
INDEXY=${NumRegion[$cspi]}
CSP=${CSPType[$cspi]}
for ((cspj = 1; cspj <= INDEXY; cspj++)); do
# INDEX=$(($INDEX+1))

echo $j
INDEX=$cspi
REGION=$cspj
echo $CSP
echo $REGION
echo ${RegionName[$cspi,$cspj]}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ref) #714

Suggested change
if [ "${INDEX}" == "0" ]; then
echo "[Parallel excution for all CSP regions]"
INDEXX=${NumCSP}
for ((cspi = 1; cspi <= INDEXX; cspi++)); do
echo $i
INDEXY=${NumRegion[$cspi]}
CSP=${CSPType[$cspi]}
for ((cspj = 1; cspj <= INDEXY; cspj++)); do
# INDEX=$(($INDEX+1))
echo $j
INDEX=$cspi
REGION=$cspj
echo $CSP
echo $REGION
echo ${RegionName[$cspi,$cspj]}
if [ "${INDEX}" == "0" ]; then
echo "[Parallel excution for all CSP regions]"
INDEXX=${NumCSP}
for ((cspi = 1; cspi <= INDEXX; cspi++)); do
INDEXY=${NumRegion[$cspi]}
CSP=${CSPType[$cspi]}
echo "[$cspi] $CSP details"
for ((cspj = 1; cspj <= INDEXY; cspj++)); do
echo "[$cspi,$cspj] ${RegionName[$cspi,$cspj]}"

이런 식으로 출력을 간소화하면 어떨까요?

@jihoon-seo jihoon-seo force-pushed the 210908_Update_test_scripts branch from fad66df to 9f7caa3 Compare September 8, 2021 06:24
@seokho-son
Copy link
Member

/approve

@seokho-son
Copy link
Member

감사합니다!

@seokho-son seokho-son merged commit a694782 into cloud-barista:main Sep 8, 2021
@jihoon-seo jihoon-seo deleted the 210908_Update_test_scripts branch October 22, 2021 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants