mniak / bench Goto Github PK
View Code? Open in Web Editor NEWSuite of commands for coding exercises
License: MIT License
Suite of commands for coding exercises
License: MIT License
It's more meaningful
Related to #23
A complex cache invalidation logic must be implemented, because toolchains can change in the same machine
with the installation and uninstallation of tools and even the change of environment variables
Topics to address
When trying to run test examples
from a folder, the program is not built and then it complains that the program was not found.
my-program/
├─main.cpp
└─examples/
test01.input.txt
test01.output.txt
#include <iostream>
#include <string>
using namespace std;
void main()
{
string name;
getline(cin, name);
cout << "Hello, " << name << "!" << endl;
}
John Doe
Hello, John Doe!
bench test examples my-program/
Test test01 running...
program not found
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
github.com/brianvoe/gofakeit/v6
, github.com/oxyno-zeta/gomock-extra-matcher
, github.com/spf13/cobra
, github.com/stretchr/testify
).github/workflows/build-and-test.yml
actions/checkout v3
actions/setup-go v3
go.mod
go 1.19
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883@c7f18ee00883
github.com/brianvoe/gofakeit/v6 v6.18.0
github.com/golang/mock v1.6.0
github.com/hashicorp/go-multierror v1.1.1
github.com/oxyno-zeta/gomock-extra-matcher v1.1.0
github.com/pkg/errors v0.9.1
github.com/spf13/cobra v1.5.0
github.com/stretchr/testify v1.8.0
Create an option that would allow enabling the verbose mode.
If not specified, should not show in console
The application is taking much time to run the first line of the main
method.
I did some research and found that the MSCV CPP toolchain is taking around 2s to initialize due to running the script vcvars.bat
.
--
).bench test app.cpp -- [<args>]
bench test -- app.cpp [<args>]
bench test --arg1 app.cpp -- [<args>]
bench test --arg1 -- app.cpp [<args>]
bench test app.cpp --arg01 #should raise an error like "argument --arg01 is not valid"
bench test app.cpp arg01 #should raise an error like "argument arg01 is not valid"
Related to #23
The toolchains are needed in order to compute which are the input and output extensions, influencing in the detection of source files when running the commands.
I could find the toolchain in one step and initializing it in another.
Using the MSVC example, i could find the file vcvars.bat
and then use it to consider the MVSC toolchain as usable and thus exposing it on the DefaultToolchains
slice.
Then, when the toolchain is chosen, a factory method would be called in order to initialize the toolchain.
For the MSVC toolchain, it would represent calling the vcvars.bat
and collecting the resulting environment variables for usage in the build step.
Examples of use
bench test .
bench test app.cpp
bench test app.exe
bench test app #for linux executables
bench test dir01/
bench test dir01/app.cpp
bench test dir01/app.exe
bench test dir01/app
Remove --dir
option (PR #9)
Allow both executable/interpretable and compilable files
--no-build
bench test examples dir01/app.cpp
bench test examples --no-build dir01/app.cpp
bench test examples dir01/app.exe
bench test examples .
bench test examples /absolute/path
bench test examples dir01/
bench test examples dir01/app.cpp
bench test examples dir01/app.exe
bench test examples dir01/app
bench test examples --examples test_cases/ dir01/app.cpp
Desired features:
--timeout=5
in secondsMaybe I should rename the project to desk
Everytime I run my tests, some files main.exe
and main.obj
are created in the folder containing the source.
This bothers me, because I need to add a .gitignore to avoid these files.
When running test
in a file
py
sh
exe
x
nobuild
, raise errornobuild
, build fileDo not keep build logic inside Test/Test Example.
It's ok to keep it on the command but not on the library.
The reason is that if you run Test Examples it will build many times
Also, there is no way for the user to control if he wants to skip building and just test, for example with an older version of the binary.
Either
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.