Tests could be run in random order#1382
Conversation
|
What does this gain us? I'm not sure I follow what's going on here. |
|
I tried whether stackage could build tests (i.e. tests pass when package fetched from hackage). Seems they do, except for some reason it run tests in EDIT: I'll also try to run tests from sdisted package. WIP. |
a1082e5 to
2386068
Compare
There was a problem hiding this comment.
compiler hack creates distinct caches for each entry.
|
Ok, now I'm done. Seems to work, and caching is more robust. I'll make yet another PR to separate test running from Sorry for a lot of travis tweaking and PR noise, but I just nerdsnipped myself into the CI stuff, and purescript is complex enough project to be interesting to tweak. |
|
This seems to break on Windows due to |
|
I guess this doesn't change windows behaviour, i.e. it doesn't work in master either. I unfortunately don't have windows machine available to me right now to test on. |
|
Yeah, it doesn't work in master for a different reason currently (it fails in a different way I mean), that's why I tried this out in hopes of having it work. 😄 If you can add the #1320 style executable finding I'd be more than happy to test it again. |
|
Yeah, tests already search for |
|
Those are fine as it is |
There was a problem hiding this comment.
This could be generalised and moved somewhere into shared code, @garyb opinions? seems quite the same as in psc-publish
|
I meant something like findFirstExecutable :: [String] -> IO (Maybe String)
findFirstExecutble = ...
findNode = findFirstExecutable ["node", "nodejs"]
findBower = findFirstExecutable ["bower", "bower.cmd"]IMHO it's not dangerous to look for |
|
That would make sense. I don't feel strongly about whether we should always search for |
tests/common/TestsSetup.hs
Outdated
There was a problem hiding this comment.
For code which is licensed with a different copyright ascription, we've started requiring the license to be explicitly listed or linked here, to make it clear. Could you add a link to the MIT license if that's the one you're using?
Thanks.
There was a problem hiding this comment.
For example:
There was a problem hiding this comment.
Actually, I just noticed this isn't new code, it's just been extracted verbatim. Since this code isn't written by me (or @garyb), I'm not at liberty to transfer copyright of it. If it's going to be relicensed back to the project under different copyright assumptions, it needs to be done under the terms of the original license, which means including that here. I think I'm going to put something in CONTRIBUTING.md about how copyright notices should be added, but I think at a minimum, the code must be new. IANAL though, etc. I hate to be pedantic about these things, but as I say, this isn't my code.
There was a problem hiding this comment.
I've written up the new approach, which is hopefully as simple as possible, here:
#1394
|
@garyb, Do I need to do a windows fix in this branch, or can this be merged? I'll be a bit more busy this week unfortunately. |
|
I'm happy for it to go in as-is since it's not newly breaking anything anyway. I can fix the Windows specific stuff afterwards. :) |
|
ping @paf31 ? |
|
I need to understand the code changes still, but first, slightly less pleasant business: Copyright notices: New files which are entirely original can have copyright notices added for their author, but the file you added is largely copied verbatim from elsewhere. If it were my code, I probably wouldn't care, but none of that code was written by me, so the copyright belongs with the original authors and is licensed to the project users. Claiming copyright over the whole file would be incorrect. So there are two options: a) leave the copyright notice as it was, with copyright assigned to your code implicitly by Sorry to make a deal about it. Perhaps the original authors don't care about this honestly, but it's the first time I've had to think about things like this, and I feel it's important to be crystal clear about code ownership in a large(ish) code base. |
|
The file functions are copied from are For me (as a conributor) would be easier to have EDIT: actially e.g. ASF doesn't even have copyright notices in the files, only license information: http://www.apache.org/legal/src-headers.html - that makes much sense in multi-contributor projects |
|
Yes, I plan to remove those headers once all the contributors have their entries in |
e4a69ef to
49de8b3
Compare
|
Copyright notice removed |
.travis.yml
Outdated
49de8b3 to
dfd4738
Compare
There was a problem hiding this comment.
Won't this share the sandbox between the main build and the sdist test? @hdgarrood Is that ok?
There was a problem hiding this comment.
@paf31 no, the compiler trick in build matrix does the job. In travis-ci/travis-ci#4393 is an issue, and this hackish - workaround mentioned.
There was a problem hiding this comment.
Which sandbox does test-install.sh use then? It says cabal sandbox init --sandbox ../.cabal-sandbox below.
There was a problem hiding this comment.
The same, but the sandbox is snapshotted away (to the cache location) before we install purescript into it. Thus we don't need to install dependencies twice, ever.
EDIT sorry, didn't understood your original question
There was a problem hiding this comment.
test-install is there to verify that everything that needs to be exported is listed in the .cabal file, so I think this is fine. 👍
There was a problem hiding this comment.
@paf31 here we move sandbox contents to the cached location
|
What's happening with this? I'd like to get it in so I can update and merge #1402 :) Although since this already needs rebasing, perhaps I should merge that anyway? |
|
I'll rebase |
Also refactor .travis.yml based on ideas from https://github.com/hvr/lzma-streams/blob/648be0a44b7e454393c34d542a5467c44124413d/.travis.yml
(to trigger new build, to check cache behaviour)
dfd4738 to
fc8cea1
Compare
|
Rebased, waiting only for non-cache lts-3.1 build to complete (cache works!) |
|
Yes, I'm going to merge this before I release 0.7.4. |
Tests could be run in random order
|
Thank you very much! |
No description provided.