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