업그레이드 기본 앱과 실패 시 MIME 복원을 보존함
- 작성자
- 호시노 히나타
- 작성 시각
- 커밋
1ed4f7a420daf6db640d8302d4904caa6bfd529d- 부모
- 649bb66
변경된 파일 6개
+247-66| @@ -11,6 +11,6 @@ sudo dpkg -r zipelo | ||
| 11 | 11 | |
| 12 | 12 | Rust 1.99.1, dpkg-deb와 desktop-file-validate가 필요합니다. 출력은 새 경로여야 하며 기본은 release 빌드입니다. 개발 검증은 --profile dev를 명시합니다. 앱과 작업자는 같은 커밋에서 빌드하며 BUILD-INFO.json에 커밋과 SHA-256을 기록합니다. |
| 13 | 13 | |
| 14 | 삭제: sudo로 설치하면 postinst가 SUDO_USER의 ZIP, 7z, TAR.GZ, GZ, TAR 기본 앱을 xdg-mime으로 적용합니다. 기존 기본 앱 선택을 바꿉니다. 다른 패키지 관리자로 설치해 SUDO_USER가 없으면 사용자 설정을 추측하지 않고 연결 후보만 등록합니다. 이 경우 사용자 계정에서 xdg-mime default zipelo.desktop application/zip 등을 실행해야 합니다. 제거는 사용자 MIME 설정을 지우지 않으며 다른 앱을 기본 앱으로 다시 선택할 수 있습니다. | |
| 14 | 추가: sudo로 처음 설치하면 postinst가 SUDO_USER의 ZIP, 7z, TAR.GZ, GZ, TAR 기본 앱을 xdg-mime으로 적용합니다. 최초 설치에서 기존 기본 앱 선택을 바꿉니다. 업그레이드와 재설정에서는 사용자의 기본 앱 선택을 유지합니다. 다른 패키지 관리자로 설치해 SUDO_USER가 없으면 사용자 설정을 추측하지 않고 연결 후보만 등록합니다. 이 경우 사용자 계정에서 xdg-mime default zipelo.desktop application/zip 등을 실행해야 합니다. 제거는 사용자 MIME 설정을 지우지 않으며 다른 앱을 기본 앱으로 다시 선택할 수 있습니다. | |
| 15 | 15 | |
| 16 | 16 | 이 패키지의 검사 범위는 Ubuntu 26.04입니다. 다른 Ubuntu 버전과 Windows 실기는 별도 확인이 필요합니다. |
| @@ -3,7 +3,7 @@ set -eu | ||
| 3 | 3 | if command -v update-desktop-database >/dev/null 2>&1; then |
| 4 | 4 | update-desktop-database /usr/share/applications |
| 5 | 5 | fi |
| 6 | 삭제: if [ "$1" = configure ] && [ -n "${SUDO_USER:-}" ] && [ "$SUDO_USER" != root ]; then | |
| 6 | 추가: if [ "$1" = configure ] && [ -z "${2:-}" ] && [ -n "${SUDO_USER:-}" ] && [ "$SUDO_USER" != root ]; then | |
| 7 | 7 | account=$(getent passwd "$SUDO_USER") |
| 8 | 8 | uid=$(printf '%s' "$account" | cut -d: -f3) |
| 9 | 9 | home_dir=$(printf '%s' "$account" | cut -d: -f6) |
| @@ -4,10 +4,11 @@ | ||
| 4 | 4 | |
| 5 | 5 | ```sh |
| 6 | 6 | python3 tests/ci/run_rust.py local |
| 7 | 추가: python3 -m unittest discover -s tests/release-packages -p "test_*.py" | |
| 7 | 8 | python3 tests/release-packages/ubuntu_smoke.py tests/release-packages/runs/ubuntu-release/zipelo_0.1.0~dev1_amd64.deb |
| 8 | 9 | ``` |
| 9 | 10 | |
| 10 | 삭제: Ubuntu 실기 스모크는 이 패키지를 sudo로 설치하고 ZIP, 7z, TAR.GZ의 기본 앱을 확인합니다. 별도 Xvfb 화면에서 공백이 있는 경로의 합성 ZIP을 실제 앱으로 열어 소유 창을 캡처합니다. 종료 후 패키지를 제거하고 기존 MIME 설정을 복원합니다. 설치된 Zipelo나 같은 경로의 기존 파일이 있으면 중단합니다. 시험 중 다른 MIME 설정 변경이 감지되면 덮어쓰지 않고 복원을 보류합니다. | |
| 11 | 추가: Ubuntu 실기 스모크는 이 패키지를 sudo로 설치하고 ZIP, 7z, TAR.GZ의 기본 앱을 확인합니다. 별도 Xvfb 화면에서 공백이 있는 경로의 합성 ZIP을 실제 앱으로 열어 소유 창을 캡처합니다. 종료 후 패키지를 제거하고 기존 MIME 설정을 복원합니다. 설치나 제거가 실패해도 MIME 설정 복원을 시도하고 원래 실패와 정리 실패를 함께 보고합니다. 설치된 Zipelo나 같은 경로의 기존 파일이 있으면 중단합니다. 시험 중 다른 MIME 설정 변경이 감지되면 해당 파일을 덮어쓰지 않고 나머지 파일은 복원합니다. | |
| 11 | 12 | |
| 12 | 13 | sudo 비대화형 권한, Xvfb, xdotool과 ImageMagick import가 필요합니다. 이 검사는 실제 시스템 패키지를 설치하고 사용자 기본 앱을 임시로 바꾸므로 실행 전에 해당 작업의 승인이 필요합니다. 출력은 runs/에 남고 Git에는 포함하지 않습니다. |
| 13 | 14 |
| @@ -0,0 +1,118 @@ | ||
| 1 | 추가: """기본 앱 보존과 설치 실패 정리를 격리 검증함.""" | |
| 2 | 추가: | |
| 3 | 추가: import importlib.util | |
| 4 | 추가: import os | |
| 5 | 추가: from pathlib import Path | |
| 6 | 추가: import subprocess | |
| 7 | 추가: import tempfile | |
| 8 | 추가: import unittest | |
| 9 | 추가: from unittest.mock import patch | |
| 10 | 추가: | |
| 11 | 추가: ROOT = Path(__file__).resolve().parents[2] | |
| 12 | 추가: SPEC = importlib.util.spec_from_file_location("ubuntu_smoke", Path(__file__).with_name("ubuntu_smoke.py")) | |
| 13 | 추가: SMOKE = importlib.util.module_from_spec(SPEC) | |
| 14 | 추가: SPEC.loader.exec_module(SMOKE) | |
| 15 | 추가: | |
| 16 | 추가: | |
| 17 | 추가: class LifecycleTests(unittest.TestCase): | |
| 18 | 추가: def setUp(self): | |
| 19 | 추가: (ROOT / "tests/release-packages/runs").mkdir(parents=True, exist_ok=True) | |
| 20 | 추가: temporary = tempfile.TemporaryDirectory(dir=ROOT / "tests/release-packages/runs") | |
| 21 | 추가: self.addCleanup(temporary.cleanup) | |
| 22 | 추가: self.directory = Path(temporary.name) | |
| 23 | 추가: self.previous = self.directory / "mimeapps.list" | |
| 24 | 추가: self.previous.write_bytes(b"previous-app.desktop\n") | |
| 25 | 추가: self.created = self.directory / "added-mimeapps.list" | |
| 26 | 추가: self.original = {self.previous: self.previous.read_bytes()} | |
| 27 | 추가: settings = patch.object(SMOKE, "CONFIGS", (self.directory,)) | |
| 28 | 추가: settings.start() | |
| 29 | 추가: self.addCleanup(settings.stop) | |
| 30 | 추가: | |
| 31 | 추가: def test_only_first_configuration_sets_defaults(self): | |
| 32 | 추가: commands = self.directory / "bin" | |
| 33 | 추가: commands.mkdir() | |
| 34 | 추가: log = self.directory / "calls" | |
| 35 | 추가: scripts = { | |
| 36 | 추가: "update-desktop-database": "#!/bin/sh\nexit 0\n", | |
| 37 | 추가: "getent": '#!/bin/sh\nprintf "tester:x:1000:1000::%s:/bin/sh\\n" "$TEST_HOME"\n', | |
| 38 | 추가: "runuser": '#!/bin/sh\nprintf "%s\\n" "$*" >> "$TEST_LOG"\n', | |
| 39 | 추가: } | |
| 40 | 추가: for name, content in scripts.items(): | |
| 41 | 추가: executable = commands / name | |
| 42 | 추가: executable.write_text(content) | |
| 43 | 추가: executable.chmod(0o755) | |
| 44 | 추가: env = { | |
| 45 | 추가: **os.environ, | |
| 46 | 추가: "PATH": str(commands) + os.pathsep + os.environ["PATH"], | |
| 47 | 추가: "SUDO_USER": "tester", | |
| 48 | 추가: "TEST_HOME": str(self.directory), | |
| 49 | 추가: "TEST_LOG": str(log), | |
| 50 | 추가: } | |
| 51 | 추가: for arguments, count in ((["configure"], 5), (["configure", "0.1.0"], 0), | |
| 52 | 추가: (["triggered", "desktop"], 0)): | |
| 53 | 추가: with self.subTest(arguments=arguments): | |
| 54 | 추가: log.write_text("") | |
| 55 | 추가: subprocess.run(["sh", str(ROOT / "packaging/ubuntu/rust/postinst"), *arguments], | |
| 56 | 추가: env=env, check=True) | |
| 57 | 추가: self.assertEqual(len(log.read_text().splitlines()), count) | |
| 58 | 추가: | |
| 59 | 추가: def check_smoke(self, install_fails=False, purge_fails=False, body_fails=False): | |
| 60 | 추가: calls = [] | |
| 61 | 추가: | |
| 62 | 추가: def command(arguments, **options): | |
| 63 | 추가: calls.append(arguments) | |
| 64 | 추가: if "-i" in arguments: | |
| 65 | 추가: self.previous.write_bytes(b"zipelo.desktop\n") | |
| 66 | 추가: self.created.write_bytes(b"zipelo.desktop\n") | |
| 67 | 추가: if install_fails: | |
| 68 | 추가: raise subprocess.CalledProcessError(1, arguments) | |
| 69 | 추가: elif purge_fails: | |
| 70 | 추가: raise subprocess.CalledProcessError(2, arguments) | |
| 71 | 추가: return subprocess.CompletedProcess(arguments, 0) | |
| 72 | 추가: | |
| 73 | 추가: def exercise(): | |
| 74 | 추가: with patch.object(SMOKE.subprocess, "run", side_effect=command): | |
| 75 | 추가: with SMOKE.installed_package(self.directory / "sample.deb"): | |
| 76 | 추가: self.assertFalse(install_fails) | |
| 77 | 추가: if body_fails: | |
| 78 | 추가: raise RuntimeError("창 실행 실패") | |
| 79 | 추가: | |
| 80 | 추가: if install_fails or purge_fails or body_fails: | |
| 81 | 추가: with self.assertRaises(ExceptionGroup) as raised: | |
| 82 | 추가: exercise() | |
| 83 | 추가: self.assertEqual(len(raised.exception.exceptions), | |
| 84 | 추가: int(install_fails) + int(purge_fails) + int(body_fails)) | |
| 85 | 추가: else: | |
| 86 | 추가: exercise() | |
| 87 | 추가: self.assertEqual(SMOKE.configs(), self.original) | |
| 88 | 추가: self.assertEqual(len(calls), 2) | |
| 89 | 추가: self.assertIn("-P", calls[1]) | |
| 90 | 추가: | |
| 91 | 추가: def test_success_restores_settings(self): | |
| 92 | 추가: self.check_smoke() | |
| 93 | 추가: | |
| 94 | 추가: def test_partial_install_failure_restores_settings(self): | |
| 95 | 추가: self.check_smoke(install_fails=True) | |
| 96 | 추가: | |
| 97 | 추가: def test_purge_failure_still_restores_settings(self): | |
| 98 | 추가: self.check_smoke(purge_fails=True) | |
| 99 | 추가: | |
| 100 | 추가: def test_both_failures_are_reported(self): | |
| 101 | 추가: self.check_smoke(install_fails=True, purge_fails=True) | |
| 102 | 추가: | |
| 103 | 추가: def test_window_failure_restores_settings(self): | |
| 104 | 추가: self.check_smoke(body_fails=True) | |
| 105 | 추가: | |
| 106 | 추가: def test_external_change_does_not_skip_other_restores(self): | |
| 107 | 추가: self.previous.write_bytes(b"zipelo.desktop\n") | |
| 108 | 추가: self.created.write_bytes(b"zipelo.desktop\n") | |
| 109 | 추가: after = SMOKE.configs() | |
| 110 | 추가: self.created.write_bytes(b"external-choice.desktop\n") | |
| 111 | 추가: with self.assertRaises(ExceptionGroup): | |
| 112 | 추가: SMOKE.restore_configs(self.original, after) | |
| 113 | 추가: self.assertEqual(self.previous.read_bytes(), self.original[self.previous]) | |
| 114 | 추가: self.assertEqual(self.created.read_bytes(), b"external-choice.desktop\n") | |
| 115 | 추가: | |
| 116 | 추가: | |
| 117 | 추가: if __name__ == "__main__": | |
| 118 | 추가: unittest.main() |
| @@ -1,6 +1,7 @@ | ||
| 1 | 1 | """현재 사용자 설정을 보존하고 실제 패키지 설치와 창 실행을 검증함.""" |
| 2 | 2 | |
| 3 | 3 | import argparse |
| 4 | 추가: from contextlib import contextmanager | |
| 4 | 5 | import json |
| 5 | 6 | import os |
| 6 | 7 | from pathlib import Path |
| @@ -18,6 +19,52 @@ def configs(): | ||
| 18 | 19 | return {p: p.read_bytes() for directory in CONFIGS for p in directory.glob("*mimeapps.list")} |
| 19 | 20 | |
| 20 | 21 | |
| 22 | 추가: def restore_configs(before, after): | |
| 23 | 추가: current = configs() | |
| 24 | 추가: failures = [] | |
| 25 | 추가: for path in set(before) | set(after): | |
| 26 | 추가: try: | |
| 27 | 추가: if current.get(path) != after.get(path): | |
| 28 | 추가: raise RuntimeError(f"다른 MIME 설정 변경이 있어 복원을 보류함: {path}") | |
| 29 | 추가: if path in before: | |
| 30 | 추가: path.write_bytes(before[path]) | |
| 31 | 추가: elif path.exists(): | |
| 32 | 추가: path.unlink() | |
| 33 | 추가: except Exception as error: | |
| 34 | 추가: failures.append(error) | |
| 35 | 추가: if failures: | |
| 36 | 추가: raise ExceptionGroup("MIME 설정 복원 실패", failures) | |
| 37 | 추가: if configs() != before: | |
| 38 | 추가: raise RuntimeError("기존 MIME 설정 복원 실패") | |
| 39 | 추가: | |
| 40 | 추가: | |
| 41 | 추가: @contextmanager | |
| 42 | 추가: def installed_package(package): | |
| 43 | 추가: before = configs() | |
| 44 | 추가: after = None | |
| 45 | 추가: failures = [] | |
| 46 | 추가: try: | |
| 47 | 추가: try: | |
| 48 | 추가: subprocess.run(["sudo", "-n", "dpkg", "-i", str(package)], check=True) | |
| 49 | 추가: finally: | |
| 50 | 추가: after = configs() | |
| 51 | 추가: yield | |
| 52 | 추가: except BaseException as error: | |
| 53 | 추가: failures.append(error) | |
| 54 | 추가: finally: | |
| 55 | 추가: try: | |
| 56 | 추가: subprocess.run(["sudo", "-n", "dpkg", "-P", "zipelo"], check=True) | |
| 57 | 추가: except BaseException as error: | |
| 58 | 추가: failures.append(error) | |
| 59 | 추가: try: | |
| 60 | 추가: if after is not None: | |
| 61 | 추가: restore_configs(before, after) | |
| 62 | 추가: except BaseException as error: | |
| 63 | 추가: failures.append(error) | |
| 64 | 추가: if failures: | |
| 65 | 추가: raise BaseExceptionGroup("패키지 시험 또는 정리 실패", failures) | |
| 66 | 추가: | |
| 67 | 추가: | |
| 21 | 68 | def main(): |
| 22 | 69 | parser = argparse.ArgumentParser(description=__doc__) |
| 23 | 70 | parser.add_argument("package", type=Path) |
| @@ -29,70 +76,54 @@ def main(): | ||
| 29 | 76 | capture_output=True).stdout != b"installed", "기존 설치를 보존해야 함" |
| 30 | 77 | for name in ("/usr/lib/zipelo", "/usr/bin/zipelo", "/usr/share/applications/zipelo.desktop"): |
| 31 | 78 | assert not Path(name).exists(), "기존 파일이 있어 설치를 중단함" |
| 32 | 삭제: before = configs() | |
| 33 | 삭제: after = None | |
| 34 | 79 | app = None |
| 35 | 80 | display = None |
| 36 | 삭제: installed = False | |
| 37 | 삭제: try: | |
| 38 | 삭제: subprocess.run(["sudo", "-n", "dpkg", "-i", str(package)], check=True) | |
| 39 | 삭제: installed = True | |
| 40 | 삭제: after = configs() | |
| 41 | 삭제: for mime in MIMES: | |
| 42 | 삭제: result = subprocess.check_output(["xdg-mime", "query", "default", mime], text=True).strip() | |
| 43 | 삭제: assert result == "zipelo.desktop", f"연결 실패: {mime}" | |
| 44 | 삭제: info = json.loads(Path("/usr/lib/zipelo/BUILD-INFO.json").read_text()) | |
| 45 | 삭제: assert info["profile"] == "release" | |
| 46 | 삭제: archive = runs / "sample archive.zip" | |
| 47 | 삭제: with zipfile.ZipFile(archive, "w") as output: | |
| 48 | 삭제: output.writestr("example.txt", "Zipelo package verification") | |
| 49 | 삭제: display = subprocess.Popen( | |
| 50 | 삭제: ["Xvfb", "-displayfd", "1", "-screen", "0", "1280x900x24", "-nolisten", "tcp"], | |
| 51 | 삭제: stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) | |
| 52 | 삭제: assert select.select([display.stdout], [], [], 15)[0], "Xvfb 준비 실패" | |
| 53 | 삭제: number = display.stdout.readline().decode().strip() | |
| 54 | 삭제: assert number.isdecimal() | |
| 55 | 삭제: env = {**os.environ, "DISPLAY": ":" + number, "WINIT_UNIX_BACKEND": "x11", "XDG_SESSION_TYPE": "x11"} | |
| 56 | 삭제: env.pop("WAYLAND_DISPLAY", None) | |
| 57 | 삭제: with (runs / "app.stdout").open("wb") as stdout, (runs / "app.stderr").open("wb") as stderr: | |
| 58 | 삭제: app = subprocess.Popen(["/usr/bin/zipelo", str(archive)], env=env, stdout=stdout, stderr=stderr) | |
| 59 | 삭제: deadline = time.monotonic() + 30 | |
| 60 | 삭제: while True: | |
| 61 | 삭제: assert app.poll() is None, "설치된 앱이 조기에 종료됨" | |
| 62 | 삭제: window = subprocess.run(["xdotool", "search", "--all", "--pid", str(app.pid), "--name", "Zipelo"], | |
| 63 | 삭제: env=env, capture_output=True, text=True) | |
| 64 | 삭제: if window.returncode == 0: | |
| 65 | 삭제: break | |
| 66 | 삭제: assert time.monotonic() < deadline, "앱 창 표시 시간 초과" | |
| 67 | 삭제: time.sleep(0.2) | |
| 68 | 삭제: time.sleep(3) | |
| 69 | 삭제: assert app.poll() is None | |
| 70 | 삭제: subprocess.run(["import", "-window", window.stdout.splitlines()[0], | |
| 71 | 삭제: str(runs / "installed-window.png")], env=env, check=True) | |
| 72 | 삭제: print("PASS installed package, ZIP/7z/TAR.GZ defaults and native X11 window") | |
| 73 | 삭제: finally: | |
| 74 | 삭제: for process in (app, display): | |
| 75 | 삭제: if process is not None and process.poll() is None: | |
| 76 | 삭제: process.terminate() | |
| 77 | 삭제: try: | |
| 78 | 삭제: process.wait(timeout=10) | |
| 79 | 삭제: except subprocess.TimeoutExpired: | |
| 80 | 삭제: process.kill() | |
| 81 | 삭제: process.wait() | |
| 82 | 삭제: if installed: | |
| 83 | 삭제: subprocess.run(["sudo", "-n", "dpkg", "-P", "zipelo"], check=True) | |
| 84 | 삭제: current = configs() | |
| 85 | 삭제: if after is not None: | |
| 86 | 삭제: for path in set(before) | set(after): | |
| 87 | 삭제: assert current.get(path) == after.get(path), "시험 중 다른 MIME 설정 변경이 있어 복원을 보류함" | |
| 88 | 삭제: if path in before: | |
| 89 | 삭제: path.write_bytes(before[path]) | |
| 90 | 삭제: elif path.exists(): | |
| 91 | 삭제: path.unlink() | |
| 92 | 삭제: assert not Path("/usr/bin/zipelo").exists() | |
| 93 | 삭제: assert not Path("/usr/lib/zipelo").exists() | |
| 94 | 삭제: assert configs() == before, "기존 MIME 설정 복원 실패" | |
| 95 | 삭제: print("PASS package removed and previous MIME settings restored") | |
| 81 | 추가: with installed_package(package): | |
| 82 | 추가: try: | |
| 83 | 추가: for mime in MIMES: | |
| 84 | 추가: result = subprocess.check_output(["xdg-mime", "query", "default", mime], text=True).strip() | |
| 85 | 추가: assert result == "zipelo.desktop", f"연결 실패: {mime}" | |
| 86 | 추가: info = json.loads(Path("/usr/lib/zipelo/BUILD-INFO.json").read_text()) | |
| 87 | 추가: assert info["profile"] == "release" | |
| 88 | 추가: archive = runs / "sample archive.zip" | |
| 89 | 추가: with zipfile.ZipFile(archive, "w") as output: | |
| 90 | 추가: output.writestr("example.txt", "Zipelo package verification") | |
| 91 | 추가: display = subprocess.Popen( | |
| 92 | 추가: ["Xvfb", "-displayfd", "1", "-screen", "0", "1280x900x24", "-nolisten", "tcp"], | |
| 93 | 추가: stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) | |
| 94 | 추가: assert select.select([display.stdout], [], [], 15)[0], "Xvfb 준비 실패" | |
| 95 | 추가: number = display.stdout.readline().decode().strip() | |
| 96 | 추가: assert number.isdecimal() | |
| 97 | 추가: env = {**os.environ, "DISPLAY": ":" + number, "WINIT_UNIX_BACKEND": "x11", "XDG_SESSION_TYPE": "x11"} | |
| 98 | 추가: env.pop("WAYLAND_DISPLAY", None) | |
| 99 | 추가: with (runs / "app.stdout").open("wb") as stdout, (runs / "app.stderr").open("wb") as stderr: | |
| 100 | 추가: app = subprocess.Popen(["/usr/bin/zipelo", str(archive)], env=env, stdout=stdout, stderr=stderr) | |
| 101 | 추가: deadline = time.monotonic() + 30 | |
| 102 | 추가: while True: | |
| 103 | 추가: assert app.poll() is None, "설치된 앱이 조기에 종료됨" | |
| 104 | 추가: window = subprocess.run(["xdotool", "search", "--all", "--pid", str(app.pid), "--name", "Zipelo"], | |
| 105 | 추가: env=env, capture_output=True, text=True) | |
| 106 | 추가: if window.returncode == 0: | |
| 107 | 추가: break | |
| 108 | 추가: assert time.monotonic() < deadline, "앱 창 표시 시간 초과" | |
| 109 | 추가: time.sleep(0.2) | |
| 110 | 추가: time.sleep(3) | |
| 111 | 추가: assert app.poll() is None | |
| 112 | 추가: subprocess.run(["import", "-window", window.stdout.splitlines()[0], | |
| 113 | 추가: str(runs / "installed-window.png")], env=env, check=True) | |
| 114 | 추가: print("PASS installed package, ZIP/7z/TAR.GZ defaults and native X11 window") | |
| 115 | 추가: finally: | |
| 116 | 추가: for process in (app, display): | |
| 117 | 추가: if process is not None and process.poll() is None: | |
| 118 | 추가: process.terminate() | |
| 119 | 추가: try: | |
| 120 | 추가: process.wait(timeout=10) | |
| 121 | 추가: except subprocess.TimeoutExpired: | |
| 122 | 추가: process.kill() | |
| 123 | 추가: process.wait() | |
| 124 | 추가: assert not Path("/usr/bin/zipelo").exists() | |
| 125 | 추가: assert not Path("/usr/lib/zipelo").exists() | |
| 126 | 추가: print("PASS package removed and previous MIME settings restored") | |
| 96 | 127 | |
| 97 | 128 | |
| 98 | 129 | if __name__ == "__main__": |
| @@ -68,5 +68,36 @@ | ||
| 68 | 68 | "tests/release-packages/runs/local-fixed.log", |
| 69 | 69 | "tests/release-packages/runs/smoke/installed-window.png" |
| 70 | 70 | ], |
| 71 | 삭제: "evidence_note": "Validation JSON added after tests; the tested code tree matches the remote code tree." | |
| 71 | 추가: "evidence_note": "Validation JSON added after tests; the tested code tree matches the remote code tree.", | |
| 72 | 추가: "lifecycle_fix": { | |
| 73 | 추가: "tested_source_local_commit": "64278d557270ceead65729a2a7484c90806cce97", | |
| 74 | 추가: "changes": [ | |
| 75 | 추가: "최초 configure에서만 기본 앱 적용, 업그레이드 및 재설정은 기존 선택 보존", | |
| 76 | 추가: "설치 시도 실패에도 purge 실행, purge 실패와 별개로 MIME 복원", | |
| 77 | 추가: "외부 MIME 변경은 보존하며 다른 파일 복원 지속, 원래 실패와 정리 실패 모두 보고" | |
| 78 | 추가: ], | |
| 79 | 추가: "regression_command": "python3 -m unittest discover -s tests/release-packages -p \"test_*.py\" -v", | |
| 80 | 추가: "regression_tests_passed": 7, | |
| 81 | 추가: "local": { | |
| 82 | 추가: "exit_code": 0, | |
| 83 | 추가: "rust_tests_passed": 937, | |
| 84 | 추가: "runner_checks_passed": 34, | |
| 85 | 추가: "linux_build_targets_passed": 21, | |
| 86 | 추가: "linux_test_targets_passed": 21, | |
| 87 | 추가: "windows_cross_targets_passed": 21 | |
| 88 | 추가: }, | |
| 89 | 추가: "ubuntu_repackaged": { | |
| 90 | 추가: "path": "tests/release-packages/runs/ubuntu-lifecycle/zipelo_0.1.0~dev1_amd64.deb", | |
| 91 | 추가: "bytes": 4966540, | |
| 92 | 추가: "sha256": "bbab8fcd97b004c6bbb62a3a3f76d519dc517d35f72b617f01f37f18e46ec97a", | |
| 93 | 추가: "payload_reused_from": "10aad21", | |
| 94 | 추가: "postinst_updated": true | |
| 95 | 추가: }, | |
| 96 | 추가: "actual_installation_rerun": false, | |
| 97 | 추가: "windows_runtime_tested": false, | |
| 98 | 추가: "logs": [ | |
| 99 | 추가: "tests/release-packages/runs/lifecycle-regression.log", | |
| 100 | 추가: "tests/release-packages/runs/local-lifecycle.log" | |
| 101 | 추가: ] | |
| 102 | 추가: } | |
| 72 | 103 | } |