Skip to content

Commit

Permalink
更改配置
Browse files Browse the repository at this point in the history
  • Loading branch information
qwertycxz committed Jan 25, 2025
1 parent 74f9b55 commit 8114a17
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 31 deletions.
34 changes: 19 additions & 15 deletions config/config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,27 @@ SecrectKey = "0xffffffff"
[self]
judgeCapability = 4
name = "TestJudger"
[nsjail]
path = "/usr/bin/nsjail"
configFile = "./jailConfig.cfg"
[hc]
path = "/usr/bin/hc"
[builtin]
"ax309.ucf" = "/usr/src/ax309.ucf"
"main.cmd" = "/usr/src/main.cmd"
"verilog.prj" = "/usr/src/verilog.prj"
"xc6slx9-2-ftg256.verilog.xst" = "/usr/src/xc6slx9-2-ftg256.verilog.xst"
[language]
c = "/usr/bin/gcc"
cpp = "/usr/bin/g++"
testlib = "/testlib.h"
python = "/usr/bin/python3"
java = "/usr/bin/java"
javac = "/usr/bin/javac"
cat = "/usr/bin/cat"
node = "/usr/bin/node"
pascal = "/usr/bin/fpc"
ojcmp = "/usr/bin/ojcmp"
rustc = "/usr/bin/rustc"
ise = "/usr/bin/ise" # TODO: delete
shell = "/usr/bin/shell" # TODO: delete?
verilog = "/usr/bin/verilog" # TODO: delete
vhdl = "/usr/bin/vhdl" # TODO: delete
xst = "/usr/bin/xst"
ngdbuild = "/usr/bin/ngdbuild"
map = "/usr/bin/map"
par = "/usr/bin/par"
bitgen = "/usr/bin/bitgen"
impact = "/usr/bin/impact"
[fpga]
serial = [
"0123456789ABCDEF0123456789ABCDEF",
]
[judger]
noSelfTestError = false
tmpdirBase = "/tmp/Heng_Client"
Expand Down
26 changes: 10 additions & 16 deletions src/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,22 @@ export class LanguageConfig {
vhdl!: string;
@IsString()
@IsNotEmpty()
impact!: string;
}
export class JailConfig {
xst!: string;
@IsString()
@IsNotEmpty()
path!: string;
ngdbuild!: string;
@IsString()
@IsNotEmpty()
configFile!: string;
}
export class MeterConfig {
map!: string;
@IsString()
@IsNotEmpty()
par!: string;
@IsString()
@IsNotEmpty()
bitgen!: string;
@IsString()
@IsNotEmpty()
path!: string;
impact!: string;
}
export class ControllerConfig {
@IsString()
Expand Down Expand Up @@ -184,14 +186,6 @@ export class Config {
language!: LanguageConfig;
@ValidateNested()
@IsNotEmpty()
@Type(() => JailConfig)
nsjail!: JailConfig;
@ValidateNested()
@IsNotEmpty()
@Type(() => MeterConfig)
hc!: MeterConfig;
@ValidateNested()
@IsNotEmpty()
@Type(() => JudgeFactoryConfig)
judger!: JudgeFactoryConfig;
@ValidateNested()
Expand Down

0 comments on commit 8114a17

Please sign in to comment.