rbx.cp 0.5.46__py3-none-any.whl → 0.5.47__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. rbx/box/checkers.py +81 -28
  2. rbx/box/cli.py +12 -10
  3. rbx/box/packaging/boca/packager.py +44 -7
  4. rbx/box/packaging/main.py +7 -0
  5. rbx/box/packaging/moj/packager.py +88 -8
  6. rbx/box/packaging/packager.py +7 -2
  7. rbx/box/packaging/polygon/packager.py +5 -4
  8. rbx/box/solutions.py +2 -2
  9. rbx/box/stresses.py +0 -1
  10. rbx/box/tasks.py +6 -4
  11. rbx/grading/judge/sandbox.py +29 -1
  12. rbx/grading/judge/sandboxes/isolate.py +10 -0
  13. rbx/grading/judge/sandboxes/stupid_sandbox.py +16 -4
  14. rbx/grading/judge/sandboxes/timeit.py +12 -3
  15. rbx/grading/processing_context.py +48 -0
  16. rbx/grading/steps.py +24 -13
  17. rbx/resources/packagers/boca/checker.sh +8 -6
  18. rbx/resources/packagers/boca/compare.sh +48 -0
  19. rbx/resources/packagers/boca/interactive/c +207 -0
  20. rbx/resources/packagers/boca/interactive/cc +207 -0
  21. rbx/resources/packagers/boca/interactive/cpp +207 -0
  22. rbx/resources/packagers/boca/interactive/java +240 -0
  23. rbx/resources/packagers/boca/interactive/kt +231 -0
  24. rbx/resources/packagers/boca/interactive/py2 +209 -0
  25. rbx/resources/packagers/boca/interactive/py3 +209 -0
  26. rbx/resources/packagers/boca/interactor_compile.sh +45 -0
  27. rbx/resources/packagers/boca/run/bkp +163 -0
  28. rbx/resources/packagers/boca/run/c +19 -19
  29. rbx/resources/packagers/boca/run/cc +19 -19
  30. rbx/resources/packagers/boca/run/cpp +19 -19
  31. rbx/resources/packagers/boca/run/java +51 -51
  32. rbx/resources/packagers/boca/run/kt +30 -30
  33. rbx/resources/packagers/boca/run/py2 +42 -42
  34. rbx/resources/packagers/boca/run/py3 +42 -42
  35. rbx/resources/packagers/moj/scripts/c/compile.sh +19 -0
  36. rbx/resources/packagers/moj/scripts/c/prep.sh +5 -0
  37. rbx/resources/packagers/moj/scripts/c/run.sh +16 -0
  38. rbx/resources/packagers/moj/scripts/compare.sh +32 -6
  39. rbx/resources/packagers/moj/scripts/cpp/compile.sh +19 -0
  40. rbx/resources/packagers/moj/scripts/cpp/prep.sh +5 -0
  41. rbx/resources/packagers/moj/scripts/cpp/run.sh +16 -0
  42. rbx/resources/packagers/moj/scripts/interactor_prep.sh +14 -0
  43. rbx/resources/packagers/moj/scripts/interactor_run.sh +38 -0
  44. rbx/resources/packagers/moj/scripts/java/compile.sh +12 -0
  45. rbx/resources/packagers/moj/scripts/java/prep.sh +8 -0
  46. rbx/resources/packagers/moj/scripts/java/run.sh +17 -0
  47. rbx/resources/packagers/moj/scripts/py2/compile.sh +7 -0
  48. rbx/resources/packagers/moj/scripts/py2/prep.sh +5 -0
  49. rbx/resources/packagers/moj/scripts/py2/run.sh +16 -0
  50. rbx/resources/packagers/moj/scripts/py3/compile.sh +7 -0
  51. rbx/resources/packagers/moj/scripts/py3/prep.sh +5 -0
  52. rbx/resources/packagers/moj/scripts/py3/run.sh +16 -0
  53. {rbx_cp-0.5.46.dist-info → rbx_cp-0.5.47.dist-info}/METADATA +1 -1
  54. {rbx_cp-0.5.46.dist-info → rbx_cp-0.5.47.dist-info}/RECORD +57 -30
  55. rbx/resources/packagers/boca/compare +0 -53
  56. {rbx_cp-0.5.46.dist-info → rbx_cp-0.5.47.dist-info}/LICENSE +0 -0
  57. {rbx_cp-0.5.46.dist-info → rbx_cp-0.5.47.dist-info}/WHEEL +0 -0
  58. {rbx_cp-0.5.46.dist-info → rbx_cp-0.5.47.dist-info}/entry_points.txt +0 -0
