Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
eepm
Commits
b64a74cf
Commit
b64a74cf
authored
Oct 13, 2025
by
Ivan Mazhukin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm ci: move test logic from gen-ci.sh to tests/run_one_ci.sh
parent
cd354aac
Pipeline
#16463
passed with stage
in 45 seconds
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
36 deletions
+62
-36
gen-ci.sh
gen-ci.sh
+1
-36
run_one_ci.sh
tests/run_one_ci.sh
+61
-0
No files found.
gen-ci.sh
View file @
b64a74cf
...
...
@@ -20,42 +20,7 @@ for app in $apps; do
echo
" tags:"
echo
" - access"
echo
" script:"
echo
" - cd bin"
echo
" - ./epmu"
echo
" - ./epmi -y wget glibc-pthread git kubo coreutils"
echo
" - export LOGDIR=
\"\$
CI_PROJECT_DIR
\"
"
echo
" - mkdir -p
\"\$
CI_PROJECT_DIR/epm-play-versions
\"
\"\$
CI_PROJECT_DIR/epm-errors
\"
\"\$
CI_PROJECT_DIR/epm-logs
\"
\"\$
CI_PROJECT_DIR/epm-requires
\"
"
echo
" - export EGET_IPFS_FORCE_LOAD=1"
echo
" - export EPM_IPFS_DB_UPDATE_SKIPPING=1"
echo
" - export EGET_IPFS_API=/ip4/91.232.225.49/tcp/5001"
# 1) run the updater and DO NOT fail on its return code
echo
" - set +e"
echo
" - EPM=
\$
(pwd)/epm bash ../tests/update_versions.sh --ipfs --force --slow
\"
$app
\"
"
echo
" - update_exit_code=
\$
?"
echo
" - set -e"
# 2) determine the package name and the path to the version file
echo
" - |"
echo
" package_name=
\$
(./epm play --package-name
\"
$app
\"
)"
echo
" version_file_path=
\"\$
CI_PROJECT_DIR/epm-play-versions/
\$
package_name
\"
"
# 3) if the version is missing — try to write it ourselves, ignore any errors
echo
" - |"
echo
" if [ ! -s
\"\$
version_file_path
\"
]; then"
echo
" tmp_file=
\$
(mktemp)"
echo
" ./epm print version for package
\"\$
package_name
\"
>
\"\$
tmp_file
\"
2>>
\"\$
CI_PROJECT_DIR/epm-errors/
\$
package_name
\"
|| true"
echo
" if [ -s
\"\$
tmp_file
\"
]; then mv -f
\"\$
tmp_file
\"
\"\$
version_file_path
\"
; else rm -f
\"\$
tmp_file
\"
; fi"
echo
" fi"
# 4) final code: success is determined by the presence of the version file
echo
" - |"
echo
" if [ -s
\"\$
version_file_path
\"
]; then"
echo
" echo
\"
V Successful installation: version recorded in
\$
version_file_path
\"
"
echo
" final_exit_code=0"
echo
" else"
echo
" echo
\"
X Version not recorded. Installation or test error.
\"
"
echo
" final_exit_code=
\$
update_exit_code"
echo
" fi"
# 5) explicitly finish the job with the required exit code
echo
" - echo
\"
test rc:
\$
final_exit_code
\"
"
echo
" - exit
\"\$
final_exit_code
\"
"
echo
" - bash ./tests/run_one_ci.sh
$app
"
echo
" artifacts:"
echo
" when: always"
echo
" expire_in: 2 days"
...
...
tests/run_one_ci.sh
0 → 100644
View file @
b64a74cf
#!/usr/bin/env bash
set
-euo
pipefail
# args
APP
=
"
${
1
:?usage:
tests/run_one_ci.sh <app>
}
"
# layout
SCRIPT_DIR
=
"
$(
cd
"
$(
dirname
"
$0
"
)
"
&&
pwd
)
"
# .../repo/tests
REPO_ROOT
=
"
$(
cd
"
$SCRIPT_DIR
/.."
&&
pwd
)
"
# .../repo
PROJECT_DIR
=
"
${
CI_PROJECT_DIR
:-
$REPO_ROOT
}
"
LOGDIR
=
"
$PROJECT_DIR
"
PLAY_DIR
=
"
$LOGDIR
/epm-play-versions"
ERR_DIR
=
"
$LOGDIR
/epm-errors"
LOG_DIR
=
"
$LOGDIR
/epm-logs"
REQ_DIR
=
"
$LOGDIR
/epm-requires"
mkdir
-p
"
$PLAY_DIR
"
"
$ERR_DIR
"
"
$LOG_DIR
"
"
$REQ_DIR
"
# deps & env
cd
"
$REPO_ROOT
/bin"
./epmu
./epmi
-y
wget glibc-pthread git kubo coreutils
export
LOGDIR
export
EGET_IPFS_FORCE_LOAD
=
1
export
EPM_IPFS_DB_UPDATE_SKIPPING
=
1
export
EGET_IPFS_API
=
/ip4/91.232.225.49/tcp/5001
# run updater
set
+e
EPM
=
"
$(
pwd
)
/epm"
bash
"
$SCRIPT_DIR
/update_versions.sh"
--ipfs
--force
--slow
"
$APP
"
update_exit_code
=
$?
set
-e
# determine package name & version file path
package_name
=
"
$(
./epm play
--package-name
"
$APP
"
)
"
version_file_path
=
"
$PLAY_DIR
/
$package_name
"
# if version file missing, try to write it ourselves
if
[
!
-s
"
$version_file_path
"
]
;
then
tmp_file
=
"
$(
mktemp
)
"
./epm print version
for
package
"
$package_name
"
>
"
$tmp_file
"
2>>
"
$ERR_DIR
/
$package_name
"
||
true
if
[
-s
"
$tmp_file
"
]
;
then
mv
-f
"
$tmp_file
"
"
$version_file_path
"
else
rm
-f
"
$tmp_file
"
fi
fi
# final result: success if version file exists
if
[
-s
"
$version_file_path
"
]
;
then
echo
"V
$APP
: Test PASS for version ->
$version_file_path
"
final_exit_code
=
0
else
echo
"X
$APP
: Test FAILED"
final_exit_code
=
"
$update_exit_code
"
fi
echo
"exit code:
$final_exit_code
"
exit
"
$final_exit_code
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment