Skip to content

Commit

Permalink
test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
SunriseFox committed Mar 30, 2019
1 parent cf0c43c commit 3809215
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@

### Build

+ (Linux) 打开 build.sh,修改 `-v /var/www/onlinejudge:/mnt/data``/var/www/onlinejudge` 为本地一个已存在的目录
+ (Windows) 打开 build.bat,修改 `-v "D:\0bysj\core":/mnt/core``D:\0bysj\core`*当前目录*`-v "D:\0bysj\volume":/mnt/data``D:\0bysj\volume` 为一个已存在的目录
+ 运行对应的 build.sh 或 build.bat
+ (Linux) 打开 build.sh,修改 `MOUNTFOLDER` 为本地一个已存在的目录
+ (Windows) 打开 build.bat,修改 `MOUNTFOLDER` 为本地一个已存在的目录
+ 运行对应的 `build.sh``build.bat`

### 测试

+ 项目在 testcase 中提供了测试样例,只需要运行当前目录的 `./test.sh``test.bat` 即可。

### Usage

Expand Down
6 changes: 6 additions & 0 deletions test.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@docker cp "testcase/." judgecore:/mnt/data;
@docker exec judgecore ./judgecore /mnt/data/config/9001-a.json /mnt/data/config/9001-b.json /mnt/data/config/9001-c.json;
@docker exec judgecore ./compiler /mnt/data/config/spj-9002.json;
@docker exec judgecore ./judgecore /mnt/data/config/9002-a.json /mnt/data/config/9002-b.json /mnt/data/config/9002-c.json;
@docker exec judgecore ./compiler /mnt/data/config/spj-9003.json;
@docker exec judgecore ./judgecore /mnt/data/config/9003-a.json /mnt/data/config/9003-b.json /mnt/data/config/9003-c.json;
8 changes: 4 additions & 4 deletions test.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set -ex; \
docker cp "testcase/." judgecore:/mnt/data; \
docker exec judgecore ./judgecore /mnt/data/config/9001-a.json /mnt/data/config/9001-b.json /mnt/data/config/9001-c.json;
docker exec judgecore ./compiler /mnt/data/config/spj-9002.json;
docker exec judgecore ./judgecore /mnt/data/config/9002-a.json /mnt/data/config/9002-b.json /mnt/data/config/9002-c.json;
docker exec judgecore ./compiler /mnt/data/config/spj-9003.json;
docker exec judgecore ./judgecore /mnt/data/config/9001-a.json /mnt/data/config/9001-b.json /mnt/data/config/9001-c.json; \
docker exec judgecore ./compiler /mnt/data/config/spj-9002.json; \
docker exec judgecore ./judgecore /mnt/data/config/9002-a.json /mnt/data/config/9002-b.json /mnt/data/config/9002-c.json; \
docker exec judgecore ./compiler /mnt/data/config/spj-9003.json; \
docker exec judgecore ./judgecore /mnt/data/config/9003-a.json /mnt/data/config/9003-b.json /mnt/data/config/9003-c.json;

0 comments on commit 3809215

Please sign in to comment.