@@ -45,36 +45,36 @@
45
45
  umask 0022
46
46
  id -u bocajail >/dev/null 2>/dev/null
47
47
  if [ $? == 0 ]; then
48
- bocau=`id -u bocajail`
49
- bocag=`id -g bocajail`
50
- chown bocajail.nogroup .
48
+ bocau=$(id -u bocajail)
49
+ bocag=$(id -g bocajail)
50
+ chown bocajail.nogroup .
51
51
  else
52
- bocau=`id -u nobody`
53
- bocag=`id -g nobody`
54
- chown nobody.nogroup .
52
+ bocau=$(id -u nobody)
53
+ bocag=$(id -g nobody)
54
+ chown nobody.nogroup .
55
55
  fi
56
56
  if [ "$bocau" == "" -o "$bocag" == "" ]; then
57
- echo "error finding user to run script"
58
- exit 43
57
+ echo "error finding user to run script"
58
+ exit 43
59
59
  fi
60
60
 
61
61
  # this script makes use of safeexec to execute the code with less privilegies
62
62
  # make sure that directories below are correct.
63
- sf=`which safeexec`
63
+ sf=$(which safeexec)
64
64
  [ -x "$sf" ] || sf=/usr/bin/safeexec
65
65
 
66
66
  if [ "$1" == "" -o "$2" == "" -o "$3" == "" ]; then
67
- echo "parameter problem"
68
- exit 43
67
+ echo "parameter problem"
68
+ exit 43
69
69
  fi
70
- name=`basename "$1"`
70
+ name=$(basename "$1")
71
71
  if [ ! -r "$2" ]; then
72
- echo "$2 not found (or is not in the current dir) or it's not readable"
73
- exit 45
72
+ echo "$2 not found (or is not in the current dir) or it's not readable"
73
+ exit 45
74
74
  fi
75
75
  if [ ! -x "$sf" ]; then
76
- echo "$sf not found or it's not executable"
77
- exit 46
76
+ echo "$sf not found or it's not executable"
77
+ exit 46
78
78
  fi
79
79
 
80
80
  time=$3
@@ -108,18 +108,18 @@ fi
108
108
  rm -f runit.retcode 2>/dev/null
109
109
  cp "$2" stdin0 2>/dev/null
110
110
 
111
- cdir=`pwd`
111
+ cdir=$(pwd)
112
112
  echo "Current directory is $cdir" >&2
113
113
  echo $cdir | grep -q "/bocajail"
114
114
  if [ $? == 0 ]; then
115
- cdir=`echo $cdir | sed "s/.*\/bocajail//"`
116
- cat <<EOF > runit.sh
115
+ cdir=$(echo $cdir | sed "s/.*\/bocajail//")
116
+ cat <<EOF >runit.sh
117
117
  #!/bin/bash
118
118
  cd "$cdir"
119
119
  [ -f /proc/cpuinfo ] || /bin/mount -t proc proc /proc
120
120
  #/bin/mount --bind /dev /dev
121
121
  [ -d /sys/kernel ] || /bin/mount -t sysfs sysfs /sys
122
- python2=`which python2`
122
+ python2=$(which python2)
123
123
  [ -x "\$python2" ] || python2=/usr/bin/python2
124
124
  if [ ! -x "\$python2" ]; then
125
125
  echo "\$python2 not found or it's not executable"
@@ -134,31 +134,31 @@ if [ ! -d /bocajail ]; then
134
134
  /bin/umount /sys 2>/dev/null
135
135
  fi
136
136
  EOF
137
- chmod 755 runit.sh
138
- chroot /bocajail "$cdir/runit.sh"
139
- if [ -r runit.retcode ]; then
140
- ret=`cat runit.retcode`
141
- fi
142
- if [ "$ret" == "" ]; then
143
- echo "Execution error - check autojudging"
144
- exit 49
145
- fi
137
+ chmod 755 runit.sh
138
+ chroot /bocajail "$cdir/runit.sh"
139
+ if [ -r runit.retcode ]; then
140
+ ret=$(cat runit.retcode)
141
+ fi
142
+ if [ "$ret" == "" ]; then
143
+ echo "Execution error - check autojudging"
144
+ exit 49
145
+ fi
146
146
  else
