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

Improved testing and more #60

Merged
merged 5 commits into from
Nov 27, 2019
Merged

Conversation

cquinn
Copy link
Contributor

@cquinn cquinn commented Nov 26, 2019

Refactoring for testability, early error detection and reduction of Env use.

  • CLI spec and parsing pulled into its own file (style from ponyup).
  • Main resolves all dirs up front into FilePaths, ctx gets them for cmds.
  • Bundle now gets FilePaths for bundle_dir, no more search during load.
  • Bundle handles FilePath operations for all Deps
  • CmdFetch now correctly handles transitive deps through actor queue.
  • CmdUpdate Contraints parsing and solving extracted to new class.
  • old ponyc bug workaround removed in solver.
  • Setup integration harness and tests for most corral commands
  • Snarfed many testdata dirs from Stable
  • New logger LogNone level to turn off logging.

Fixes:

…nv use.

- CLI spec and parsing pulled into its own file (style from ponyup).
- Main resolves all dirs up front into FilePaths, ctx gets them for cmds.
- Bundle now gets FilePaths for bundle_dir, no more search during load.
- Bundle handles FilePath operations for all Deps
- CmdFetch now correctly handles transitive deps through actor queue.
- CmdUpdate Contraints parsing and solving extracted to new class.
- old ponyc bug workaround removed in solver.
- Setup integration harness and tests for most corral commands
- Snarfed many testdata dirs from Stable
- New logger LogNone level to turn off logging.

Fixes:
- ponylang#10: Lots of integration tests
- ponylang#23: Updates 'directory' to 'bundle_dir', resolves it early, and makes sure other dirs are based on it.
- ponylang#25: Ensured that fetched bundles are placed in the corral correctly.
- ponylang#29: Verified ProcessMonitor use is correct.
Makefile Show resolved Hide resolved
corral/bundle/data.pony Outdated Show resolved Hide resolved
@SeanTAllen
Copy link
Member

I did an initial first pass. I need to clone your repo @cquinn and take a look at the organization of the tests. It's a pure jumble of "what is going on here" when I look in the GitHub UI. I probably won't get to that until sometime Wednesday evening.

@SeanTAllen
Copy link
Member

@cquinn was it intentional that this PR doesn't turn on integration tests being run for CI?

@cquinn cquinn added the changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge label Nov 26, 2019
@cquinn
Copy link
Contributor Author

cquinn commented Nov 26, 2019

@SeanTAllen thanks for the review. I'll push some fixes in a few minutes. I wasn't sure how to turn on integration tests for the PR, but will do that as soon as I learn.

@SeanTAllen
Copy link
Member

@cquinn re: tests. What I suggest is the make the test command run all tests. If we need to have a make target that only does unit or integration we can add.

If you do that then all the tests will be run with the current CI setup.

The CI is now run by GitHub actions. The configuration for tests for PRs is in .github/workflows/pr.yml

@cquinn
Copy link
Contributor Author

cquinn commented Nov 26, 2019

make unittest runs all non-integration tests in parallel.
make integration runs all integration tests, sequentially.
make test runs both of the above.

@SeanTAllen
Copy link
Member

I think unit-test rather than unittest.

I'd say solicit other opinions before accepting mine (or just reject my opinion).

@cquinn
Copy link
Contributor Author

cquinn commented Nov 27, 2019

FWIW: I have a followup PR (cquinn#1 for now until rebased) that builds on this one and fixes logging and -n.

@SeanTAllen
Copy link
Member

@cquinn across most of our repos it is "unit-tests" rather than "unittest", for now, can you switch to that for the name. we don't have a standard for integration test name at this point, so I'll let you decide what it should be and we can sort out later if we want to change, but it would be good to be consistent with other Ponylang projects.

@SeanTAllen
Copy link
Member

Other than the aforementioned change @cquinn, this looks good to merge.

@cquinn cquinn merged commit 2d435a9 into ponylang:master Nov 27, 2019
github-actions bot pushed a commit that referenced this pull request Nov 27, 2019
@SeanTAllen
Copy link
Member

@cquinn were these changes public facing? I think we want to remove the CHANGELOG entry as "improved testing and more" isn't really a helpful changelog entry.

cquinn added a commit to cquinn/corral that referenced this pull request Nov 27, 2019
cquinn added a commit that referenced this pull request Nov 27, 2019
* Updated changelog to include details from PR #60

* More cleanup
@cquinn cquinn deleted the corral-10-more_tests branch December 2, 2019 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants