diff options
| author | Leann Ogasawara <leann.ogasawara@canonical.com> | 2010-03-12 20:13:25 -0500 |
|---|---|---|
| committer | Leann Ogasawara <leann.ogasawara@canonical.com> | 2011-08-30 13:14:15 -0400 |
| commit | 5908b13c314952d55aa23a74355d5a1891a62474 (patch) | |
| tree | b6bd470e1bafa36c0824db145d6374c8a4a238df /debian/tests | |
| parent | 04aa37b5f943920017ad094e776cd5514b1a9246 (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/README | 21 | ||||
| -rwxr-xr-x | debian/tests/check-aliases | 24 |
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 @@ | |||
| 1 | Scripts placed in this directory get called one at a time by run-parts(8). | ||
| 2 | The scripts are expected to perform some sort of sanity checks on the | ||
| 3 | finished build. Scripts will be called once for each flavour. | ||
| 4 | |||
| 5 | Some environment variables are exported to make life a little easier: | ||
| 6 | |||
| 7 | DPKG_ARCH : The dpkg architecture (e.g. "amd64") | ||
| 8 | KERN_ARCH : The kernel architecture (e.g. "x86_64") | ||
| 9 | FLAVOUR : The specific flavour for this run (e.g. "generic") | ||
| 10 | VERSION : The full version of this build (e.g. 2.6.22-1) | ||
| 11 | REVISION : The exact revision of this build (e.g. 1.3) | ||
| 12 | PREV_REVISION : The revision prior to this one | ||
| 13 | ABI_NUM : The specific ABI number for this build (e.g. 2) | ||
| 14 | PREV_ABI_NUM : The previous ABI number. Can be the same as ABI_NUM. | ||
| 15 | BUILD_DIR : The directory where this build took place | ||
| 16 | INSTALL_DIR : The directory where the package is prepared | ||
| 17 | SOURCE_DIR : Where the main kernel source is | ||
| 18 | |||
| 19 | Scripts are expected to have a zero exit status when no problems occur, | ||
| 20 | and non-zero when an error occurs that should stop the build. Scripts | ||
| 21 | should 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 | |||
| 3 | my %map; | ||
| 4 | |||
| 5 | print "Checking for dupe aliases in $ENV{'FLAVOUR'}...\n"; | ||
| 6 | |||
| 7 | $aliases = | ||
| 8 | "$ENV{'INSTALL_DIR'}/lib/modules/$ENV{'VERSION'}-$ENV{'FLAVOUR'}/modules.alias"; | ||
| 9 | |||
| 10 | open(ALIASES, "< $aliases") or die "Could not open $aliases"; | ||
| 11 | |||
| 12 | while (<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 | |||
| 24 | exit(0); | ||
