1#!/bin/sh 2# 3# aegis - project change supervisor. 4# Copyright (C) 2011, 2012 Peter Miller 5# 6# This program is free software; you can redistribute it and/or modify 7# it under the terms of the GNU General Public License as published by 8# the Free Software Foundation; either version 3 of the License, or (at 9# your option) any later version. 10# 11# This program is distributed in the hope that it will be useful, 12# but WITHOUT ANY WARRANTY; without even the implied warranty of 13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14# General Public License for more details. 15# 16# You should have received a copy of the GNU General Public License along 17# with this program. If not, see <http://www.gnu.org/licenses/>. 18# 19 20TEST_SUBJECT="aemakegen rpm-spec" 21 22# load up standard prelude and test functions 23. test_funcs 24 25activity="new project 25" 26aegis -npr libtest -version - -v -dir $work/proj.dir \ 27 -lib $AEGIS_PATH > log 2>&1 28if test $? -ne 0 ; then cat log; no_result; fi 29 30AEGIS_PROJECT=libtest 31export AEGIS_PROJECT 32 33activity="project attributes 33" 34cat > paf << fubar 35developer_may_review = true; 36developer_may_integrate = true; 37reviewer_may_integrate = true; 38default_test_exemption = true; 39develop_end_action = goto_awaiting_integration; 40default_development_directory = "$work"; 41fubar 42if test $? -ne 0 ; then no_result; fi 43aegis -pa -f paf -v > log 2>&1 44if test $? -ne 0 ; then cat log; no_result; fi 45 46activity="staff 46" 47aegis -nd $USER -v > log 2>&1 48if test $? -ne 0 ; then cat log; no_result; fi 49aegis -nrv $USER -v > log 2>&1 50if test $? -ne 0 ; then cat log; no_result; fi 51aegis -ni $USER -v > log 2>&1 52if test $? -ne 0 ; then cat log; no_result; fi 53 54activity="new change 54" 55cat > caf << 'fubar' 56brief_description = "one"; 57cause = internal_enhancement; 58test_baseline_exempt = true; 59fubar 60if test $? -ne 0 ; then no_result; fi 61aegis -nc -f caf -v -p $AEGIS_PROJECT > log 2>&1 62if test $? -ne 0 ; then cat log; no_result; fi 63 64activity="develop begin 64" 65aegis -db 10 -v > log 2>&1 66if test $? -ne 0 ; then cat log; no_result; fi 67 68activity="new file 68" 69aegis -nf $work/libtest.C010/aegis.conf \ 70 $work/libtest.C010/libtest/bar.c \ 71 $work/libtest.C010/libtest/foo.c \ 72 $work/libtest.C010/libtest/libtest.h \ 73 $work/libtest.C010/fred/main.c \ 74 $work/libtest.C010/barney/main.c -v > log 2>&1 75if test $? -ne 0 ; then cat log; no_result; fi 76cat > $work/libtest.C010/aegis.conf << 'fubar' 77build_command = "exit 0"; 78 79history_get_command = "aesvt -check-out -edit ${quote $edit} " 80 "-history ${quote $history} -f ${quote $output}"; 81history_put_command = "aesvt -check-in -history ${quote $history} " 82 "-f ${quote $input}"; 83history_query_command = "aesvt -query -history ${quote $history}"; 84history_content_limitation = binary_capable; 85 86diff_command = "set +e; diff $orig $i > $out; test $$? -le 1"; 87diff3_command = "(diff3 -e $mr $orig $i | sed -e '/^w$$/d' -e '/^q$$/d'; \ 88 echo '1,$$p' ) | ed - $mr > $out"; 89link_integration_directory = true; 90 91test_command = "$sh $filename $arch"; 92 93project_specific = 94[ 95 { name = "aemakegen:debian:homepage"; value = "homepage-attribute"; }, 96 { name = "aemakegen:debian:maintainer"; value = "maintainer-attribute"; }, 97 { name = "aemakegen:debian:priority"; value = "important"; }, 98 { name = "aemakegen:debian:section"; value = "admin"; }, 99 { name = "aemakegen:libtool"; value = "true"; }, 100]; 101fubar 102if test $? -ne 0 ; then no_result; fi 103 104TAB=`awk 'BEGIN{printf("%c", 9)}' /dev/null` 105 106sed "s|{TAB}|${TAB}|g" > test.ok << 'fubar' 107# 108# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 109# 110# W W A RRRR N N III N N III N N GGG 111# W W A A R R NN N I NN N I NN N G G 112# W W A A RRRR N N N I N N N I N N N G 113# W W W AAAAA R R N NN I N NN I N NN G GG 114# W W W A A R R N N I N N I N N G G 115# W W A A R R N N III N N III N N GGG 116# 117# Warning: DO NOT send patches which fix this file. IT IS NOT the original 118# source file. This file is GENERATED from the Aegis repository file manifest. 119# If you find a bug in this file, it could well be an Aegis bug. 120# 121# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 122# 123Summary: libtest 124Name: libtest 125Version: C010 126Release: 1 127License: GPL 128Group: Development/Tools 129Source: homepage-attribute/%{name}-%{version}.tar.gz 130URL: homepage-attribute/ 131BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 132BuildPrereq: diffutils, libtool, sharutils 133 134%description 135This package contains the shared libraries for applications that libtest 136 137%package bin 138Summary: libtest programs 139 140%description bin 141libtest 142 143%package libs0 144Summary: libtest libraries 145Group: Development/Tools 146 147%description libs0 148This package contains the shared libraries for applications that libtest 149 150%package devel 151Summary: libtest development files 152Group: Development/Tools 153Requires: libtest-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} 154 155%description devel 156This package contains static libraries and header files for applications that 157libtest 158 159%post 160/sbin/ldconfig 161 162%postun 163/sbin/ldconfig 164 165 166%prep 167%setup -q 168 169 170%build 171%configure --sysconfdir=/etc --prefix=%{_prefix} 172make 173 174 175%install 176rm -rf $RPM_BUILD_ROOT 177make DESTDIR=$RPM_BUILD_ROOT install 178rm -f $RPM_BUILD_ROOT/usr/lib/*.la 179 180 181%check 182true 183 184 185%clean 186rm -rf $RPM_BUILD_ROOT 187 188 189%files bin 190%defattr (-,root,root,-) 191%doc LICENSE BUILDING README 192%{_bindir}/barney 193%{_bindir}/fred 194 195 196%files libs 197%defattr (-,root,root,-) 198%{_libdir}/libtest.so.* 199 200 201%files devel 202%defattr (-,root,root,-) 203%{_includedir}/libtest.h 204%{_libdir}/libtest.a 205%{_libdir}/libtest.so 206fubar 207if test $? -ne 0 ; then no_result; fi 208 209activity="aemakegen 209" 210aemakegen -c 10 --target=rpm-spec > test.out 211if test $? -ne 0 ; then fail; fi 212 213activity="check 213" 214diff test.ok test.out 215if test $? -ne 0 ; then fail; fi 216 217# 218# Only definite negatives are possible. 219# The functionality exercised by this test appears to work, 220# no other guarantees are made. 221# 222pass 223# vim: set ts=8 sw=4 et : 224