Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
abuild
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
alpine
abuild
Commits
fab41364
Commit
fab41364
authored
1 year ago
by
Natanael Copa
Browse files
Options
Downloads
Patches
Plain Diff
checkapk: dont require abuild.conf if we have default conf
also add tests
parent
643637dd
No related branches found
No related tags found
1 merge request
!228
speed up abuild cleanoldpkg test, add test for checkapk
Pipeline
#187738
passed
1 year ago
Stage: verify
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
checkapk.in
+1
-1
1 addition, 1 deletion
checkapk.in
tests/checkapk_test
+21
-1
21 additions, 1 deletion
tests/checkapk_test
with
22 additions
and
2 deletions
checkapk.in
+
1
−
1
View file @
fab41364
...
...
@@ -51,7 +51,7 @@ if [ $# -gt 0 ]; then
exit
2
fi
if
!
[
-f
"
$ABUILD_CONF
"
]
&&
!
[
-f
"
$ABUILD_USERCONF
"
]
;
then
if
!
[
-f
"
$ABUILD_CONF
"
]
&&
!
[
-f
"
$ABUILD_USERCONF
"
]
&&
!
[
-f
"
$ABUILD_DEFCONF
"
]
;
then
die
"no abuild.conf found"
fi
...
...
This diff is collapsed.
Click to expand it.
tests/checkapk_test
+
21
−
1
View file @
fab41364
...
...
@@ -3,10 +3,16 @@
.
$(
atf_get_srcdir
)
/test_env.sh
init_tests
\
checkapk_help
\
checkapk_invalid_opt
checkapk_invalid_opt
\
checkapk_missing_abuild_conf
\
checkapk_missing_apkbuild
DATADIR
=
$(
atf_get_srcdir
)
/testdata
export
ABUILD_SHAREDIR
=
$(
atf_get_srcdir
)
/..
export
ABUILD_CONF
=
/dev/null
export
ABUILD_USERCONF
=
/dev/null
checkapk_help_body
()
{
atf_check
-s
exit
:0
\
-o
match:
"Usage:"
\
...
...
@@ -18,3 +24,17 @@ checkapk_invalid_opt_body() {
-e
match:
"Usage:"
\
checkapk
--invalid
}
checkapk_missing_abuild_conf_body
()
{
ABUILD_DEFCONF
=
/dev/null atf_check
\
-s
not-exit:0
\
-e
match:
"no abuild.conf found"
\
checkapk
}
checkapk_missing_apkbuild_body
()
{
atf_check
\
-s
not-exit:0
\
-e
match:
"must be run in the directory of a built package"
\
checkapk
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment