/tester

Tester is a lightweight, cross-platform program to test competitive programming problems locally.

Primary LanguagePascalOtherNOASSERTION

Table of contents

What is Tester?

  • Tester is an application that can test competitive programming problems. It is very easy to use. No Internet connection required to test the problems -- you'll just need the tests. It can import archives like Polygon's. You can also create a problem in it -- Tester has its own problem properties editor.

Why use Tester?

  • It's a native, lightweight application.

  • It doesn't require much space and can be distributed in a single executable.

  • It's cross-platform and available on Windows and GNU/Linux

  • No more batch scripts like All_Test.bat! Tester provides an intuitive graphical interface.

  • It can automatially import problems.

  • Tester uses JSON to save problems' properties, so they can be easily parsed.

  • Testing results can be saved to JSON and can be easily parsed, too.

Pre-requisites

Common

  • At first, you will need a computer 😃

  • 1 GB RAM (recommended 2 GB)

  • Free Pascal Compiler (for Pascal) and GNU GCC Compiler (for C/C++) installed. For Windows, paths to the compiler binaries must be set in PATH environment variable.

Windows

  • Windows 7, 8, 8.1 or 10 (32- or 64-bit). Should work on Windows XP, but didn't tested on it.

GNU/Linux

  • Tested on Ubuntu 16.04 and Debian 9 (32- and 64-bit), but should work on other popular GNU/Linux distros.

  • GTK+ installed.

  • Some checkers for problems may come only in EXE file, so you should install Wine to launch them.

Downloading latest release

To download latest release of Tester, go to the following link.

Building from sources

Common

  • To build tester from sources, you will need Lazarus IDE (recommended version is 1.8.2) with Free Pascal Compiler (recommended version is 3.0.4), GNU Make and GNU GCC Compiler.

  • You can choose the way you link timerlib: statically or dynamically. If you want to link timerlib dynamically, uncomment {$Define TimerlibDyn} in timerlib/src/timerlib.pas.

  • If you link timerlib dynamically, you'll be have to distribute the shared library (libtimer0.1.4-32.dll or libtimer0.1.4-64.dll for Windows and libtimer-0.1.4.so for GNU/Linux) with the executable. For GNU/Linux, you must install the shared library. To do this, run make install from timerlib directory (root privileges required). For Windows, you must put the shared library to the same directory with the executable.

  • Building is quite simple: just run make build.

Windows

  • Use the environment variable PATH to specify paths to Lazarus IDE directory and to GNU GCC's bin directory.

  • If you link timerlib statically, specify paths to the C libraries in the project or in your fp.cfg file (you can find that file in the Free Pascal Compiler's directory.

  • There can be linking problems on Windows when you link timerlib statically. Due to MinGW bugs, linking may fail with the message:
    Undefined symbol: __ms_vsnprintf
    To workaround this issue, I built the timerlib with MinGW32 and in FPC I used libraries from the 32-bit version of MinGW-w64.

  • Still have no idea how to link timerlib statically on Win64, so timerlib will be linked dynamically even if you didn't uncommented {$Define TimerlibDyn}.

  • If you have problems with static linking, do build timerlib dynamically.

GNU/Linux

  • Better use static linking (you won't have to install the shared library).

  • For Debian GNU/Linux or Ubuntu, you can also build a Debian package. Use Debian tools like debuild:

$ debuild -us -uc

Documentation

Coming soon...

License

Tester is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Note that some of the timerlib files may be distributed under the terms of GNU Lesser General Public License. See the timerlib files for more details.

Libraries used by Tester

  • LCL, which provides GUI for Tester.

  • SynEdit, to view the sources.

  • exec.h, exec.c and some other source files from ejudge project, which provides routines to run the submissions and check them for time and memory limits.