147
- echo "CODE NOT BEING CHROOTED. DO NOT RUN THIS ON THE MAIN SERVER" >&2
148
- echo "CODE NOT BEING CHROOTED. DO NOT RUN THIS ON THE MAIN SERVER" >&2
149
- echo "CODE NOT BEING CHROOTED. DO NOT RUN THIS ON THE MAIN SERVER" >&2
150
- python2=`which python2`
151
- [ -x "$python2" ] || python2=/usr/bin/python2
152
- if [ ! -x "$python2" ]; then
153
- echo "$python2 not found or it's not executable"
154
- exit 47
155
- fi
156
- "$sf" -r$nruns -t$time -T$ttime -istdin0 -F256 -u256 -U$bocau -G$bocag -ostdout0 -estderr0 -n0 -C. -d$maxm -m$maxm -f$maxf -- "$python2" "$name"
157
- ret=$?
147
+ echo "CODE NOT BEING CHROOTED. DO NOT RUN THIS ON THE MAIN SERVER" >&2
148
+ echo "CODE NOT BEING CHROOTED. DO NOT RUN THIS ON THE MAIN SERVER" >&2
149
+ echo "CODE NOT BEING CHROOTED. DO NOT RUN THIS ON THE MAIN SERVER" >&2
150
+ python2=$(which python2)
151
+ [ -x "$python2" ] || python2=/usr/bin/python2
152
+ if [ ! -x "$python2" ]; then
153
+ echo "$python2 not found or it's not executable"
154
+ exit 47
155
+ fi
156
+ "$sf" -r$nruns -t$time -T$ttime -istdin0 -F256 -u256 -U$bocau -G$bocag -ostdout0 -estderr0 -n0 -C. -d$maxm -m$maxm -f$maxf -- "$python2" "$name"
157
+ ret=$?
158
158
  fi
159
159
  if [ $ret -gt 10 ]; then
160
- echo "> > > > > > > Nonzero return code - possible runtime error - I'M GUESSING IT IS RUNTIME ERROR < < < < < < < <"
161
- ret=9
160
+ echo "> > > > > > > Nonzero return code - possible runtime error - I'M GUESSING IT IS RUNTIME ERROR < < < < < < < <"
161
+ ret=9
162
162
  fi
163
163
  if [ -f stdout0 ]; then
164
164
  cat stdout0
@@ -45,36 +45,36 @@
45
45
  umask 0022
46
46
  id -u bocajail >/dev/null 2>/dev/null
47
47
  if [ $? == 0 ]; then
48
- bocau=`id -u bocajail`
49
- bocag=`id -g bocajail`
50
- chown bocajail.nogroup .
48
+ bocau=$(id -u bocajail)
49
+ bocag=$(id -g bocajail)
50
+ chown bocajail.nogroup .
51
51
  else
52
- bocau=`id -u nobody`
53
- bocag=`id -g nobody`
54
- chown nobody.nogroup .
52
+ bocau=$(id -u nobody)
53
+ bocag=$(id -g nobody)
54
+ chown nobody.nogroup .
55
55
  fi
56
56
  if [ "$bocau" == "" -o "$bocag" == "" ]; then
57
- echo "error finding user to run script"
58
- exit 43
57
+ echo "error finding user to run script"
58
+ exit 43
59
59
  fi
60
60
 
61
61
  # this script makes use of safeexec to execute the code with less privilegies
62
62
  # make sure that directories below are correct.
63
- sf=`which safeexec`
63
+ sf=$(which safeexec)
64
64
  [ -x "$sf" ] || sf=/usr/bin/safeexec
65
65
 
66
66
  if [ "$1" == "" -o "$2" == "" -o "$3" == "" ]; then
67
- echo "parameter problem"
68
- exit 43
67
+ echo "parameter problem"
68
+ exit 43
69
69
  fi
70
- name=`basename "$1"`
70
+ name=$(basename "$1")
71
71
  if [ ! -r "$2" ]; then
