xref: /freebsd/usr.sbin/sa/tests/prime.sh (revision 6ba2210ee039f2f12878c217bcf058e9c8b26b29)
1#!/bin/sh
2#
3# Configure and run this script to create the files for regression testing
4# for a new architecture/configuration.
5#
6# $FreeBSD$
7#
8
9TZ=UTC; export TZ
10
11# Set this to the path of the current sa command
12SANEW=/usr/sbin/sa
13
14# Set this to the path of the sa as of 2007-05-19.
15# You can obtain it with a command like:
16# cvs co -D '2007-05-19' sa
17# To compile it you will also need sys/acct.h from that date
18# and sa configured to use that file, instead of the current version.
19SAOLD=/$HOME/src/sa/sa
20
21# Machine architecture
22ARCH=`uname -m`
23
24# Location of lastcomm regression files
25LCDIR=../../usr.bin/lastcomm
26
27$SANEW -u $LCDIR/v1-$ARCH-acct.in >v1-$ARCH-u.out
28$SANEW -u $LCDIR/v2-$ARCH-acct.in >v2-$ARCH-u.out
29$SANEW -i $LCDIR/v1-$ARCH-acct.in >v1-$ARCH-sav.out
30$SANEW -im $LCDIR/v1-$ARCH-acct.in >v1-$ARCH-usr.out
31cp $LCDIR/v1-$ARCH-acct.in acct.in
32rm -f v1-$ARCH-sav.in v1-$ARCH-usr.in
33$SAOLD -s -P v1-$ARCH-sav.in -U v1-$ARCH-usr.in acct.in >/dev/null
34cp $LCDIR/v1-$ARCH-acct.in acct.in
35rm -f v2-$ARCH-sav.in v2-$ARCH-usr.in
36$SANEW -s -P v2-$ARCH-sav.in -U v2-$ARCH-usr.in acct.in >/dev/null
37rm acct.in
38