Contents
- .
- ./checkturnin.sh
- ./copy_assignments.sh
- ./genTestSuites.sh
- ./index.html
- ./printLab.sh
- ./updateCode.sh
. 1/7
[top][prev][next]
./checkturnin.sh 2/7
[top][prev][next]
# Script to check the students' turnin directories
# by Sara Sprenkle, 09.2007
#
ARGS=1 # Number of arguments expected.
E_BADARGS=65 # Exit value if incorrect number of args passed.
test $# -lt $ARGS && echo "Usage: `basename $0` <whichlab>" && exit $E_BADARGS
TURNINDIR=/csdept/local/courses/cs209/turnin
LAB=$1
for STUDENT in `ls $TURNINDIR`
do
# echo $STUDENT
if [ -e $TURNINDIR/$STUDENT ]; then
#echo $STUDENT
if [ -d $TURNINDIR/$STUDENT/$LAB ]; then
echo "--------------$STUDENT----------------"
ls -l $TURNINDIR/$STUDENT/$LAB
else
echo "** $STUDENT has not turned in $LAB"
fi
fi
done
./copy_assignments.sh 3/7
[top][prev][next]
# Copy the submissions for an assignment from the turnin directory
# into the grading directory
#
# Sara Sprenkle
ARGS=1 # Number of arguments expected.
E_BADARGS=65 # Exit value if incorrect number of args passed.
test $# -lt $ARGS && echo "Usage: `basename $0` <assignment>" && exit $E_BADARGS
assign=$1
TURNIN_PATH=/home/courses/cs297/turnin
DEST=$HOME/cs297/grading/$assign
mkdir -p $DEST
for student in `ls $TURNIN_PATH`
do
echo $student
stud_dir=$TURNIN_PATH/$student/$assign
if [ -d $stud_dir ]; then
echo Copying $stud_dir
cp -r $stud_dir $DEST/$student
else
echo $student has not turned in $assign
fi
done
./genTestSuites.sh 4/7
[top][prev][next]
# generate all test cases
# Sara Sprenkle, Summer 2008
NUM_TC=1000
MODEL_MAX=10
MODEL_MIN=2
conf=icst09
BASE=/hopper2/work/$conf/model_tc_data
EFG_BASE=$BASE #/home/shared/groups/webapp_research
NUM_REQUESTS=15 # number of requests per test case
NUM_SUITES=30 # number of suites to generate
#applications=("masplas cpm1 cpm2 cpm3 cpm4 cpm5 book dspace")
applications=("book dspace")
for app in $applications
do
echo $app
date
for i in `seq 1 $NUM_SUITES`
do
RESULTS_DIR_BASE=$BASE/$app/templates/1-gram
#echo $RESULTS_DIR_BASE
RES_DIR=$RESULTS_DIR_BASE/resource/$i
RES_NAME_DIR=$RESULTS_DIR_BASE/resource.paramname/$i
# get rid of old testcases
rm -rf $RES_DIR/
rm -rf $RES_NAME_DIR/
mkdir -p $RES_DIR
mkdir -p $RES_NAME_DIR
python generate_1gram_tc.py $NUM_TC $NUM_REQUESTS $EFG_BASE/$app/efgs/$conf/resource-1.dat $RES_DIR
python generate_1gram_tc.py $NUM_TC $NUM_REQUESTS $EFG_BASE/$app/efgs/$conf/resource+name-1.dat $RES_NAME_DIR
done
date
done
for app in $applications
do
echo "*********** Generating test cases for $app ******************"
for x in `seq $MODEL_MIN $MODEL_MAX`
do
date
for i in `seq 1 $NUM_SUITES`
do
RESULTS_DIR_BASE=$BASE/$app/templates/$x-gram
#echo $RESULTS_DIR_BASE
RES_DIR=$RESULTS_DIR_BASE/resource/$i
RES_NAME_DIR=$RESULTS_DIR_BASE/resource.paramname/$i
# get rid of old testcases
rm -rf $RES_DIR/
rm -rf $RES_NAME_DIR/
mkdir -p $RES_DIR
mkdir -p $RES_NAME_DIR
python generate_testcase.py $NUM_TC $EFG_BASE/$app/efgs/$conf/resource.$x-efg.dot $RES_DIR
python generate_testcase.py $NUM_TC $EFG_BASE/$app/efgs/$conf/resource+name.$x-efg.dot $RES_NAME_DIR
done
date
done
done
./index.html 5/7
[top][prev][next]
<html>
<head><title>Examples for /home/faculty/sprenkle/public_html/cs330/examples/02-systemsprogramming</title>
<link rel="stylesheet" type="text/css" href="http://www.cs.wlu.edu/~sprenkle/cs330/assignments/assign.css" />
</head>
<body>
<h1>Examples for /home/faculty/sprenkle/public_html/cs330/examples/02-systemsprogramming</h1>
<ul>
<li><a href=".//code.html">All IN ONE FILE (pretty syntax)</a>
<li><a href=".//checkturnin.sh">checkturnin.sh</a></li>
<li><a href=".//copy_assignments.sh">copy_assignments.sh</a></li>
<li><a href=".//genTestSuites.sh">genTestSuites.sh</a></li>
<li><a href=".//printLab.sh">printLab.sh</a></li>
<li><a href=".//updateCode.sh">updateCode.sh</a></li>
</ul>
</body>
./printLab.sh 6/7
[top][prev][next]
# Script to print the students' code neatly
# by Sara Sprenkle, 09.2007
#
ARGS=1 # Number of arguments expected.
E_BADARGS=65 # Exit value if incorrect number of args passed.
test $# -lt $ARGS && echo "Usage: `basename $0` <labdirname>" && exit $E_BADARGS
LABDIR=$1
if [ -f $LABDIR ];
then
echo "ERROR: entered argument must be a directory"
exit
fi
base=`basename $LABDIR`
#ls $LABDIR/
if [ -e $base.out ];
then
rm $base.out
fi
for FILE in `ls $LABDIR/`
do
if [ -f $LABDIR/$FILE ];
then
echo "Printing $FILE"
echo -----------------------$FILE-------------------- >> $base.out
cat $LABDIR/$FILE >> $base.out
fi
done
if [ -e $base.out ];
then
echo "CREATING FILE: $base.ps"
enscript -2r -Epython --word-wrap --mark-wrapped-lines=box $base.out -o $base.ps
else
echo "ERROR: $base.out does not exist; could not create ps file"
fi
./updateCode.sh 7/7
[top][prev][next]
# Update my copies of student's code.
# Sara Sprenkle
for year in 12 13 14
do
cd SLogo$year
svn update
cd ..
done
Generated by GNU Enscript 1.6.6.