test_all.sh 1.17 KB
Newer Older
1
#!/bin/bash
2

3
EPMPKGFILE=/github/home/RPM/RPMS/noarch/eepm-3.*.rpm
4 5 6
# just a package
TESTPKG1=fakeroot
TESTPKG2=erc
7

Vitaly Lipatov's avatar
Vitaly Lipatov committed
8 9 10 11 12
fatal()
{
    exit 1
}

13 14 15
restore_epm()
{
	# in the far future: epm upgrade /usr/src/RPM/RPMS/noarch/*.rpm
16
	epm --auto install $EPMPKGFILE
17 18
}

19
set -e -x
Vitaly Lipatov's avatar
Vitaly Lipatov committed
20 21 22 23
set -o pipefail

epm print info

24 25
epm update

Vitaly Lipatov's avatar
Vitaly Lipatov committed
26
epm --auto upgrade $EPMPKGFILE
27

Vitaly Lipatov's avatar
Vitaly Lipatov committed
28
epm --auto downgrade $EPMPKGFILE
29

30 31 32 33 34
for i in $TESTPKG1 $TESTPKG2 ; do
    epm --auto remove $i
    epm --auto install $i
    epm --auto remove $i
done
35 36 37

epm --auto autoremove

Vitaly Lipatov's avatar
Vitaly Lipatov committed
38 39 40 41
epm --auto autoremove --direct

epm --auto autoorphans

42 43
epm --auto upgrade

Vitaly Lipatov's avatar
Vitaly Lipatov committed
44 45 46 47 48 49
epmqf bash

epm ql eepm | head

epm cl erc | head

50 51 52 53 54 55 56 57 58 59 60
epm checkpkg eepm

epm --auto upgrade eepm
restore_epm || :

epm --auto downgrade eepm
restore_epm || :

# stop upgrade (it is broken now)
exit 0

61 62
# Sisyphus -> p10
epm --auto --force --force-yes downgrade-release p10
63
restore_epm
Vitaly Lipatov's avatar
Vitaly Lipatov committed
64

65 66
# p10 -> p9
epm --auto --force --force-yes downgrade-release
67
restore_epm
Vitaly Lipatov's avatar
Vitaly Lipatov committed
68

69 70
# p9 -> p10
epm --auto --force --force-yes upgrade-release
71
restore_epm
Vitaly Lipatov's avatar
Vitaly Lipatov committed
72

73 74
# try upgrade again p10
epm --auto --force --force-yes upgrade-release
75
restore_epm
Vitaly Lipatov's avatar
Vitaly Lipatov committed
76

77 78
# p10 -> Sisyphus
epm --auto --force --force-yes upgrade-release Sisyphus
79
restore_epm
Vitaly Lipatov's avatar
Vitaly Lipatov committed
80

81

Vitaly Lipatov's avatar
Vitaly Lipatov committed
82
epm clean