72
- echo "$2 not found (or is not in the current dir) or it's not readable"
73
- exit 45
72
+ echo "$2 not found (or is not in the current dir) or it's not readable"
73
+ exit 45
74
74
  fi
75
75
  if [ ! -x "$sf" ]; then
76
- echo "$sf not found or it's not executable"
77
- exit 46
76
+ echo "$sf not found or it's not executable"
77
+ exit 46
78
78
  fi
79
79
 
80
80
  time=$3
@@ -108,18 +108,18 @@ fi
108
108
  rm -f runit.retcode 2>/dev/null
109
109
  cp "$2" stdin0 2>/dev/null
110
110
 
111
- cdir=`pwd`
111
+ cdir=$(pwd)
112
112
  echo "Current directory is $cdir" >&2
113
113
  echo $cdir | grep -q "/bocajail"
114
114
  if [ $? == 0 ]; then
115
- cdir=`echo $cdir | sed "s/.*\/bocajail//"`
116
- cat <<EOF > runit.sh
115
+ cdir=$(echo $cdir | sed "s/.*\/bocajail//")
116
+ cat <<EOF >runit.sh
117
117
  #!/bin/bash
118
118
  cd "$cdir"
119
119
  [ -f /proc/cpuinfo ] || /bin/mount -t proc proc /proc
120
120
  #/bin/mount --bind /dev /dev
121
121
  [ -d /sys/kernel ] || /bin/mount -t sysfs sysfs /sys
122
- python3=`which python3`
122
+ python3=$(which python3)
123
123
  [ -x "\$python3" ] || python3=/usr/bin/python3
124
124
  if [ ! -x "\$python3" ]; then
125
125
  echo "\$python3 not found or it's not executable"
@@ -134,31 +134,31 @@ if [ ! -d /bocajail ]; then
134
134
  /bin/umount /sys 2>/dev/null
135
135
  fi
136
136
  EOF
137
- chmod 755 runit.sh
138
- chroot /bocajail "$cdir/runit.sh"
139
- if [ -r runit.retcode ]; then
140
- ret=`cat runit.retcode`
141
- fi
142
- if [ "$ret" == "" ]; then
143
- echo "Execution error - check autojudging"
144
- exit 49
145
- fi
137
+ chmod 755 runit.sh
138
+ chroot /bocajail "$cdir/runit.sh"
139
+ if [ -r runit.retcode ]; then
140
+ ret=$(cat runit.retcode)
141
+ fi
142
+ if [ "$ret" == "" ]; then
143
+ echo "Execution error - check autojudging"
144
+ exit 49
145
+ fi
146
146
  else
147
- echo "CODE NOT BEING CHROOTED. DO NOT RUN THIS ON THE MAIN SERVER" >&2
148
- echo "CODE NOT BEING CHROOTED. DO NOT RUN THIS ON THE MAIN SERVER" >&2
149
- echo "CODE NOT BEING CHROOTED. DO NOT RUN THIS ON THE MAIN SERVER" >&2
150
- python3=`which python3`
151
- [ -x "$python3" ] || python3=/usr/bin/python3
152
- if [ ! -x "$python3" ]; then
153
- echo "$python3 not found or it's not executable"
154
- exit 47
155
- fi
156
- "$sf" -r$nruns -t$time -T$ttime -istdin0 -F256 -u256 -U$bocau -G$bocag -ostdout0 -estderr0 -n0 -C. -d$maxm -m$maxm -f$maxf -- "$python3" "$name"
157
- ret=$?
147
+ echo "CODE NOT BEING CHROOTED. DO NOT RUN THIS ON THE MAIN SERVER" >&2
148
+ echo "CODE NOT BEING CHROOTED. DO NOT RUN THIS ON THE MAIN SERVER" >&2
149
+ echo "CODE NOT BEING CHROOTED. DO NOT RUN THIS ON THE MAIN SERVER" >&2
150
+ python3=$(which python3)
151
+ [ -x "$python3" ] || python3=/usr/bin/python3
152
+ if [ ! -x "$python3" ]; then
153
+ echo "$python3 not found or it's not executable"
154
+ exit 47
155
+ fi
156
+ "$sf" -r$nruns -t$time -T$ttime -istdin0 -F256 -u256 -U$bocau -G$bocag -ostdout0 -estderr0 -n0 -C. -d$maxm -m$maxm -f$maxf -- "$python3" "$name"
157
+ ret=$?
158
158
  fi
