Skip to content

Commit e1829b7

Browse files
author
owen-jones-diffblue
authored
Merge pull request diffblue#439 from diffblue/sakai-shell-script
Shell Script for Sakai assignment tool
2 parents 155e841 + a4d6bf9 commit e1829b7

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

benchmarks/GENUINE/README.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,11 @@ Install guide for Ubuntu:
697697
git clone https://github.com/sakaiproject/sakai.git
698698
2. Run these commands:
699699
cd sakai
700-
(optional) git checkout 8550c168cdf16363e864bfdfdbeae96a1e8eac51
700+
(optional) git checkout f333f0c
701+
3. Revert sanitiser introduced in 8550c16 by commenting out line 13559
702+
("rv = formattedText.processEscapedHtml(rv);") of
703+
assignment/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java
704+
4. Build and install
701705
mvn install sakai:deploy -Dmaven.tomcat.home="<full-path-to-sakai>/__dist__" -DskipTests -Dmaven.test.skip=true
702706
where <full-path-to-sakai> is the full path of the current working directory.
703707

benchmarks/GENUINE/Sakai.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/usr/bin/env bash
2+
3+
if [ -z "$SECURITY_SCANNER_HOME" ]; then
4+
echo "Need to set SECURITY_SCANNER_HOME to cmake directory"
5+
exit 1
6+
fi
7+
8+
set -u
9+
set -x
10+
11+
SCRIPT_WORKING_DIR=$(pwd)
12+
REPO_DIR=$SCRIPT_WORKING_DIR/sakai
13+
14+
# Clone repo and check out a commit which builds (head of master)
15+
git clone https://github.com/sakaiproject/sakai.git
16+
cd sakai
17+
git checkout f333f0c
18+
19+
# Revert the sanitiser introduced in 8550c16
20+
sed -i 's@rv = formattedText.processEscapedHtml(rv);@// rv = formattedText.processEscapedHtml(rv);@' assignment/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java
21+
22+
# Build Sakai
23+
mvn install sakai:deploy -Dmaven.tomcat.home="$REPO_DIR/__dist__" -DskipTests -Dmaven.test.skip=true
24+
25+
# Run security-analyser on each lesson which works separately
26+
cd $SECURITY_SCANNER_HOME
27+
28+
python3 $SCRIPT_WORKING_DIR/../../driver/run.py \
29+
-C $SCRIPT_WORKING_DIR/Sakai_rules.json \
30+
-I $REPO_DIR/__dist__/webapps/sakai-assignment-tool.war \
31+
-L $REPO_DIR/__dist__/lib \
32+
-R $SCRIPT_WORKING_DIR/Sakai-results \
33+
-T $SCRIPT_WORKING_DIR/Sakai-tmp \
34+
--name sakai_assignment_tool --verbosity 9 \
35+
--use-models-library --use-apache-tomcat --use-spring-framework \
36+
--do-not-use-precise-access-paths --timeout 10000000 \
37+
--entry-point org.sakaiproject.assignment.tool.AssignmentAction.doUpload_all

0 commit comments

Comments
 (0)