aboutsummaryrefslogtreecommitdiffstats
path: root/debian/tests
diff options
context:
space:
mode:
authorLeann Ogasawara <leann.ogasawara@canonical.com>2010-03-12 20:13:25 -0500
committerLeann Ogasawara <leann.ogasawara@canonical.com>2011-08-30 13:14:15 -0400
commit5908b13c314952d55aa23a74355d5a1891a62474 (patch)
treeb6bd470e1bafa36c0824db145d6374c8a4a238df /debian/tests
parent04aa37b5f943920017ad094e776cd5514b1a9246 (diff)
UBUNTU: (no-up) fold down debian for ubuntu-oneiric 3.0-rc1 rebase
Ignore: yes Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Diffstat (limited to 'debian/tests')
-rw-r--r--debian/tests/README21
-rwxr-xr-xdebian/tests/check-aliases24
2 files changed, 45 insertions, 0 deletions
diff --git a/debian/tests/README b/debian/tests/README
new file mode 100644
index 00000000000..c74d1c4aef8
--- /dev/null
+++ b/debian/tests/README
@@ -0,0 +1,21 @@
1Scripts placed in this directory get called one at a time by run-parts(8).
2The scripts are expected to perform some sort of sanity checks on the
3finished build. Scripts will be called once for each flavour.
4
5Some environment variables are exported to make life a little easier:
6
7DPKG_ARCH : The dpkg architecture (e.g. "amd64")
8KERN_ARCH : The kernel architecture (e.g. "x86_64")
9FLAVOUR : The specific flavour for this run (e.g. "generic")
10VERSION : The full version of this build (e.g. 2.6.22-1)
11REVISION : The exact revision of this build (e.g. 1.3)
12PREV_REVISION : The revision prior to this one
13ABI_NUM : The specific ABI number for this build (e.g. 2)
14PREV_ABI_NUM : The previous ABI number. Can be the same as ABI_NUM.
15BUILD_DIR : The directory where this build took place
16INSTALL_DIR : The directory where the package is prepared
17SOURCE_DIR : Where the main kernel source is
18
19Scripts are expected to have a zero exit status when no problems occur,
20and non-zero when an error occurs that should stop the build. Scripts
21should print whatever info they deem needed to deduce the problem.
diff --git a/debian/tests/check-aliases b/debian/tests/check-aliases
new file mode 100755
index 00000000000..b85118ff12c
--- /dev/null
+++ b/debian/tests/check-aliases
@@ -0,0 +1,24 @@
1#!/usr/bin/perl -w
2
3my %map;
4
5print "Checking for dupe aliases in $ENV{'FLAVOUR'}...\n";
6
7$aliases =
8 "$ENV{'INSTALL_DIR'}/lib/modules/$ENV{'VERSION'}-$ENV{'FLAVOUR'}/modules.alias";
9
10open(ALIASES, "< $aliases") or die "Could not open $aliases";
11
12while (<ALIASES>) {
13 chomp;
14 my ($junk, $alias, $module) = split;
15
16 if (defined($map{$alias})) {
17 printf("%s %20s / %-20s : %s \n", ("$map{$alias}" eq "$module")
18 ? "INT" : " ", $map{$alias}, $module, $alias);
19 } else {
20 $map{$alias} = $module;
21 }
22}
23
24exit(0);