-
Notifications
You must be signed in to change notification settings - Fork 3.8k
CI: generic runtime tests #13785
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
CI: generic runtime tests #13785
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -32,7 +32,34 @@ for PKG in /ci/*.ipk; do | |||||
| exit 1 | ||||||
| fi | ||||||
| else | ||||||
| echo "No test.sh script available" | ||||||
| echo "Use generic test" | ||||||
| PKG_FILES=$(opkg files "$PKG_NAME" | grep -E "/bin|/sbin|/usr/bin|/usr/sbin") | ||||||
| SUCCESS=0 | ||||||
| FOUND_EXE=0 | ||||||
| for FILE in $PKG_FILES; do | ||||||
| if [ -x "$FILE" ] && [ -f "$FILE" ]; then | ||||||
| FOUND_EXE=1 | ||||||
| echo "Test executable $FILE" | ||||||
| for V in --version -version version -v -V; do | ||||||
| echo "Trying $FILE $V" | ||||||
| if "$FILE" "$V" 2>&1 | grep "$PKG_VERSION"; then | ||||||
| SUCCESS=1 | ||||||
| break | ||||||
| fi | ||||||
| done | ||||||
|
Comment on lines
+43
to
+49
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think ensuring the main binary can display help should be enough for a success already, as a last resort after the version checks. This at least checks that binaries are valid and have the linked dependencies installed. Also I think it makes sense to do
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The problem is how? Because not all packages use
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I meant on top of Might be a good idea to also do an |
||||||
|
|
||||||
| fi | ||||||
| done | ||||||
| if [ "$FOUND_EXE" -eq 1 ]; then | ||||||
| if [ "$SUCCESS" -eq 0 ]; then | ||||||
| echo "Generic test failed" | ||||||
| exit 1 | ||||||
| else | ||||||
| echo "Test succesful or" | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this be without or?
Suggested change
|
||||||
| fi | ||||||
| else | ||||||
| echo "No executeable found in package $PKG_NAME" | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| fi | ||||||
| fi | ||||||
|
|
||||||
| opkg remove "$PKG_NAME" --force-removal-of-dependent-packages --force-remove | ||||||
|
|
||||||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need
apk info -Lsupport