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

End to end tests #39

Merged
merged 15 commits into from
Aug 18, 2019
Merged

End to end tests #39

merged 15 commits into from
Aug 18, 2019

Conversation

andorp
Copy link
Member

@andorp andorp commented Jul 25, 2019

Solves #38

@andorp
Copy link
Member Author

andorp commented Jul 26, 2019

I still have to add add some tests for binary and for bisecting. But please do review this PR meanwhile.

@andorp andorp added the wip Work in progress label Jul 26, 2019
@andorp andorp added review Ready for review and removed wip Work in progress labels Jul 26, 2019
Copy link
Member

@Anabra Anabra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

I saw the TODOs in the end-to-end test framework. Please add Haddocks to make the code more understandable.

grin/app/CLI/Lib.hs Outdated Show resolved Hide resolved
grin/app/CLI/Main.hs Show resolved Hide resolved
grin/grin.cabal Outdated Show resolved Hide resolved
grin/test/Test/EndToEnd.hs Show resolved Hide resolved
grin/test/Test/EndToEnd.hs Show resolved Hide resolved
grin/test/Test/EndToEnd.hs Outdated Show resolved Hide resolved
@andorp andorp force-pushed the 38-end-to-end-tests branch 3 times, most recently from 0587f41 to d74db04 Compare July 31, 2019 00:04
@andorp andorp requested a review from Anabra July 31, 2019 00:26
Copy link
Member

@Anabra Anabra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work once again. Looks good to me, but I still left some questions.

grin/test/Test/EndToEnd.hs Show resolved Hide resolved
.travis.yml Show resolved Hide resolved
-- defined options. All the $$$OUT$$$ template value replaced the output file.
-- Only one output file should be configured in the options as we can define
-- only one expected output. The output file should be text file of some sort.
evaluatePipelineTest input options expected ext params actionWith progressCallback = do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the type signature missing? Is it too complicated?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a local helper function called only once. If you are really think a type signature is necessary I'll add them, but at the time of the writing I didn't feel the need of adding the type signatures.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, it is always good to have type signatures for top-level functions. Makes the code more readable, makes the docs more understandable.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Than I'll add that ugly ones :D

grin/test/Test/EndToEnd.hs Show resolved Hide resolved
@@ -257,6 +257,8 @@ data PipelineOpts = PipelineOpts
, _poLintOnChange :: Bool
, _poTypedLint :: Bool -- Run HPT before every lint
, _poSaveBinary :: Bool
, _poRuntimeC :: FilePath
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are runtime.c or primop.c sources special?
I'd rater store a list of c source files in general.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we dedicated them to be special before. I also like the list idea better. Chaging...

("clang-7 -O3 prim_ops.c runtime.c %s.o -s -o %s" ++ if debugSymbols then " -g" else "")
grinOptCodeFile fname
("clang-7 -O3 %s %s %s.o -s -o %s" ++ if debugSymbols then " -g" else "")
(_poPrimOpsC cfg) (_poRuntimeC cfg) grinOptCodeFile fname
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the list of c source files here.

grin/src/Reducer/PrimOps.hs Show resolved Hide resolved
@andorp andorp merged commit cc4062e into master Aug 18, 2019
@andorp andorp deleted the 38-end-to-end-tests branch August 18, 2019 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review Ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants