Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic tests and examples #102

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft

Conversation

GPMueller
Copy link
Contributor

@GPMueller GPMueller commented Nov 18, 2019

Closes #72.

  • add CLI flags
  • discover and build tests and examples of the root project
  • add ability to automatically run tests
  • get the recursive versions running
  • unit tests
  • documentation

This is currently based on the feature-package branch of PR #98 and will be rebased onto master when PR #98 has been merged.


This design has drawbacks:

Take as an example the following suggestion for how to specify tests:

name = "my_project"

[my_lib]
    # blaaaaaa
some_var = 12

[test]
[test.my_exe_test]
    dependencies = "my_lib"
  • If no tests are specified, no test sources are searched for, i.e. no sources_exclude is necessary when unwanted sources are picked up in test discovery.
  • specifying all tests (per project) under one node in the toml can help to keep things tidy (though for boost, this would be completely terrible)

two differences between the two approaches:

  1. default search for sources: manually specify if tests are present vs. manually specify when all sources should be ingored
  2. organization in the toml: tests in one single block vs. tests each attached to their respective targets

- added Target_Stub class which contain information from initial scans
- stubs are used to create targets after creating full dependency graph
- also fixed targets parsing flags
@GPMueller GPMueller changed the base branch from master to feature-package November 18, 2019 19:05
@codecov
Copy link

codecov bot commented Nov 18, 2019

Codecov Report

Merging #102 into master will increase coverage by 0.20%.
The diff coverage is 73.68%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #102      +/-   ##
==========================================
+ Coverage   80.26%   80.47%   +0.20%     
==========================================
  Files          12       12              
  Lines        1059     1188     +129     
==========================================
+ Hits          850      956     +106     
- Misses        209      232      +23     
Impacted Files Coverage Δ
clang_build/clang_build.py 65.54% <51.72%> (-3.80%) ⬇️
clang_build/project.py 73.86% <77.70%> (+3.91%) ⬆️
clang_build/dependency_tools.py 68.08% <88.88%> (+4.19%) ⬆️
clang_build/io_tools.py 100.00% <100.00%> (ø)
clang_build/target.py 88.92% <100.00%> (ø)
clang_build/single_source.py 89.23% <0.00%> (+21.53%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3d58a42...37df1db. Read the comment docs.

The second will run all tests discovered by all projects (this assumes the tests were built).
- added printing of test output to automatic test run
- changed names of tests and examples, moving the library name from the name to the identifier
- moved target_dont_build_list from project to build function
@GPMueller GPMueller force-pushed the feature-package branch 2 times, most recently from 01a64ca to 129f09b Compare November 30, 2019 14:00
@GPMueller GPMueller changed the base branch from feature-package to master November 30, 2019 14:47
@GPMueller GPMueller force-pushed the master branch 2 times, most recently from 1688aa5 to d663463 Compare October 30, 2020 12:37
@GPMueller GPMueller force-pushed the master branch 15 times, most recently from 5276c68 to 50e872b Compare July 27, 2021 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant