diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2fe374badf13112132d66f0e69f3c1fd3d1dc526..9c2c1178b4712394ec0344b684a6d544216fe06a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,9 +42,12 @@ variables: - export TS=$(date +%Y-%m-%d_%H%M) - | if [ "$TARGET_OS" = "windows" ]; then - mv dist/$DIST_FILE "${BINARY_NAME}_${CI_COMMIT_REF_NAME}_${CI_COMMIT_SHORT_SHA}_${TS}_${TARGET_OS}_amd64.exe" + mv dist/$DIST_FILE "${BINARY_NAME}_${CI_COMMIT_REF_NAME}_${CI_COMMIT_SHORT_SHA}_${TS}_${TARGET_OS}_amd64.exe" + zip -v ${BINARY_NAME}.zip "${BINARY_NAME}_${CI_COMMIT_REF_NAME}_${CI_COMMIT_SHORT_SHA}_${TS}_${TARGET_OS}_amd64.exe" else - mv dist/$DIST_FILE "${BINARY_NAME}_${CI_COMMIT_REF_NAME}_${CI_COMMIT_SHORT_SHA}_${TS}_${TARGET_OS}_amd64" + chmod +x dist/$DIST_FILE + mv dist/$DIST_FILE "${BINARY_NAME}_${CI_COMMIT_REF_NAME}_${CI_COMMIT_SHORT_SHA}_${TS}_${TARGET_OS}_amd64" + tar czvf ${BINARY_NAME}.tar.gz "${BINARY_NAME}_${CI_COMMIT_REF_NAME}_${CI_COMMIT_SHORT_SHA}_${TS}_${TARGET_OS}_amd64" fi artifacts: paths: @@ -66,6 +69,12 @@ windows_bin: image: name: batonogov/pyinstaller-windows:latest entrypoint: [''] + before_script: + - apt-get update && apt-get install -y zip + artifacts: + paths: + - "${BINARY_NAME}_*" + - "${BINARY_NAME}.zip" variables: TARGET_OS: "windows" DIST_FILE: "${BINARY_NAME}.exe" @@ -75,6 +84,10 @@ linux_slim_bin: image: name: batonogov/pyinstaller-linux:latest-slim entrypoint: [''] + artifacts: + paths: + - "${BINARY_NAME}_*" + - "${BINARY_NAME}.tar.gz" variables: TARGET_OS: "linux" DIST_FILE: "${BINARY_NAME}" diff --git a/load_check.py b/load_check.py index 68bb71404e95b45c6c53a1729e47c648674b07e9..9fc1226c335cd6bbf9f412380d0828f07868eefc 100644 --- a/load_check.py +++ b/load_check.py @@ -23,20 +23,56 @@ class MultipleTest(unittest.TestCase): def _get_user_inputs(self): """Helper method to get user inputs and set up initial configuration.""" # Test case user input - while True: - print("1. [필수 입력] Chrome 위치 (e.g., /opt/chrome-linux64/chrome, D:\\tmp\\chrome-win64\\chrome.exe): ") - chrome_path = input().strip() - - if not chrome_path: - print("잘못 입력하였습니다. 다시 입력해주세요.\n") - continue - + # while True: + # # Linux Only + if sys.platform.startswith('linux'): # Check if the operating system is Linux + chrome_path = "/usr/bin/google-chrome-stable" if os.path.exists(chrome_path) and os.path.isfile(chrome_path): self.binary_location = chrome_path - break + print("크롬이 이미 설치되어 있습니다.\n다음 입력으로 넘어갑니다.\n") + else: + print("크롬 설치후 스크립트 재실행 바랍니다.\n스크립트를 종료합니다\n") + sys.exit(1) + + else: # is Windows + chrome_path = r"C:\Program Files\Google\Chrome\Application\chrome.exe" + if os.path.exists(chrome_path) and os.path.isfile(chrome_path): + print("기존에 설치된 크롬을 사용하시겠습니까? (y/N): ") + ans = input().strip().lower() + if ans in ("y", "yes"): + self.binary_location = chrome_path + else: + print("크롬 드라이버 위치를 절대경로로 입력해 주세요") + print("1. [필수 입력] Chrome 위치 (e.g., D:\\tmp\\chrome-win64\\chrome.exe): ") + while True: + chrome_path = input().strip() + + if not chrome_path: + print("잘못 입력하였습니다. 다시 입력해주세요.\n") + + if os.path.exists(chrome_path) and os.path.isfile(chrome_path): + self.binary_location = chrome_path + break + + print(f"입력한 경로가 존재하지 않거나 파일이 아닙니다: {chrome_path}") + print("다시 입력해주세요.\n") + + else: + print("크롬이 설치되어 있지 않습니다") + print("크롬 드라이버 위치를 절대경로로 입력해 주세요") + print("1. [필수 입력] Chrome 위치 (e.g., D:\\tmp\\chrome-win64\\chrome.exe): ") + while True: + chrome_path = input().strip() + + if not chrome_path: + print("잘못 입력하였습니다. 다시 입력해주세요.\n") + + if os.path.exists(chrome_path) and os.path.isfile(chrome_path): + self.binary_location = chrome_path + break - print(f"입력한 경로가 존재하지 않거나 파일이 아닙니다: {chrome_path}") - print("다시 입력해주세요.\n") + print(f"입력한 경로가 존재하지 않거나 파일이 아닙니다: {chrome_path}") + print("다시 입력해주세요.\n") print("\n2. [필수 입력] 테스트 대상 웹 (e.g., https://example.com:8443/): ") self.dc_address = input() @@ -48,7 +84,7 @@ class MultipleTest(unittest.TestCase): self.account_configs = [] print("\n3. [필수 입력] 계정유형(1-어드민,2-(지역)관리자,3-사용자) / 계정 접속정보") - print("형식 예시: 1 / admin, admin") + print("입력 예시: 1 / admin, admin") while True: user_input = input("").strip() @@ -83,6 +119,7 @@ class MultipleTest(unittest.TestCase): print("\n5. [선택] 커넥션 수 / 테스트 시간(분)(기본값: 30개 / 120분)") + print("입력 예시: 30 / 120") try: pool_input = input().strip().split('/') self.max_connections = int(pool_input[0].strip()) if pool_input[0].strip() else 30 diff --git a/requirements.txt b/requirements.txt index 8983552ca2ada042fb33e14f2fa404bf77784a5f..97805d624d71b35e62bc79bb17fee35175e643f0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ selenium==4.36.0 -urllib3==2.5.0 +urllib3==2.6.3 requests==2.32.5 \ No newline at end of file diff --git a/scripts/release.sh b/scripts/release.sh index 564ec4bfcba06d04fb9cd40775519112e4c54594..82a52925a360a01d12990ad66954aa30cbe9eaf3 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -43,6 +43,8 @@ mkdir -p release_files echo "🔍 Collecting build artifacts for commit $CI_COMMIT_SHORT_SHA ..." cp ./*_"${CI_COMMIT_SHORT_SHA}"_* release_files/ 2>/dev/null || true +cp ./"${BINARY_NAME}.zip" release_files/ 2>/dev/null || true +cp ./"${BINARY_NAME}.tar.gz" release_files/ 2>/dev/null || true if [ -z "$(ls -A release_files 2>/dev/null)" ]; then echo "❌ No artifacts found matching pattern '*_${CI_COMMIT_SHORT_SHA}_*'" @@ -81,14 +83,14 @@ for f in release_files/*; do sha_file="${f}.sha256" sha256sum "$f" > "$sha_file" - upload_and_add_json "$f" "Windows binary" + upload_and_add_json "${BINARY_NAME}.zip" "Windows binary (Compressed)" upload_and_add_json "$sha_file" "Windows binary checksum" ;; *linux_amd64) sha_file="${f}.sha256" sha256sum "$f" > "$sha_file" - upload_and_add_json "$f" "Linux binary" + upload_and_add_json "${BINARY_NAME}.tar.gz" "Linux binary (Compressed)" upload_and_add_json "$sha_file" "Linux binary checksum" ;; esac