Skip to main content

Overview

The setup command allows you to customize QuickTest’s behavior, including compilation commands, execution settings, and language-specific configurations.
QuickTest stores configuration in ~/.quicktest/ and comes with sensible defaults for all supported languages.

Basic Usage

quicktest setup <subcommand>
Or using the shorter alias:
qt setup <subcommand>

Subcommands

config

Modify specific configuration settings.
qt setup config --label=<config-path> --value=<new-value>
label
string
required
The configuration label (path) to modify.Short form: -l
--label=cpp.compile
-l cpp.compile
value
string
required
The new value for the specified configuration label.Short form: -v
--value="g++ -std=c++20 -O2 -Wall"
-v "g++ -std=c++20 -O2 -Wall"

reset

Reset all configurations to default values.
qt setup reset
This will overwrite all custom configurations. Use with caution.

Examples

View Current Configuration

To see available configuration options and current values:
qt setup config --label=help --value=show
The actual implementation may vary. Check qt setup --help for the exact command to view configurations.

Customize C++ Compilation

Change the C++ compiler flags:
qt setup config --label=cpp.compile --value="g++ -std=c++20 -O2 -Wall -Wextra -o .qt/main"

Update C++ Standard

Use C++20 instead of C++17:
qt setup config -l cpp.standard -v "c++20"

Configure Python Interpreter

Use a specific Python version:
qt setup config --label=python.interpreter --value="python3.11"

Customize Java Compilation

qt setup config --label=java.compile --value="javac -d .qt/ -Xlint:all"

Reset to Defaults

If you’ve made changes and want to revert:
qt setup reset

Default Compilation Commands

QuickTest uses these default compilation and execution commands:

C++

g++ -std=c++17 -Wall -DONLINE_JUDGE=1 -o .qt/main main.cpp

Java

javac -d .qt/ Main.java

Python

python3 main.py
Python doesn’t require compilation.

Rust

cp main.rs ~/.quicktest/rust/src/main.rs && \
cargo build --release --quiet --manifest-path ~/.quicktest/rust/Cargo.toml && \
cp ~/.quicktest/rust/target/release/rust .qt/main

Go

cp main.go ~/.quicktest/go_mod/main.go && \
go build -buildmode=exe -o ./.qt/main ~/.quicktest/go_mod/main.go

C (GNU C)

gcc -std=gnu11 -lm main.c -o .qt/main

Kotlin

kotlinc main.kt -include-runtime -d .qt/main.jar

Configuration Labels Reference

The exact configuration structure depends on QuickTest’s implementation. The following is based on common patterns. Run qt setup config --help or check the source code for the complete list.
Common configuration labels:
  • cpp.compile - C++ compilation command
  • cpp.execute - C++ execution command
  • cpp.standard - C++ standard version
  • java.compile - Java compilation command
  • java.execute - Java execution command
  • python.interpreter - Python interpreter path
  • rust.compile - Rust compilation command
  • go.compile - Go compilation command
  • kotlin.compile - Kotlin compilation command

Common Configuration Tasks

Enable Debug Symbols

Add debugging information to compiled binaries:
qt setup config -l cpp.compile -v "g++ -std=c++17 -g -Wall -o .qt/main"

Optimize for Speed

Maximize optimization for competitive programming:
qt setup config -l cpp.compile -v "g++ -std=c++17 -O3 -march=native -Wall -o .qt/main"

Add Sanitizers

Detect memory errors and undefined behavior:
qt setup config -l cpp.compile -v "g++ -std=c++17 -fsanitize=address,undefined -Wall -o .qt/main"

Use Clang Instead of GCC

qt setup config -l cpp.compile -v "clang++ -std=c++17 -Wall -o .qt/main"

Configure for Specific Contest Platform

Match Codeforces settings:
qt setup config -l cpp.compile -v "g++ -std=gnu++17 -O2 -Wall -Wextra -o .qt/main"

Tips

Keep a backup: Before making significant configuration changes, note down your current settings in case you need to revert.
Platform-specific settings: Different competitive programming platforms use different compiler flags. Configure QuickTest to match your target platform.
Test after changes: After modifying compilation commands, run a simple test to ensure everything still works:
qt stress -t test.cpp -g gen.cpp --tc 10
Quote complex values: When setting values with spaces or special characters, use quotes:
qt setup config -l cpp.compile -v "g++ -std=c++17 -O2 -Wall -o .qt/main"

Configuration File Location

QuickTest stores configuration files in:
~/.quicktest/
This directory contains:
  • Language-specific templates
  • Compilation settings
  • Runtime configurations
You can manually edit these configuration files, but using qt setup config is recommended to ensure correct formatting.

Troubleshooting

Configuration Not Applied

If your configuration changes don’t seem to take effect:
  1. Verify the label is correct:
    qt setup config --label=cpp.compile --value="<your-command>"
    
  2. Check for typos in the value
  3. Try resetting and reconfiguring:
    qt setup reset
    qt setup config -l cpp.compile -v "<your-command>"
    

Compilation Errors After Configuration

If compilation breaks after changing settings:
  1. Reset to defaults:
    qt setup reset
    
  2. Test with a simple program
  3. Gradually re-apply your custom settings

Platform-Specific Examples

Codeforces

qt setup config -l cpp.compile -v "g++ -std=gnu++17 -O2 -o .qt/main"

AtCoder

qt setup config -l cpp.compile -v "g++ -std=gnu++20 -O2 -DONLINE_JUDGE -DATCODER -o .qt/main"

Google Code Jam

qt setup config -l cpp.compile -v "g++ -std=c++17 -O2 -o .qt/main"

See Also

  • cmp - Compare solutions
  • stress - Performance testing
  • check - Custom validation

Build docs developers (and LLMs) love