* [gentoo-commits] gentoo-projects commit in portage-utils/tests/profile: dotest
@ 2011-12-22 20:13 Mike Frysinger (vapier)
0 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger (vapier) @ 2011-12-22 20:13 UTC (permalink / raw
To: gentoo-commits
vapier 11/12/22 20:13:01
Added: dotest
Log:
start a testsuite for profile/config parsing
Revision Changes Path
1.1 portage-utils/tests/profile/dotest
file : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/tests/profile/dotest?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/tests/profile/dotest?rev=1.1&content-type=text/plain
Index: dotest
===================================================================
#!/bin/bash
. ../init.sh
qenv() {
# get q to dump its processed env so we can check
DEBUG= q 2>&1 >/dev/null
}
tenv() {
local profile=$1 var=$2 exp=$3
export PORTAGE_CONFIGROOT=${as}/profile${profile}
local e=$(qenv)
res=$(echo "${e}" | sed -n "/^${var} = /{s:^${var} = ::;p}")
[[ ${res} == "${exp}" ]]
if ! tend $? "(${profile}) ${var} = ${exp}" ; then
echo "we got: {${res}}"
echo "full env:"
echo "${e}" | while read line ; do
printf '\t{%s}\n' "${line}"
done
fi
}
# clear out env vars that would affect our tests
unset $(qenv | awk '{print $1}')
# test vars that should default to known values.
# cannot test too many more as portage's default
# make.globals will kick in.
tenv inv ROOT /
tenv inv ARCH
tenv inv PORTAGE_BINHOST
# this validates simple stuff
tenv 1 ARCH x86
tenv 1 INSTALL_MASK imask
# this validates -* behavior
tenv 1 CONFIG_PROTECT
# this indirectly validates relative sourcing
tenv 1 FEATURES feat
tenv 1 CONFIG_PROTECT_MASK asdf
tenv 1 ACCEPT_LICENSE lic
end
^ permalink raw reply [flat|nested] 6+ messages in thread
* [gentoo-commits] gentoo-projects commit in portage-utils/tests/profile: dotest
@ 2012-05-19 13:20 Mike Frysinger (vapier)
0 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger (vapier) @ 2012-05-19 13:20 UTC (permalink / raw
To: gentoo-commits
vapier 12/05/19 13:20:20
Modified: dotest
Log:
fix handling of quoted lines that do not end in a quote because they have trailing comments/whitespace #416585 by Nikoli
Revision Changes Path
1.2 portage-utils/tests/profile/dotest
file : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/tests/profile/dotest?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/tests/profile/dotest?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/tests/profile/dotest?r1=1.1&r2=1.2
Index: dotest
===================================================================
RCS file: /var/cvsroot/gentoo-projects/portage-utils/tests/profile/dotest,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- dotest 22 Dec 2011 20:13:01 -0000 1.1
+++ dotest 19 May 2012 13:20:20 -0000 1.2
@@ -7,6 +7,7 @@
DEBUG= q 2>&1 >/dev/null
}
+# Usage: <profile dir suffix> <variable> <value>
tenv() {
local profile=$1 var=$2 exp=$3
@@ -47,4 +48,8 @@
tenv 1 CONFIG_PROTECT_MASK asdf
tenv 1 ACCEPT_LICENSE lic
+# this validates trailing comment handling #416585
+tenv 1 PORTAGE_BINHOST http://someurl/
+tenv 1 NOCOLOR 1
+
end
^ permalink raw reply [flat|nested] 6+ messages in thread
* [gentoo-commits] gentoo-projects commit in portage-utils/tests/profile: dotest
@ 2012-06-08 4:43 Mike Frysinger (vapier)
0 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger (vapier) @ 2012-06-08 4:43 UTC (permalink / raw
To: gentoo-commits
vapier 12/06/08 04:43:00
Modified: dotest
Log:
do not try and test PORTAGE_BINHOST as unset by default since on some arches (like x86/linux) we actually default it to something (i.e. tinderbox) #412067 by Toralf Förster
Revision Changes Path
1.3 portage-utils/tests/profile/dotest
file : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/tests/profile/dotest?rev=1.3&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/tests/profile/dotest?rev=1.3&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/tests/profile/dotest?r1=1.2&r2=1.3
Index: dotest
===================================================================
RCS file: /var/cvsroot/gentoo-projects/portage-utils/tests/profile/dotest,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- dotest 19 May 2012 13:20:20 -0000 1.2
+++ dotest 8 Jun 2012 04:43:00 -0000 1.3
@@ -31,10 +31,11 @@
# test vars that should default to known values.
# cannot test too many more as portage's default
-# make.globals will kick in.
+# make.globals will kick in. also can't test
+# some vars (e.g. PORTAGE_BINHOST) that we default
+# on some platforms.
tenv inv ROOT /
tenv inv ARCH
-tenv inv PORTAGE_BINHOST
# this validates simple stuff
tenv 1 ARCH x86
^ permalink raw reply [flat|nested] 6+ messages in thread
* [gentoo-commits] gentoo-projects commit in portage-utils/tests/profile: dotest
@ 2012-10-28 10:29 Mike Frysinger (vapier)
0 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger (vapier) @ 2012-10-28 10:29 UTC (permalink / raw
To: gentoo-commits
vapier 12/10/28 10:29:38
Modified: dotest
Log:
improve trimming of quotes/whitespace when loading env files
Revision Changes Path
1.4 portage-utils/tests/profile/dotest
file : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/tests/profile/dotest?rev=1.4&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/tests/profile/dotest?rev=1.4&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/tests/profile/dotest?r1=1.3&r2=1.4
Index: dotest
===================================================================
RCS file: /var/cvsroot/gentoo-projects/portage-utils/tests/profile/dotest,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- dotest 8 Jun 2012 04:43:00 -0000 1.3
+++ dotest 28 Oct 2012 10:29:38 -0000 1.4
@@ -39,7 +39,7 @@
# this validates simple stuff
tenv 1 ARCH x86
-tenv 1 INSTALL_MASK imask
+tenv 1 INSTALL_MASK "imask x b"
# this validates -* behavior
tenv 1 CONFIG_PROTECT
^ permalink raw reply [flat|nested] 6+ messages in thread
* [gentoo-commits] gentoo-projects commit in portage-utils/tests/profile: dotest
@ 2013-04-03 18:39 Mike Frysinger (vapier)
0 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger (vapier) @ 2013-04-03 18:39 UTC (permalink / raw
To: gentoo-commits
vapier 13/04/03 18:39:22
Modified: dotest
Log:
dump usage to stderr when an error has happened to avoid things like foo=`qlist $emptyvar` from inserting content into $foo
Revision Changes Path
1.5 portage-utils/tests/profile/dotest
file : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/tests/profile/dotest?rev=1.5&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/tests/profile/dotest?rev=1.5&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/tests/profile/dotest?r1=1.4&r2=1.5
Index: dotest
===================================================================
RCS file: /var/cvsroot/gentoo-projects/portage-utils/tests/profile/dotest,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- dotest 28 Oct 2012 10:29:38 -0000 1.4
+++ dotest 3 Apr 2013 18:39:22 -0000 1.5
@@ -4,7 +4,7 @@
qenv() {
# get q to dump its processed env so we can check
- DEBUG= q 2>&1 >/dev/null
+ DEBUG= q -V 2>&1 >/dev/null
}
# Usage: <profile dir suffix> <variable> <value>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [gentoo-commits] gentoo-projects commit in portage-utils/tests/profile: dotest
@ 2013-10-31 2:40 Mike Frysinger (vapier)
0 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger (vapier) @ 2013-10-31 2:40 UTC (permalink / raw
To: gentoo-commits
vapier 13/10/31 02:40:24
Modified: dotest
Log:
fix bug related to var parsing w/out braces
Revision Changes Path
1.6 portage-utils/tests/profile/dotest
file : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/tests/profile/dotest?rev=1.6&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/tests/profile/dotest?rev=1.6&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/tests/profile/dotest?r1=1.5&r2=1.6
Index: dotest
===================================================================
RCS file: /var/cvsroot/gentoo-projects/portage-utils/tests/profile/dotest,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- dotest 3 Apr 2013 18:39:22 -0000 1.5
+++ dotest 31 Oct 2013 02:40:24 -0000 1.6
@@ -53,4 +53,7 @@
tenv 1 PORTAGE_BINHOST http://someurl/
tenv 1 NOCOLOR 1
+# this validates pathological vars
+tenv 1 PKGDIR " "
+
end
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-10-31 2:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-03 18:39 [gentoo-commits] gentoo-projects commit in portage-utils/tests/profile: dotest Mike Frysinger (vapier)
-- strict thread matches above, loose matches on Subject: below --
2013-10-31 2:40 Mike Frysinger (vapier)
2012-10-28 10:29 Mike Frysinger (vapier)
2012-06-08 4:43 Mike Frysinger (vapier)
2012-05-19 13:20 Mike Frysinger (vapier)
2011-12-22 20:13 Mike Frysinger (vapier)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox