Package: exiot
Executable I/O Testing Tool (exiot)The (exiot) is a testing tool to test the executableSTDIN,STDOUT,STDERR, and many more.You can take a look to the (man/architecture.md)[Architecture]mandocumentation.Getting StartedThis tool requiresunix'sdiff- to compare file's content.If you would like to use the--build=cmakeyou would need:cmake,makeandgccorclangIn order to use this tool on MS Windows, you need to use thewsl.InstallationIn order to install the latest "stable" version of the tool you can use
thepip.pipinstallexiotIn order to get latest version of the tool you can just clone the repository:gitclonehttps://github.com/pestanko/exiot.gitand then use thepoetryto install dependencies, or just install them manually (
dependencies are optional).cdexiot
poetryinstallOptional dependencies:junitparser- to produce the junit reportpyyaml- to parse yaml schemas and generate yaml reportsYou can install them manually if you do not want to use the poetrypipinstalljunitparserpyyamlUsageShow help:$python-mexiot--helpParse the testsParse the tests - show all available tests:python-mexiotparse[-oOUTPUT_FORMAT][-pPARSER]<TEST_DIR># Example:python-mexiotparseexamples/single_failParse the tests - show all available tests, dump them asjsonoryaml(ifpyyamlinstalled):# Examples:python-mexiotparse-ojsonexamples/single_fail# or yaml if PyYAML installedpython-mexiotparse-oyamlexamples/single_failSupported parsersTool is currently supporting these parsers:minihw- MiniHomework parser forMUNI FI:PB071course (examples/minihw_not_impl)dir- Directory parser (examples/single,examples/single_fail)scenario- Scenario parser, this is most advanced parser, and it is the preferred way to
write testsauto- Autodetect parser - automatically detect which parser to use based on the root tests structureRun the testsRun tests in directory:python-mexiot-Linfoexec-E<EXECUTABLE><TESTS_DIR># Example:python-mexiot-Linfoexec-E./myexec./tests# Example with cmake buildpython-mexiot-Linfoexec--build=cmake<PATH_TO_TESTS>Run Mini Homeworks:# -p parameters specifies the "parser" - minihw is special parser for parsing the mini homeworks for FI:PB071python-mexiot-Linfoexec-pminihw<PATH_TO_MINIHW># Example:python-mexiot-Linfoexec-pminihwexamples/minihw_not_impl# Example to run the solutionpython-mexiot-Linfoexec-D="target: solution"<PATH_TO_MINIHW># Example with cmake buildpython-mexiot-Linfoexec--build=cmake<PATH_TO_MINIHW>The build support is currently experimental, it requirescmake,make,gcc/clang.
The cmake build will create new directory in theTESTS_DIRand runscmake/makethere.How it might looks like:cmake-Bbuild
make-k-CbuildSupported execution parametersTo provide/override parameters you can useparamsproperty for definitions or pass it as command line parameter
using:-Dor--defineoption.valgrind(not implemented)executable- do not use directly from command line (use-Eor--executableparam)timeout- Timeout - max execution timedevel_mode- Enable development mode, only for test development, not for "production"target- for minihw you can toggle betweensource|solutionexecutable testing (default:source)diff_params-diffexecutable additional paramsjunit_dump- Print out the JUNIT dump at the end of the executionExamplesFor examples - take a look at theexamplesdirectory.minihw_not_impl- Mini Homework format for FI:PB071, the minihwsource.cis not implementedproj_def_yml- Passing project definition - all tests should be passingproj_def_fail_yml- Failing project def. - all tests should be failingsingle- Single directory with tests - files based tests definition, all should be passingsingle_fail- Single directory with tests - files based tests definition, all tests should be failingechocat.c- reference implementation for the testing binaryechocat(used in tests)TODOsDefinition support templates (parametrized tests)Valgrind SupportMore testsSupport more parsers (ex.kontr)Support tests generation