Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GoikLectures
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Goik Martin
GoikLectures
Commits
547ea670
Commit
547ea670
authored
7 years ago
by
Goik Martin
Browse files
Options
Downloads
Patches
Plain Diff
Better automated evaluation
parent
d753f0aa
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
AuswertungKlausur/noten.sh
+43
-11
43 additions, 11 deletions
AuswertungKlausur/noten.sh
with
43 additions
and
11 deletions
AuswertungKlausur/noten.sh
+
43
−
11
View file @
547ea670
...
...
@@ -3,8 +3,30 @@
# TODO: devine marker string variable
# TODO: show non-compiling projects in logfile
#rm -rf Unpack
# The original examination project skeleton
PROJECTREF
=
~/workspace/GoikLectures/Klausuren/Sd1/2017Summer/Exam
# Representative of archive integrity
SRCREPRESENT
=
src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/HandyAbrechnung.java
# The executable jar archive containing unit tests
TESTJAR
=
sd1_2017sommer_exam-0.9-fat-tests.jar
# Strings like e.g. "Aufgabe 2" referencing "Aufgabe 2: (30/50)"
declare
-a
MARKERS
=(
"Aufgabe 1"
"Aufgabe 2"
)
# No changes beyond this line
#--------------------------------------------------------------------------------------------
mkdir
-p
Unpack
rm
-f
~/results.log
rm
-rf
~/results.log /tmp/Reference
cp
-r
$PROJECTREF
/tmp/Reference
pushd
/tmp/Reference
mvn eclipse:clean clean
;
rm
-rf
src/main/java
popd
for
zip
in
$(
ls
*
.zip
)
;
do
fbname
=
$(
basename
"
$zip
"
.zip
)
...
...
@@ -18,21 +40,31 @@ for zip in $( ls *.zip); do
if
[[
1
=
$nodeCount
&&
1
=
$dirCount
]]
;
then
echo
"Found exactly one directory component"
mv
*
project
if
[
-f
project/pom.xml
]
;
then
echo
"found pom.xml"
tar
zxf ~/goiksolution.tgz
mv
project/src/main/java/de/hdm_stuttgart/sw1 GoikSolution/src/main/java/de/hdm_stuttgart
cd
GoikSolution
;
mvn compile
reachedPoints
=
`
mvn
exec
:java
-Dexec
.mainClass
=
"de.hdm_stuttgart.eval.ShowReachedPoints"
|grep Test_Helper
`
echo
"
$fbname
$reachedPoints
"
>>
~/results.log
if
[
-f
project/
$SRCREPRESENT
]
;
then
echo
"found HandyAbrechnung.java"
cp
-r
/tmp/Reference
.
mv
project/src/main/java Reference/src/main
pushd
Reference
mvn compile test-compile
if
[
$?
-eq
0
]
;
then
mvn
-Dmaven
.test.skip
=
true
package
result
=
""
for
mark
in
"
${
MARKERS
[@]
}
"
;
do
result+
=
`
java
-jar
target/
$TESTJAR
|
grep
"
$mark
"
|sed
's/^[ ]*//'
`
result+
=
" "
done
else
result
=
"Project does not compile"
fi
popd
echo
"
$fbname
$result
"
>>
~/results.log
else
echo
"
$fbname
:
No pom.xml found in project
"
>>
~/results.log
echo
"
$fbname
:
$SRCREPRESENT
not found
"
>>
~/results.log
fi
else
echo
"
$fbname
: Found more than one directory component"
>>
~/results.log
fi
popd
popd
# return from Unpack
rm
-rf
Unpack
done
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment