Add CLAUDE.md and tools/verify for future sessions
tools/verify runs every check that doesn't need an install. The test harness now holds a keep-awake assertion and a longer limit, because idle phones froze runs partway through. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
parent
b1cde3e263
commit
74c89e0673
2 changed files with 96 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ SWIFT=${SWIFT:-$HOME/.local/opt/swift/usr/bin}
|
|||
tools/build-arch arm64e exe build/loadtest-e tests/loadtest.m
|
||||
ssh -i "$KEY" "$PH" 'rm -rf /var/jb/var/mobile/t/selftest; mkdir -p /var/jb/var/mobile/t/selftest'
|
||||
scp -q -i "$KEY" build/Islet-arm64e.dylib build/loadtest-e "$PH:/var/jb/var/mobile/t/"
|
||||
ssh -i "$KEY" "$PH" 'cd /var/jb/var/mobile/t && ldid -S Islet-arm64e.dylib && ISLET_SELFTEST=/var/jb/var/mobile/t/selftest ./loadtest-e ./Islet-arm64e.dylib 90'
|
||||
ssh -i "$KEY" "$PH" 'cd /var/jb/var/mobile/t && ldid -S Islet-arm64e.dylib && ISLET_SELFTEST=/var/jb/var/mobile/t/selftest ./loadtest-e ./Islet-arm64e.dylib 120'
|
||||
rm -rf build/selftest; scp -rq -i "$KEY" "$PH:/var/jb/var/mobile/t/selftest" build/selftest
|
||||
test -f build/selftest/status.txt || { echo "self test wrote no result"; exit 1; }
|
||||
cat build/selftest/status.txt
|
||||
|
|
|
|||
27
tools/verify
Executable file
27
tools/verify
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/bash
|
||||
# Everything that can be checked without installing: lint, package, self test, Settings test, load test, then copies the deb
|
||||
# to /var/mobile/islet.deb. Never installs and never resprings. Stops at the first failure, and an old result never counts.
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
KEY=${IPHONE_KEY:-$HOME/.ssh/iphone_key}; PH=${IPHONE:[email protected]}; T=/var/jb/var/mobile/t
|
||||
V=$(cat VERSION); DEB=build/com.astar76.islet_${V}_iphoneos-arm64.deb
|
||||
tools/package.sh > build/pkg.log 2>&1 </dev/null || { grep -E " error|lint:" build/pkg.log | sort -u | head; exit 1; }
|
||||
tail -1 build/pkg.log; test -f "$DEB"
|
||||
|
||||
rm -rf build/selftest
|
||||
tools/selftest > build/st.log 2>&1 </dev/null || { tail -5 build/st.log; exit 1; }
|
||||
test -f build/selftest/status.txt || { echo "self test wrote no result (it can stall: run this again)"; exit 1; }
|
||||
PASS=$(grep -cE '^PASS' build/selftest/status.txt || true); FAIL=$(grep -cE '^FAIL|EXCEPTION' build/selftest/status.txt || true)
|
||||
echo "self test: $PASS passed, $FAIL failed; $(tail -1 build/selftest/status.txt)"
|
||||
[ "$FAIL" = 0 ] || { grep -E '^FAIL|EXCEPTION' build/selftest/status.txt; exit 1; }
|
||||
|
||||
tools/build-arch arm64 exe build/prefstest tests/prefstest.m </dev/null
|
||||
ssh -i "$KEY" "$PH" "rm -rf $T/pb; mkdir -p $T/pb" </dev/null
|
||||
scp -q -i "$KEY" -r build/deb/var/jb/Library/PreferenceBundles/IsletPrefs.bundle "$PH:$T/pb/" </dev/null
|
||||
scp -q -i "$KEY" build/prefstest build/deb/var/jb/Library/MobileSubstrate/DynamicLibraries/Islet.dylib build/deb/var/jb/Library/MobileSubstrate/DynamicLibraries/IsletPing.dylib "$PH:$T/" </dev/null
|
||||
ssh -i "$KEY" "$PH" "cd $T && ISLET_PREFS_BUNDLE=\$PWD/pb/IsletPrefs.bundle ISLET_PREFS_FILE=\$PWD/pb/t.plist ./prefstest \$PWD/pb/IsletPrefs.bundle/IsletPrefs | tail -1 | grep -qx PASS && echo 'settings test: PASS'
|
||||
for id in com.apple.Preferences com.apple.springboard; do ISLET_BID=\$id ./loadtest-e ./Islet.dylib | tail -1 | grep -qx PASS && echo \"load test (\$id): PASS\"; done
|
||||
./loadtest-e ./IsletPing.dylib 1 | tail -1 | grep -qx PASS && echo 'load test (ping hook): PASS'" </dev/null
|
||||
|
||||
scp -q -i "$KEY" "$DEB" "$PH:/var/mobile/islet.deb" </dev/null
|
||||
echo "copied to /var/mobile/islet.deb: $(sha256sum "$DEB" | cut -c1-16)"
|
||||
Loading…
Reference in a new issue