1999-09-14 02:03:19 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Simple script to make a "shadow" test directory, using symbolic links.
|
|
|
|
# Typically you'd put the shadow in /tmp or another local disk
|
|
|
|
#
|
2012-03-05 14:10:39 +00:00
|
|
|
# Copyright (C) 1992-2012 Free Software Foundation, Inc.
|
2006-02-11 20:00:39 +00:00
|
|
|
# This file is part of GNU Make.
|
|
|
|
#
|
2007-07-04 19:35:15 +00:00
|
|
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
|
|
|
# the terms of the GNU General Public License as published by the Free Software
|
|
|
|
# Foundation; either version 3 of the License, or (at your option) any later
|
|
|
|
# version.
|
2006-02-11 20:00:39 +00:00
|
|
|
#
|
|
|
|
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
2007-07-04 19:35:15 +00:00
|
|
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
|
|
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
|
|
# details.
|
2006-02-11 20:00:39 +00:00
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License along with
|
2007-07-04 19:35:15 +00:00
|
|
|
# this program. If not, see <http://www.gnu.org/licenses/>.
|
1999-09-14 02:03:19 +00:00
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
"") echo 'Usage: mkshadow <destdir>'; exit 1 ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
dest="$1"
|
|
|
|
|
|
|
|
if [ ! -d "$dest" ]; then
|
2012-03-04 00:24:20 +00:00
|
|
|
echo "Destination directory '$dest' must exist!"
|
1999-09-14 02:03:19 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -f run_make_tests ]; then
|
|
|
|
echo "The current directory doesn't appear to contain the test suite!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
suite=`pwd | sed 's%^/tmp_mnt%%'`
|
|
|
|
name=`basename "$suite"`
|
|
|
|
|
|
|
|
files=`echo *`
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
mkdir "$dest/$name"
|
|
|
|
cd "$dest/$name"
|
|
|
|
|
|
|
|
ln -s "$suite" .testdir
|
|
|
|
|
|
|
|
for f in $files; do
|
|
|
|
ln -s .testdir/$f .
|
|
|
|
done
|
|
|
|
|
|
|
|
rm -rf work
|
|
|
|
|
2012-03-04 00:24:20 +00:00
|
|
|
echo "Shadow test suite created in '$dest/$name'."
|
1999-09-14 02:03:19 +00:00
|
|
|
exit 0
|