Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
P parabix-devel
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 9
    • Issues 9
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • cameron
  • parabix-devel
  • Wiki
  • greptest

Last edited by cameron Mar 18, 2020
Page history

greptest

The parabix-devel/QA directory contains a number of testing scripts and data files.

To test icgrep, greptest.py can be used. It works with a file specifying test cases, such as greptest.xml.

Inside greptest.xml, you can include sample test files for grep searches using the datafile element. For example, the test file simple1 is declared as follows.

<datafile id="simple1">
A few lines of input
in this simple test file
provide fodder for some simple
regexp tests.
</datafile>

Test cases can then be written with the grepcase element. For example, an icgrep search using the regular expression fe|si should return matches for lines 2, 3 and 4 of the test file simple1. This is declared using the following grepcase element.

<grepcase regexp="fe|si" datafile="simple1" greplines="2 3 4"/>

Any tests included in greptest.xml are automatically run as part of the make check process.

You can also run tests directly from the parabix-devel/QA directory. For example, if you want to run the tests, but print out the expected and actual input and output each time, you can use the following commands.

cd QA
python greptest.py -v ../build/bin/icgrep

You can also use different files of test cases. For example, to test using the proptest.xml file and testfiles in the QA directory, the following command may be used.

python greptest.py -t proptest.xml -d . ../build/bin/icgrep

When using greptest.py in verbose mode, you may see that test cases are often executed with extra command line parameters. This is a combinatorial testing strategy. This can be controlled with parameters to greptest. For more thorough testing you can try the following command.

python greptest.py -v --random_flag_count=3 --tests_per_grepcase=5 ../build/bin/icgrep
Clone repository
  • Bracket Matching
  • CSV Validation
  • CSVediting
  • CSVparsing
  • Character Code Compilers
  • KernelLibrary
  • Pablo
  • ParabixTransform
  • Parallel Deletion
  • Parallel Hashing
  • Performance Testing Script
  • Shuffle Pattern Library
  • StaticCCC
  • String Insertion
  • UCD: Unicode Property Database and Compilers
View All Pages