summaryrefslogtreecommitdiffstats
path: root/test/run.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Update documentation and comments to use https links where possibleBrad King2020-02-131-1/+1
|
* cmake: bump minimum required version to 3.3Brad King2019-08-291-1/+1
| | | | | Adapt our `target_link_libraries` call based on the version of LLVM to account for policy `CMP0023` NEW behavior.
* test: Fix test output conversion for `[` and `]`Brad King2017-09-291-1/+1
| | | | | | When using `TEST_UPDATE` to convert the actual test output to the expected test output we must convert `[` and `]` to `\[` and `\]` to ensure it matches the actual content.
* test: Fix test output conversion for CastXML-format resultsBrad King2017-01-121-0/+2
| | | | | | When using `TEST_UPDATE` to convert the actual test output to the expected test output we must convert the `CastXML` element as we already do for `GCC_XML`.
* test: Fix test output conversion for `*`Brad King2016-03-161-1/+1
| | | | | | When using `TEST_UPDATE` to convert the actual test output to the expected test output we must convert `*` to `\*` to ensure it matches the actual content.
* Output: Generate Base element offset="" attributeBrad King2015-12-031-0/+3
| | | | | | | | The gccxml output format had this attribute, defined by GCC as "The offset where this basetype appears in its containing type". This is well-defined only for non-virtual base classes. GitHub-Issue: 34
* test: Support absolute paths to expected result filesBrad King2015-12-031-3/+8
| | | | | | Teach test/run.cmake to accept absolute paths to files containing expected results. This will allow tests to compute the expected values at configuration time.
* test: Tolerate warnings about unknown float abiMattias Ellert2015-09-241-0/+1
| | | | | | | | When running with an 'arm' target architecture, Clang warns: warning: unknown platform, assuming -mfloat-abi=soft Tolerate this warning in test output by removing it before matching.
* Output: Add annotate() to more declaration attributes=""Jörg Wollenschläger2015-08-241-0/+1
| | | | | | | Extend the change from commit e73fba54 (Output: Add annotate() to function declaration attributes="", 2015-08-18) to support record, enum, field, variable, and typedef since gccxml also supported attributes in these.
* Output: Add annotate() to function declaration attributes=""Brad King2015-08-181-0/+1
| | | | | | | | | While CastXML cannot support the `gccxml()` attribute because Clang does not define it, we can support the `annotate()` attribute that Clang provides for arbitrary string annotations. This should fill the same use case as the `gccxml()` attribute did for clients. GitHub-Issue: 25
* Output: Further hide our __float128 struct from generated xmlBrad King2015-06-241-0/+4
| | | | | | | | | | | | | | | Give the our __float128 struct an internal '__castxml' name so that it can be identified during traversal of member lists. Do not report the struct as a member of the translation unit since the typedef will be generated as a FundamentalType directly. Also generate empty mangled="" attributes for mangled names involving our __float128 struct since the mangled names will not use the "g" that GCC would for the builtin type. Add test cases that do not use --castxml-start. Verify that no test case produces '__castxml' in its output to ensure we always hide such internal details from the generated output. GitHub-Issue: 18
* test: Fix xml output matching on i386-pc-windows-msvc targetsBrad King2015-05-271-0/+2
| | | | | | | | Class methods have an extra attributes="__thiscall__" xml attribute on this architecture that does not appear in our test expectation files. We already have an explicit test that this function type attribute is generated, so simply filter it out from test output before matching.
* Output: Generate throw="..." instead of throws="..."Michka Popoff2015-05-211-1/+1
| | | | | | Original gccxml output used the singular name, so we should too for compatibility. Fix this typo left from commit defc576826 (Output: Generate Function and related elements, 2014-02-12).
* Output: Add mangled="" attributes to function and variable declsBrad King2015-05-121-0/+1
| | | | | | The gccxml output format includes mangled="" attributes on almost all elements. Clang only defines mangling for function and variable declarations. Add mangled attributes to castxml output where possible.
* test: Add option to transform actual xml to expected xmlBrad King2015-04-281-0/+12
| | | | | | | If TEST_UPDATE is set in the environment and a test fails, transform the actual xml output into the expected xml and overwrite the .xml.txt file containing the latter. This will help make sweeping updates to the expected test output when sweeping output format changes are made.
* test: Print command line string when a test failsBrad King2015-03-311-0/+2
| | | | This will make it easy to re-run the command by hand for debugging.
* test: Default to requiring empty stdout and stderrBrad King2015-02-251-0/+2
|
* test: Add cases for --castxml-cc-(gnu|msvc) detectionBrad King2014-04-161-0/+4
| | | | | | Create dummy gnu-like and msvc-like compiler binaries. Use them with the --castxml-cc-<id> options to verify that the preprocessor definitions and include directories are detected as expected.
* test: Name expected results by language standardBrad King2014-04-091-2/+2
| | | | | | Name files "gccxml.<std>.<test>.(stdout|stderr|result|xml).txt" where "<std>" is either the language standard or "any" if the result works for any standard.
* test: Support zero or many alternative expected result file namesBrad King2014-04-091-5/+8
| | | | | | Teach test/run.cmake to loop over a list of possible expected result names. This will allow tests results to be specialized in certain cases without duplicating common results.
* test: Remove xml output files before running castxmlBrad King2014-04-091-0/+4
| | | | | Ensure that test output is produced by castxml and not left from a previous test run.
* Extend xml test cases to validate with xmllint if availableBrad King2014-03-211-0/+23
| | | | Look for xmllint and use it to validate the xml format in test results.
* Teach test infrastructure to check generated xml filesBrad King2014-02-261-1/+14
| | | | | | Teach test/run.cmake to optionally read the actual and expected xml content and compare them. Add to test/CMakeLists.txt a castxml_test_gccxml macro to add tests for --castxml-gccxml mode.
* Add test infrastructure to run castxml and validate resultsBrad King2014-02-261-0/+61
Create a test/run.cmake test driver script that uses execute_process to run a castxml test command line and then compares the results to those we expect. Validate the process result (return code) and the content of stdout and stderr. In test/CMakeLists.txt create a castxml_test_cmd macro to add tests that use "run.cmake".