blob: 9183764fae41330f70f2a18e471ef6988d768760 [file] [log] [blame]
subrata_modak0c5f9702007-04-26 11:02:47 +00001#!/bin/bash
2#
3# Copyright 2007 IBM
4#
5# This program is free software; you can redistribute it and/or modify it
6# under the terms of the GNU General Public License as published by the Free
7# Software Foundation; either version 2 of the License, or (at your option)
8# any later version.
9#
10# test_containers.sh - Run the containers test suite.
11
12# Must be root to run the containers testsuite
13if [ $UID != 0 ]
14then
15 echo "FAILED: Must be root to execute this script"
16 exit 1
17fi
18
19# set the LTPROOT directory
20cd `dirname $0`
21LTPROOT=${PWD}
22echo $LTPROOT | grep testscripts > /dev/null 2>&1
23if [ $? -eq 0 ]
24then
25 cd ..
26 LTPROOT=${PWD}
27fi
28
29# set the PATH to include testcase/bin
30
31export PATH=$PATH:/usr/sbin:$LTPROOT/testcases/bin
32export LTPBIN=$LTPROOT/testcases/bin
33
34# We will store the logfiles in $LTPROOT/results, so make sure
35# it exists.
36if [ ! -d $LTPROOT/results ]
37then
38 mkdir $LTPROOT/results
39fi
40
41# Check the role and mode testsuite is being executed under.
42echo "Running the containers testsuite..."
43
yaberauneyacff95082010-01-12 08:35:59 +000044$LTPROOT/bin/ltp-pan -S -a $LTPROOT/results/containers -n ltp-containers -l $LTPROOT/results/containers.logfile -o $LTPROOT/results/containers.outfile -p -f $LTPROOT/runtest/containers
subrata_modak0c5f9702007-04-26 11:02:47 +000045
46echo "Done."
47exit 0