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
Vladislav
eepm
Commits
42ff9901
Commit
42ff9901
authored
Apr 18, 2022
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests/test_play.sh: improve to work
parent
2d47662e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
16 deletions
+55
-16
test_play.sh
tests/test_play.sh
+55
-16
No files found.
tests/test_play.sh
View file @
42ff9901
#!/bin/bash
# TODO: use epm from the sources
fatal
()
{
exit
1
...
...
@@ -8,17 +10,32 @@ fatal()
#set -e -x
#set -o pipefail
EPM
=
$(
realpath
$(
dirname
$0
)
/../bin/epm
)
if
[
"
$1
"
==
"--hasher"
]
;
then
shift
B
=
"
$2
"
;
[
-n
"
$B
"
]
&&
B
=
"-b
$B
"
loginhsh
-i
-t
-p
epm
$B
-r
true
curl iputils alien
B
=
''
if
[
"
$1
"
=
"-b"
]
;
then
shift
B
=
"-b
$1
"
shift
fi
APP
=
"
$1
"
if
[
"
$APP
"
==
"all"
]
;
then
$EPM
play
--list-all
--short
|
while
read
app
;
do
$0
--hasher
$B
$app
</dev/null
||
fatal
done
exit
fi
loginhsh
-i
-t
-p
epm
$B
-r
true
curl iputils eepm-repack apt-repo
loginhsh
-t
-p
epm
$B
-o
#exit
HDIR
=
$(
loginhsh
-q
-t
-d
-p
epm
$B
)
cp
-a
../
*
$HDIR
/chroot/.in
loginhsh
-t
-p
epm
$B
-o
-r
'bash -x /.in/tests/test_play.sh --local'
exit
#
cp
-afv
../
*
$HDIR
/chroot/.in
loginhsh
-t
-p
epm
$B
-o
-r
"bash -x /.in/tests/test_play.sh --local
$APP
"
||
exit
loginhsh
-c
-t
-p
epm
$B
exit
fi
...
...
@@ -28,27 +45,49 @@ if [ "$1" != "--local" ] ; then
exit
fi
shift
SILENT
=
''
if
[
"
$1
"
==
"--silent"
]
;
then
SILENT
=
"
$1
"
shift
fi
APP
=
"
$1
"
echo
"Check Internet connection ..."
cat
/etc/resolv.conf
ping
-c
ya.ru
ping
-c
8.8.8.8
ping
-c
1 ya.ru
ping
-c
1 8.8.8.8
epm repo
set
sisyphus
&&
epm repo change etersoft
&&
epm update
$EPM
--version
$EPM
print info
if
[
"
$1
"
==
"--silent
"
]
;
then
epm
play
--list-all
--short
|
while
read
app
;
do
if
[
-n
"
$SILENT
"
]
;
then
$EPM
play
--list-all
--short
|
while
read
app
;
do
echo
-n
"Silent installing
$app
... "
epm
play
$app
</dev/null
>
/dev/null 2>/dev/null
&&
echo
-n
"DONE"
||
{
echo
"ERROR"
;
continue
;
}
$EPM
--auto
play
$app
</dev/null
>
/dev/null 2>/dev/null
&&
echo
-n
"DONE"
||
{
echo
"ERROR"
;
continue
;
}
echo
-n
" Removing
$app
... "
epm
play
--remove
$app
</dev/null
>
/dev/null 2>/dev/null
&&
echo
-n
"DONE"
||
{
echo
"ERROR"
;
continue
;
}
$EPM
--auto
play
--remove
$app
</dev/null
>
/dev/null 2>/dev/null
&&
echo
-n
"DONE"
||
{
echo
"ERROR"
;
continue
;
}
done
exit
fi
epm play
--list-all
--short
|
while
read
app
;
do
if
[
-n
"
$APP
"
]
;
then
app
=
"
$APP
"
echo
echo
"Installing
$app
... "
epm play
$app
</dev/null
$EPM
--auto
play
--verbose
$app
</dev/null
||
exit
echo
" Removing
$app
... "
epm play
--remove
$app
</dev/null
$EPM
--auto
play
--remove
$app
</dev/null
exit
fi
$EPM
play
--list-all
--short
|
while
read
app
;
do
echo
echo
"Installing
$app
... "
$EPM
--auto
play
--verbose
$app
</dev/null
||
exit
echo
" Removing
$app
... "
$EPM
--auto
play
--remove
$app
</dev/null
done
exit
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