File tree Expand file tree Collapse file tree 7 files changed +64
-9
lines changed Expand file tree Collapse file tree 7 files changed +64
-9
lines changed Original file line number Diff line number Diff line change @@ -98,14 +98,17 @@ RUN set -xe && \
98
98
apt-get install -y mono-complete mono-vbnc && \
99
99
rm -rf /var/lib/apt/lists/*
100
100
101
- COPY init-files /init-files
102
-
101
+ COPY files /files
103
102
COPY cron /etc/cron.d
103
+
104
104
RUN set -xe && \
105
105
apt-get update -o Acquire::Check-Valid-Until=false && \
106
106
apt-get install -y --no-install-recommends cron && \
107
107
rm -rf /var/lib/apt/lists/* && \
108
- cat /etc/cron.d/* | crontab -
108
+ cat /etc/cron.d/* | crontab - && \
109
+ dotnet restore --packages /NuGet/packages /files/nunit/Test.csproj && \
110
+ dotnet nuget locals all --clear && \
111
+ rm -rf /files/nunit/obj
109
112
110
113
COPY docker-entrypoint.sh /
111
114
ENTRYPOINT ["/docker-entrypoint.sh" ]
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ <Project Sdk =" Microsoft.NET.Sdk" >
2
+ <PropertyGroup >
3
+ <TargetFramework >netcoreapp3.1</TargetFramework >
4
+ <IsPackable >false</IsPackable >
5
+ </PropertyGroup >
6
+ <ItemGroup >
7
+ <PackageReference Include =" nunit" Version =" 3.12.0" />
8
+ <PackageReference Include =" NUnit3TestAdapter" Version =" 3.15.1" />
9
+ <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 16.4.0" />
10
+ </ItemGroup >
11
+ </Project >
Original file line number Diff line number Diff line change @@ -2,5 +2,5 @@ VERSIONS="3.1.302"
2
2
NAME =" C# (.NET Core SDK $VERSION)"
3
3
SOURCE_FILE =" Main.cs"
4
4
BINARY_FILE =" "
5
- COMPILE_CMD =" cp /init- files/Project.csproj . && mkdir -p ~/.dotnet && touch ~/.dotnet/$VERSION.dotnetFirstUseSentinel && /usr/bin/dotnet build $ARGS Project .csproj"
6
- RUN_CMD =" /usr/bin/dotnet run --no-build Project .csproj $ARGS"
5
+ COMPILE_CMD =" cp /files/c#-dotnet/* . && mkdir -p ~/.dotnet && touch ~/.dotnet/$VERSION.dotnetFirstUseSentinel && /usr/bin/dotnet build $ARGS Main .csproj"
6
+ RUN_CMD =" /usr/bin/dotnet run --no-build Main .csproj $ARGS"
Original file line number Diff line number Diff line change
1
+ using NUnit . Framework ;
2
+
3
+ public class Calculator
4
+ {
5
+ public int add ( int a , int b )
6
+ {
7
+ return a + b ;
8
+ }
9
+ }
10
+
11
+ [ TestFixture ]
12
+ public class Tests
13
+ {
14
+ private Calculator calculator ;
15
+
16
+ [ SetUp ]
17
+ protected void SetUp ( )
18
+ {
19
+ calculator = new Calculator ( ) ;
20
+ }
21
+
22
+ [ Test ]
23
+ public void NeutralElement ( )
24
+ {
25
+ Assert . AreEqual ( 1 , calculator . add ( 1 , 0 ) ) ;
26
+ Assert . AreEqual ( 1 , calculator . add ( 0 , 1 ) ) ;
27
+ Assert . AreEqual ( 0 , calculator . add ( 0 , 0 ) ) ;
28
+ }
29
+
30
+ [ Test ]
31
+ public void CommutativeProperty ( )
32
+ {
33
+ Assert . AreEqual ( calculator . add ( 2 , 3 ) , calculator . add ( 3 , 2 ) ) ;
34
+ }
35
+ }
Original file line number Diff line number Diff line change
1
+ VERSIONS =" 3.1.302"
2
+ NAME =" C# Test (.NET Core SDK $VERSION, NUnit 3.12.0)"
3
+ SOURCE_FILE =" Test.cs"
4
+ BINARY_FILE =" "
5
+ COMPILE_CMD =" cp /files/nunit/* . && mkdir -p ~/.dotnet && touch ~/.dotnet/$VERSION.dotnetFirstUseSentinel && dotnet restore --source /NuGet/packages && dotnet build --no-restore $ARGS Test.csproj"
6
+ RUN_CMD =" /usr/bin/dotnet test --no-build Test.csproj $ARGS"
Original file line number Diff line number Diff line change @@ -79,9 +79,9 @@ for directory in *; do
79
79
echo " Compiling inside isolate."
80
80
81
81
set +e
82
- isolate --cg -i /dev/null -t 15 -x 0 -w 20 -k 128000 -p120 --cg-timing --cg-mem=512000 -f 10240 \
82
+ isolate --cg -i /dev/null -t 15 -x 0 -w 20 -k 128000 -p120 --cg-timing --cg-mem=512000 -f 20480 \
83
83
-E HOME=/tmp -E PATH=" /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \
84
- -E LANG -E LANGUAGE -E LC_ALL -d /etc:noexec -d /init- files:noexec -d /usr/local/BosqueLanguage/impl:rw --run -- /bin/bash compile
84
+ -E LANG -E LANGUAGE -E LC_ALL -d /etc:noexec -d /files:noexec -d /NuGet/packages :noexec -d /usr/local/BosqueLanguage/impl:rw --run -- /bin/bash compile
85
85
86
86
if [[ $? != 0 ]]; then
87
87
if [[ $SKIP_CLEANUP != true ]]; then
@@ -107,9 +107,9 @@ for directory in *; do
107
107
echo " Running inside isolate."
108
108
109
109
set +e
110
- isolate --cg -t 5 -x 0.5 -w 5 -k 64000 -p60 --cg-timing --cg-mem=128000 --share-net -f 5120 \
110
+ isolate --cg -t 10 -x 1 -w 15 -k 64000 -p100 --cg-timing --cg-mem=128000 --share-net -f 5120 \
111
111
-E HOME=/tmp -E PATH=" /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \
112
- -E LANG -E LANGUAGE -E LC_ALL -d /etc:noexec -d /init-files:noexec - -run -- /bin/bash run < $workdir /stdin
112
+ -E LANG -E LANGUAGE -E LC_ALL -d /etc:noexec --run -- /bin/bash run < $workdir /stdin
113
113
114
114
if [[ $? != 0 ]]; then
115
115
exit_after_cleanup=true
You can’t perform that action at this time.
0 commit comments