mirror of
https://github.com/zaphar/test-tap.git
synced 2025-07-22 20:29:49 -04:00
script updates
This commit is contained in:
parent
5fe4f09d38
commit
663cecf262
@ -28,6 +28,8 @@ do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
MYDIR=$(dirname $0)
|
||||||
|
|
||||||
if [[ -z $DIRNAME ]]
|
if [[ -z $DIRNAME ]]
|
||||||
then
|
then
|
||||||
echo "No -d option was present. You must provide a Project path.";
|
echo "No -d option was present. You must provide a Project path.";
|
||||||
@ -37,37 +39,37 @@ fi
|
|||||||
|
|
||||||
echo "Setting up in project: ${DIRNAME}"
|
echo "Setting up in project: ${DIRNAME}"
|
||||||
|
|
||||||
|
|
||||||
#create our project directory
|
|
||||||
cd $DIRNAME
|
|
||||||
|
|
||||||
#set up the directory structure
|
#set up the directory structure
|
||||||
if [[ ! -d ext ]]
|
if [[ ! -d $DIRNAME/ext ]]
|
||||||
then
|
then
|
||||||
mkdir ext
|
echo Making ${DIRNAME}/ext
|
||||||
|
mkdir $DIRNAME/ext
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -d harness ]]
|
if [[ ! -d $DIRNAME/harness ]]
|
||||||
then
|
then
|
||||||
mkdir harness
|
echo Making ${DIRNAME}/harness
|
||||||
|
mkdir $DIRNAME/harness
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -d t || -d tests ]]
|
if [[ ! -d $DIRNAME/t || -d $DIRNAME/tests ]]
|
||||||
then
|
then
|
||||||
mkdir t
|
echo Making ${DIRNAME}/t
|
||||||
|
mkdir $DIRNAME/t
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#copy the files we need for initial setup
|
echo copy the files we need for initial setup
|
||||||
cp -r -f ~/sandbox/Test-TAP/lib/Test ext/
|
cp -r -f $MYDIR/../lib/Test $DIRNAME/ext/
|
||||||
if [[ -d t ]]
|
if [[ -d $DIRNAME/t ]]
|
||||||
then
|
then
|
||||||
cp -r -f ~/sandbox/Test-TAP/tmpl/TapHarness.html t/
|
echo copying TapHarness.html to $DIRNAME/t/
|
||||||
|
cp -r -f $MYDIR/../tmpl/TapHarness.html $DIRNAME/t/
|
||||||
elif [[ -d tests ]]
|
elif [[ -d tests ]]
|
||||||
then
|
then
|
||||||
cp -r -f ~/sandbox/Test-TAP/tmpl/TapHarness.html tests/
|
echo copying TapHarness.html to $DIRNAME/tests/
|
||||||
|
cp -r -f $MYDIR/../tmpl/TapHarness.html $DIRNAME/tests/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cp -r -f ~/sandbox/Test-TAP/tmpl/*rhino* harness/
|
echo copying rhino harnesses to $DIRNAME/harness/
|
||||||
|
cp -r -f $MYDIR/../tmpl/*rhino* $DIRNAME/harness/
|
||||||
|
|
||||||
#now go back to where we started
|
|
||||||
cd $WORKING
|
|
||||||
|
@ -28,6 +28,8 @@ do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
MYDIR=$(dirname $0)
|
||||||
|
|
||||||
if [[ -z $DIRNAME ]]
|
if [[ -z $DIRNAME ]]
|
||||||
then
|
then
|
||||||
echo "No -d option was present. You must provide a Project path.";
|
echo "No -d option was present. You must provide a Project path.";
|
||||||
@ -42,13 +44,13 @@ echo "Setting up in project: ${DIRNAME}"
|
|||||||
cd $DIRNAME
|
cd $DIRNAME
|
||||||
|
|
||||||
#set up the directory structure
|
#set up the directory structure
|
||||||
if [[ ! -d ext ]]
|
if [[ ! -d $DIRNAME/ext ]]
|
||||||
then
|
then
|
||||||
mkdir ext
|
mkdir $DIRNAME/ext
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#copy the files we need for initial setup
|
echo copying the javascript test libraries
|
||||||
cp -r -f ~/sandbox/Test-TAP/lib/Test ext/
|
cp -r -f $MYDIR/../lib/Test $DIRNAME/ext/
|
||||||
|
|
||||||
#now go back to where we started
|
#now go back to where we started
|
||||||
cd $WORKING
|
cd $WORKING
|
||||||
|
@ -47,11 +47,5 @@
|
|||||||
var results = [];
|
var results = [];
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" src="../ext/Test/TAPBrowser.js"></script>
|
<script type="text/javascript" src="../ext/Test/TAPBrowser.js"></script>
|
||||||
<script type="text/javascript">
|
|
||||||
window.onload = function() {
|
|
||||||
var browser = new Test.TAPBrowser(".", tests);
|
|
||||||
browser.run();
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user