159
159
  if [ $ret -gt 10 ]; then
160
- echo "> > > > > > > Nonzero return code - possible runtime error - I'M GUESSING IT IS RUNTIME ERROR < < < < < < < <"
161
- ret=9
160
+ echo "> > > > > > > Nonzero return code - possible runtime error - I'M GUESSING IT IS RUNTIME ERROR < < < < < < < <"
161
+ ret=9
162
162
  fi
163
163
  if [ -f stdout0 ]; then
164
164
  cat stdout0
@@ -0,0 +1,19 @@
1
+ #!/bin/bash
2
+
3
+ exec 2>/tmp/stderrlog >/tmp/out
4
+ cd /tmp/rwdir
5
+
6
+ cat >Makefile <<'EOF'
7
+
8
+ SRC=$(wildcard *.c)
9
+ CFLAGS={{rbxFlags}}
10
+
11
+ all: $(patsubst %.c,%,${SRC})
12
+
13
+ %: %.c
14
+ @gcc ${CFLAGS} $^ -o $@ -lm
15
+ @echo BIN=$@
16
+ EOF
17
+
18
+ unset MAKELEVEL
19
+ make
@@ -0,0 +1,5 @@
1
+ #!/bin/bash
2
+
3
+ INTERACTOR_PREP=$PROBLEMTEMPLATEDIR/scripts/interactor_prep.sh
4
+
5
+ [[ -e $INTERACTOR_PREP ]] && $INTERACTOR_PREP $1
@@ -0,0 +1,16 @@
1
+ #!/bin/bash
2
+
3
+ exec &>/tmp/stderrlog
4
+
5
+ #ulimit -a
6
+
7
+ cd /tmp/dir
8
+ source binfile.sh
9
+
10
+ CMD=./$BIN
11
+
12
+ if [[ -e interactor_run.sh ]]; then
13
+ source interactor_run.sh
14
+ fi
15
+
16
+ exec $CMD </tmp/in >/tmp/out
@@ -37,14 +37,40 @@ if [ ! -r "$CHECKERSOURCE" ]; then
37
37
  exit 47
38
38
  fi
39
39
 
40
- WORKDIR=$(dirname "$1")
40
+ WORKDIRBASE=$(dirname "$1")
41
+ WORKDIR=$WORKDIRBASE/cagefiles/
41
42
  CHECKERHASH={{checkerHash}}
42
- CHECKERPATH=$WORKDIR/$CHECKERHASH
43
+ CHECKERPATH=$WORKDIRBASE/$CHECKERHASH
44
+
45
+ # Get basename of the input file.
46
+ FILE=$(basename $3)
47
+ STDERRLOG=$WORKDIR/$FILE-stderr
48
+
49
+ echo "input stderr $STDERRLOG "
50
+ if [[ -e $STDERRLOG ]]; then
51
+ INTERACTOREXITCODE=$(grep '^interactor exitcode' $STDERRLOG | awk '{print $NF}')
52
+ echo "interactor exitcode = $INTERACTOREXITCODE"
53
+ if [[ -n $INTERACTOREXITCODE ]]; then
54
+ if [[ $INTERACTOREXITCODE -eq 1 ]]; then
55
+ echo "interactor return wrong answer"
56
+ exit 6
57
+ elif [[ $INTERACTOREXITCODE -eq 2 ]]; then
58
+ echo "interactor invalid input"
59
+ exit 6
60
+ elif [[ $INTERACTOREXITCODE -eq 3 ]]; then
61
+ echo "interactor failed with exit code 3"
62
+ exit 43
63
+ else
64
+ echo "interactor failed with exit code $INTERACTOREXITCODE"
65
+ exit 47
66
+ fi
67
+ fi
68
+ fi
43
69
 
