Compare commits

...

2 Commits

Author SHA1 Message Date
b595ec95ba
chore: sync with latest woj-sandbox 2024-01-01 21:56:26 +08:00
d95c8f9ea3
fix: ncmp might core dump on old server 2024-01-01 21:55:53 +08:00
5 changed files with 8 additions and 4 deletions

View File

@ -10,6 +10,5 @@ cmake .. -DCMAKE_BUILD_TYPE=Release || exit 1
make -j || exit 1 make -j || exit 1
cd ../.. cd ../..
cp woj-sandbox/build/libwoj_sandbox.so . || exit 1
cp woj-sandbox/build/woj_launcher . || exit 1 cp woj-sandbox/build/woj_launcher . || exit 1
rm -rf woj-sandbox || exit 1 rm -rf woj-sandbox || exit 1

View File

@ -5,4 +5,4 @@ git clone --depth=1 https://github.com/MikeMirzayanov/testlib.git >/dev/null 2>&
rm -rf testlib/.git rm -rf testlib/.git
rm -rf testlib/tests rm -rf testlib/tests
cd testlib/checkers || exit 1 cd testlib/checkers || exit 1
parallel clang++ -Ofast -march=native -Wall -pipe -I.. {}.cpp -o {} ::: fcmp hcmp lcmp ncmp nyesno rcmp4 rcmp6 rcmp9 wcmp yesno parallel clang++ -O2 -Wall -pipe -I.. {}.cpp -o {} ::: fcmp hcmp lcmp ncmp nyesno rcmp4 rcmp6 rcmp9 wcmp yesno

View File

@ -63,7 +63,7 @@ for test_num in $(seq "$Info_Num"); do
--time_limit=$Info_Limit_Time \ --time_limit=$Info_Limit_Time \
--sandbox_path=/woj/framework/scripts/libwoj_sandbox.so \ --sandbox_path=/woj/framework/scripts/libwoj_sandbox.so \
--sandbox_template=$3 \ --sandbox_template=$3 \
--sandbox_action=nothing \ --sandbox_action=ret \
--file_input=/woj/problem/data/input/$test_num.input \ --file_input=/woj/problem/data/input/$test_num.input \
--file_output=/woj/user/$test_num.out.usr \ --file_output=/woj/user/$test_num.out.usr \
--file_info=/woj/user/$test_num.info \ --file_info=/woj/user/$test_num.info \

View File

@ -18,3 +18,6 @@ ENV WOJ_SANDBOX=/woj/framework/scripts/libwoj_sandbox.so
ENV TEMPLATE=/woj/framework/template ENV TEMPLATE=/woj/framework/template
ENV TESTLIB=/woj/framework/template/testlib ENV TESTLIB=/woj/framework/template/testlib
ENV PREFIX=/woj/problem ENV PREFIX=/woj/problem
# Permission
USER 1000:1000

View File

@ -4,5 +4,7 @@ FROM docker.io/library/ubuntu:22.04
WORKDIR /woj/problem WORKDIR /woj/problem
RUN mkdir -p /woj/framework/scripts RUN mkdir -p /woj/framework/scripts
COPY --from=builder /woj/framework/scripts/libwoj_sandbox.so /woj/framework/scripts/
COPY --from=builder /woj/framework/scripts/woj_launcher /woj/framework/scripts/ COPY --from=builder /woj/framework/scripts/woj_launcher /woj/framework/scripts/
# Permission
USER 1000:1000