SYNChronous EXecution is a tool for testing programs that take stdin
inputs
It does this in parallel leading to Blazingly fast testing cycles!!! 🔥🔥
- Build & Run all in one go
- SYNCX runs all the test cases over a program in parallel leading to shorter waiting time
SYNCX is a shell where there are command which can be executed to do the testing
make sure these files have been properly configured
cd <dir | no dir>
ls
calling cd <no dir>
will print out the current working directory
config
each call of this command will try to read config.json in the local directory and update SYNCX configs for program testing
run <file | no file>
the build / run commands are all abstracted behing a single run
A specific file can be specified if a placeholder <file>
tag is present build_command or run_command
- if a
<file>
placeholder is not found, SYNCX assumes the file has been specified in the build command rather than inrun
- config.json
- a input file
demo config.json
this file needs to be in the current working directory of SYNCX
{
"build_command":"",
"run_command":"go run <file>",
"batch_separator":"!new",
"input_file":"input.txt"
}
SYNCX can build the program for you before executing it
build_command
allows you to provide a build command to compile the program into a executable.
This filed would be used for languages like c++ where there is no equivalent to go run
or cargo run
- There is a default placeholder tag,
<file>
, which can be used to specify the file to be compiled during runtime
run_command
specifies the shell command to execute to start the specified program
- There is a default placeholder tag,
<file>
, which can be used to specify the file to be ran during runtime
The stdin
input which SYNCX will send to the program being ran will be sourced from a file
batch_separator
specifies a substring the the input_file
which will be interpreted as
a separator for a new set of input data to be executed
demo input.txt
in the input.txt file each input case is separated by the batch_separator !new
1
!new
2
!new
...
demo.go Takes in a single number and prints out the result squared
Then SYNCX would run demo.go on each of the input cases in sync
Case 0
1
Case 1
4
...
cd /cmd
go build .