2016-09-02 20:04:29 +08:00
|
|
|
import os
|
|
|
|
import pwd
|
|
|
|
|
2018-03-18 08:19:44 +08:00
|
|
|
import grp
|
|
|
|
|
2018-05-05 14:59:20 +08:00
|
|
|
JUDGER_WORKSPACE_BASE = "/judger/run"
|
2016-09-28 19:55:39 +08:00
|
|
|
LOG_BASE = "/log"
|
2016-09-02 20:04:29 +08:00
|
|
|
|
2018-03-18 08:19:44 +08:00
|
|
|
COMPILER_LOG_PATH = os.path.join(LOG_BASE, "compile.log")
|
|
|
|
JUDGER_RUN_LOG_PATH = os.path.join(LOG_BASE, "judger.log")
|
|
|
|
SERVER_LOG_PATH = os.path.join(LOG_BASE, "judge_server.log")
|
2016-09-02 20:04:29 +08:00
|
|
|
|
2018-08-10 09:33:29 +08:00
|
|
|
RUN_USER_UID = pwd.getpwnam("code").pw_uid
|
|
|
|
RUN_GROUP_GID = grp.getgrnam("code").gr_gid
|
2016-10-16 03:38:45 +08:00
|
|
|
|
|
|
|
COMPILER_USER_UID = pwd.getpwnam("compiler").pw_uid
|
|
|
|
COMPILER_GROUP_GID = grp.getgrnam("compiler").gr_gid
|
2016-09-02 20:04:29 +08:00
|
|
|
|
2018-10-14 17:26:37 +08:00
|
|
|
SPJ_USER_UID = pwd.getpwnam("spj").pw_uid
|
|
|
|
SPJ_GROUP_GID = grp.getgrnam("spj").gr_gid
|
|
|
|
|
2016-09-27 23:30:52 +08:00
|
|
|
TEST_CASE_DIR = "/test_case"
|
2018-05-05 14:59:20 +08:00
|
|
|
SPJ_SRC_DIR = "/judger/spj"
|
|
|
|
SPJ_EXE_DIR = "/judger/spj"
|