44
70
  lock() {
45
71
  MAX_ATTEMPTS=100
46
72
  ATTEMPTS=0
47
- while ! ln -s $CHECKERSOURCE $CHECKERPATH.lock; do
73
+ while ! ln -s $CHECKERSOURCE $CHECKERPATH.lock 2>/dev/null; do
48
74
  sleep 1
49
75
  ATTEMPTS=$((ATTEMPTS + 1))
50
76
  if [ $ATTEMPTS -ge $MAX_ATTEMPTS ]; then
@@ -93,9 +119,9 @@ elif [ $EC -eq 1 ]; then
93
119
  echo "checker found differences"
94
120
  exit 6
95
121
  elif [ $EC -eq 2 ]; then
96
- echo "checker failed"
97
- exit 5
122
+ echo "checker found invalid output"
123
+ exit 6
98
124
  elif [ $EC -ne 3 ]; then
99
- echo "unkown compare error $EC"
125
+ echo "judge failed with $EC"
100
126
  exit 43
101
127
  fi
@@ -0,0 +1,19 @@
1
+ #!/bin/bash
2
+
3
+ exec 2>/tmp/stderrlog >/tmp/out
4
+ cd /tmp/rwdir
5
+
6
+ cat >Makefile <<'EOF'
7
+
8
+ SRC=$(wildcard *.cpp)
9
+ CXXFLAGS={{rbxFlags}}
10
+
11
+ all: $(patsubst %.cpp,%,${SRC})
12
+
13
+ %: %.cpp
14
+ @g++ ${CXXFLAGS} $^ -o $@ -lm
15
+ @echo BIN=$@
16
+ EOF
17
+
18
+ unset MAKELEVEL
19
+ make
@@ -0,0 +1,5 @@
1
+ #!/bin/bash
2
+
3
+ INTERACTOR_PREP=$PROBLEMTEMPLATEDIR/scripts/interactor_prep.sh
4
+
5
+ [[ -e $INTERACTOR_PREP ]] && $INTERACTOR_PREP $1
@@ -0,0 +1,16 @@
1
+ #!/bin/bash
2
+
3
+ exec &>/tmp/stderrlog
4
+
5
+ #ulimit -a
6
+
7
+ cd /tmp/dir
8
+ source binfile.sh
9
+
10
+ CMD=./$BIN
11
+
12
+ if [[ -e interactor_run.sh ]]; then
13
+ source interactor_run.sh
14
+ fi
15
+
16
+ exec $CMD </tmp/in >/tmp/out
@@ -0,0 +1,14 @@
1
+ #!/bin/bash
2
+ function LOG() {
3
+ echo "$*" >&2
4
+ }
5
+
6
+ LOG "Compiling interactor"
7
+
8
+ g++ -ggdb3 -O2 $(dirname $0)/interactor.cpp -o $1/interactor
9
+
10
+ LOG "Interactor compiled at $1/interactor"
11
+
12
+ cp $(dirname $0)/interactor_run.sh $1/interactor_run.sh
13
+ LOG "Interactor run script copied to $1/interactor_run.sh"
14
+ chmod +x $1/interactor_run.sh
@@ -0,0 +1,38 @@
1
+ #!/bin/bash
2
+ exec 2>/tmp/stderrlog
3
+
4
+ mkfifo /tmp/fifo.in /tmp/fifo.out
5
+
6
+ # Solutions stderr is eaten in interactor problems.
7
+ $CMD </tmp/fifo.in >/tmp/fifo.out &
8
+ PIDSOLUTION=$!
9
+
10
+ /tmp/dir/interactor /tmp/in /tmp/out >/tmp/fifo.in </tmp/fifo.out 2>/tmp/interactor.log &
11
+ PIDINTERACTOR=$!
12
+
13
+ wait $PIDSOLUTION
14
+ EXITCODESOLUTION=$?
15
+
16
+ wait $PIDINTERACTOR
17
+ EXITCODEINTERACTOR=$?
18
+
19
+ echo "interactor $PIDINTERACTOR -> $EXITCODEINTERACTOR" >&2
20
+ echo "solution $PIDSOLUTION -> $EXITCODESOLUTION" >&2
21
+
22
+ cat /tmp/interactor.log >&2
23
+
24
+ if [[ $EXITCODEINTERACTOR -ge 1 ]] && [[ $EXITCODEINTERACTOR -le 4 ]]; then
25
+ echo "interactor exitcode $EXITCODEINTERACTOR" >&2
26
+ exit 0
27
+ fi
28
+
29
+ if [[ $EXITCODESOLUTION -ne 0 ]]; then
30
+ exit $EXITCODESOLUTION
31
+ fi
32
+
33
+ if [[ $EXITCODEINTERACTOR -ne 0 ]]; then
34
+ echo "interactor exitcode $EXITCODEINTERACTOR" >&2
35
+ exit $EXITCODEINTERACTOR
36
+ fi
37
+
38
+ exit 0
@@ -0,0 +1,12 @@
1
+ #!/bin/bash
2
+
3
+ exec 2>/tmp/stderrlog >/tmp/out
4
+ cd /tmp/rwdir
5
+
6
+ export JAVA_TOOL_OPTIONS="-Xmx300M -Xms50M -Xss10M -XX:MaxMetaspaceSize=256m -XX:CompressedClassSpaceSize=64m"
7
+ javac *java
8
+ RET=$?
9
+ #java -Xms10m -Xmx500m -Xss10m
10
+
11
+ echo BIN=$(ls *.class)
12
+ exit $RET
@@ -0,0 +1,8 @@
1
+ #!/bin/bash
2
+
3
+ [[ -e /etc/java-21-openjdk/ ]] && EXTRABINDINGS+="-b /etc/java-21-openjdk/"
4
+ [[ -e /etc/java ]] && EXTRABINDINGS+=" -b /etc/java"
5
+
6
+ INTERACTOR_PREP=$PROBLEMTEMPLATEDIR/scripts/interactor_prep.sh
7
+
8
+ [[ -e $INTERACTOR_PREP ]] && $INTERACTOR_PREP $1
@@ -0,0 +1,17 @@
1
+ #!/bin/bash
2
+
3
+ exec &>/tmp/stderrlog
4
+
5
+ #ulimit -a
6
+
7
+ cd /tmp/dir
8
+ source binfile.sh
9
+
10
+ export CLASSPATH=$PWD
11
+ CMD="java -Xmx{{rbxMaxMemory}}M -Xss256M $(basename $BIN .class)"
12
+
13
+ if [[ -e interactor_run.sh ]]; then
14
+ source interactor_run.sh
15
+ fi
16
+
17
+ exec $CMD </tmp/in >/tmp/out
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+
3
+ exec 2>/tmp/stderrlog > /tmp/out
4
+ cd /tmp/rwdir
5
+
6
+ chmod a+x *py2
7
+ echo BIN=$(ls *py2)
@@ -0,0 +1,5 @@
1
+ #!/bin/bash
2
+
3
+ INTERACTOR_PREP=$PROBLEMTEMPLATEDIR/scripts/interactor_prep.sh
4
+
5
+ [[ -e $INTERACTOR_PREP ]] && $INTERACTOR_PREP $1
@@ -0,0 +1,16 @@
1
+ #!/bin/bash
2
+
3
+ exec &>/tmp/stderrlog
4
+
5
+ #ulimit -a
6
+
7
+ cd /tmp/dir
8
+ source binfile.sh
9
+
10
+ CMD="python ./$BIN"
11
+
12
+ if [[ -e interactor_run.sh ]]; then
13
+ source interactor_run.sh
14
+ fi
15
+
16
+ exec $CMD </tmp/in >/tmp/out
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+
3
+ exec 2>/tmp/stderrlog > /tmp/out
4
+ cd /tmp/rwdir
5
+
6
+ chmod a+x *py*
7
+ echo BIN=$(ls *py*)
@@ -0,0 +1,5 @@
1
+ #!/bin/bash
2
+
3
+ INTERACTOR_PREP=$PROBLEMTEMPLATEDIR/scripts/interactor_prep.sh
4
+
5
+ [[ -e $INTERACTOR_PREP ]] && $INTERACTOR_PREP $1
@@ -0,0 +1,16 @@
1
+ #!/bin/bash
2
+
3
+ exec &>/tmp/stderrlog
4
+
5
+ #ulimit -a
6
+
7
+ cd /tmp/dir
8
+ source binfile.sh
9
+
10
+ CMD="python3 ./$BIN"
11
+
12
+ if [[ -e interactor_run.sh ]]; then
13
+ source interactor_run.sh
14
+ fi
15
+
16
+ exec $CMD </tmp/in >/tmp/out
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: rbx.cp
3
- Version: 0.5.46
3
+ Version: 0.5.47
4
4
  Summary:
5
5
  Author: Roberto Sales
6
6
  Requires-Python: >=3.9,<4.0