LaunchTestRun
Stable Release 1.2.2
一个平台,您可以在线提交和测试代码片段进行练习。
LaunchTestrun取决于以下软件运行:
要在Ubuntu或Debian上安装这些软件包,请运行以下命令:
要安装所需的工具链,请运行
sudo apt-get update
sudo apt-get install default-jre default-jdk build-essential python2 python3 mono-devel
release/中的.war文件复制到Apache Tomcat服务器中的webapps/ Directory(如果您使用的是以前的步骤,则应在〜/ lainingTestrun中安装tomcat),然后跳过到第5步。LaunchTestRun.war的.war中。webapps/ Directory中的Apache Tomcat服务器中。catalina.sh在Apache Tomcat安装中替换bin/catalina.sh (java 9和tomcat 8)中的catalina.sh。chmod +x *.sh在tomcat安装的bin/ directory中运行chmod +x *.sh,在bin/ tocat安装中制作shell脚本。bin/startup.sh以启动启动图。如果您想在启动图表安装上进行更多的安全性(强烈建议使用服务器上的其他代码!),您应该创建一个新用户,该用户只有在Tomcat安装目录中运行和访问文件的权限。为了保护您的设置,在运行bin/startup.sh后,第一次运行.war文件后,运行以下命令(替换适用于特定安装的位置的括号中的所有文本):
su root
chmod 755 [ YOUR TOMCAT DIRECTORY HERE ] -R
cd [ YOUR TOMCAT DIRECTORY HERE ]
useradd launchtestrun
mkdir work
touch webapps/LaunchTestRun/forensics.txt
chown launchtestrun:launchtestrun -R work
chown launchtestrun:launchtestrun -R logs
chown launchtestrun:launchtestrun -R webapps/LaunchTestRun
chown launchtestrun:launchtestrun -R webapps/LaunchTestRun/upload
chown launchtestrun:launchtestrun -R webapps/LaunchTestRun/forensics.txt
设置这些权限后,在启动启动器服务器时,请在运行以下命令下运行startup.sh之前切换到launchtestrun用户:
su launchtestrun
cd [ YOUR TOMCAT DIRECTORY HERE ]/bin
./startup.sh
要查看上传和执行的所有文件的法医日志(包含IP,输入,输出,MD5哈希,上传时间等),请查看webapps/LaunchTestRun/forensics.txt 。
注意:建议在webapps/LaunchTestRun/problems中将GIT存储库归化,以便在需要时可以远程上载,编辑和恢复问题。
webapps/LaunchTestRun/problems 。创建一个具有以下结构的新目录: [+] Name of problem
|- config.json
|- judge.in
|- judge.out
|- sample.in
|- sample.out
config.json应该包含以下数据:
{
"cpid":"12345",
"title":"Sample Tile 1",
"description":"Test Problem Description",
"pdf":"http://www.pdfsite.org/files/test.pdf",
"setinfo":"Fall Competition 2019",
"samplein":"sample.in",
"sampleout":"sample.out",
"judgein":"judge.in",
"judgeout":"judge.out",
"inputname":"input.txt",
"timeout":"2000"
}
在哪里:
cpid是您要定义的问题的ID#。title是您要定义的问题的标题。description是您要定义的问题的描述。pdf是您想要与问题显示的PDF文件的URL链接。setinfo是有关您要定义的问题集的信息集。samplein是示例输入文件的名称。 (给出的用户删除程序的输入)sampleout是示例输出文件的名称。 (输入的预期输出)judgein是法官输入文件的名称。 (给出的用户删除程序的输入)judgeout是法官输出文件的名称。 (输入的预期输出)inputname是用户更易程序将读取输入文件的名称,该程序将重命名为示例/法官输入文件。timeout是一个整数,定义了该程序将在强制终止之前执行的毫秒数。webapps/LaunchTestRun/settings.json ,其中包含启动Testrun将寻找编译器的路径。默认情况下,可以访问启动Testrun服务器: http://127.0.0.1:8080/LaunchTestRun/index.html/ 8080/launchtestrun/index.html/在以前的一节中配置了tomcat之后。默认情况下可以访问添加的问题列表: http://127.0.0.1:8080/LaunchTestRun/listproblems.html/ 8080/launchtestrun/listproblems.html/。