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

3
EPMPKGFILE=/usr/src/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

26
epm upgrade $EPMPKGFILE
27

28
epm 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
# Sisyphus -> p10
epm --auto --force --force-yes downgrade-release p10
52
restore_epm
Vitaly Lipatov's avatar
Vitaly Lipatov committed
53

54 55
# p10 -> p9
epm --auto --force --force-yes downgrade-release
56
restore_epm
Vitaly Lipatov's avatar
Vitaly Lipatov committed
57

58 59
# p9 -> p10
epm --auto --force --force-yes upgrade-release
60
restore_epm
Vitaly Lipatov's avatar
Vitaly Lipatov committed
61

62 63
# try upgrade again p10
epm --auto --force --force-yes upgrade-release
64
restore_epm
Vitaly Lipatov's avatar
Vitaly Lipatov committed
65

66 67
# p10 -> Sisyphus
epm --auto --force --force-yes upgrade-release Sisyphus
68
restore_epm
Vitaly Lipatov's avatar
Vitaly Lipatov committed
69 70 71

epm checkpkg eepm

72 73 74 75 76 77
epm upgrade eepm
restore_epm || :

epm downgrade eepm
restore_epm || :

Vitaly Lipatov's avatar
Vitaly Lipatov committed
78
epm clean