-
Notifications
You must be signed in to change notification settings - Fork 37
Add validation support #187
Comments
Several quick attempts to reuse the
This should run (some) tests. I added a section on testing to the README: https://github.com/snowleopard/shaking-up-ghc#testing. |
The GHC testsuite is
That said, you can be even more lazy, and just tell GHC developers that the testsuite can only be run via I don't know which problems you ran into with This is the main build command:
The build system knows to use If you have any questions about the current build system or testsuite, please ask. |
@thomie Many thanks for the details. I think I did manage to understand this overall structure while trying to reuse The key obstacle for simply calling |
Maybe just leave things where they are now? Then those GHC bugs you ran into in #131 and here can be fixed at some later time. Even when not relying directly on any of the artifacts from the old build system, it might allow you to run both systems separately, logging all shell commands and
Anyway, my main point above was: call |
But this requires extra work. The
Yes, sure. We will provide equivalent replacements.
You probably meant |
Ok, sorry, I wrote my comment thinking it would be less work. A better naming scheme than
I won't stop you, but as I said before, the The
Do you plan to move the latter to Haskell as well? |
To clarify: you could delete all This also serves a purpose: you can run the testsuite with an external compiler (with the I have another question about what the story will look like for end users. Currently, they can get a binary distribution and run I did a little reading of the shaking-up-ghc source. So much nicer than the old system! Awesome job. |
Oh, I feel very dumb! I think I never tried running
Let me think about this for some time. I don't know this part of the testsuite well yet.
I think this will work as follows:
Happy to hear you like it! :-) There are a couple of further refactorings which I hope will make the code even better. |
Aha! I think I understand your problem.
You can call The other reason it will do rebuilds, is that your development build will probably have used different settings than those in validate.mk. That's why you should avoid calling validate in the git tree where you are currently working, but use something like |
@thomie Note: |
How did you make your first build? If with the new build system, then yes, it will do a complete rebuild, because Maybe you're looking for |
I tried the following: run the Anyway, I've added some bits to the new build system and now we can simply say:
and it will run This is intended as a temporary solution. I'll keep working on the |
Why do you think it should not do a rebuild? |
|
Maybe I'm misinterpreting this comment, but
So if the "iterating" part here also includes making changes to source files (which I guess it does, why would you otherwise be iterating), this can never work without duplicating work.
Updating the timestamp of
I don't understand what you mean by this.
What had you hoped it would do? How would you make it not linked to the |
Well, if it was written this way then surely I wouldn't have any hopes! :) Yet I found this:
Plus quite a lot of if statements above. I guess this is the line I didn't spot:
I don't think this deserves any further investigation. Clearly it was just my oversight. |
@thomie I'd like to come back to one of the points you made earlier:
Let me try to condense this into a specification on how a future
Plus a couple of other requirements collected elsewhere:
If the above sounds right I will put it on top and create subtasks for easier progress monitoring. |
The simple answer is, reimplement these 3 files:
Having separate flags to override these isn't necessary I think, but the
Yes. See for example HAVE_PROFILING in
Some more variables are documented here:
|
Hmm, but what about this code in TOP=..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
# The libraries that we actually know about. We don't want to test
# extralibs that are in our tree but which we haven't built, and
# we don't want to test unix on Windows or Win32 on non-Windows.
LIBRARIES := $(shell '$(GHC_PKG)' list --simple-output --names-only)
ifeq "$(findstring base,$(LIBRARIES))" ""
$(error base library does not seem to be installed)
endif
# Now find the "tests" directories of those libraries, where they exist
LIBRARY_TEST_PATHS := $(wildcard $(patsubst %, $(TOP)/../libraries/%/tests, $(LIBRARIES))) \
$(wildcard $(patsubst %, $(TOP)/../libraries/%/tests-ghc, $(LIBRARIES)))
# Add tests from packages
RUNTEST_OPTS += $(patsubst %, --rootdir=%, $(LIBRARY_TEST_PATHS)) At the moment I use
Indeed. Will add it as a subtask too.
I see. It may be possible to keep it automagical in the new build system too. |
Ok, that seems fine. These --rootdir flags are used for finding out where the tests are (or more specifically, which directories should be scanned for |
Thanks @thomie! I've added subtasks to the top of the issue. I will switch to more urgent issues now, tagged with |
@alpmestan @snowleopard Hi, |
@snowleopard @izgzhen |
@chitrak7 Sounds good to me, but this should better be discussed with GHC developers. You'll need to learn most common GHC development workflows and design validation features accordingly. |
@snowleopard #621 #602 have completed all but two checks here. Only --local-only and library ways remain now. |
@snowleopard Also, I wish to know what you mean when you say don't trust library ways? We are not generating library ways anywhere. |
|
@chitrak7 The idea here is that if you are working on a particular GHC component, say the |
This issue has been superseded by #669. |
snowleopard/hadrian#187 was superseded by snowleopard/hadrian#669, which has also been closed. So, optimistically, dropping this as a limitation issue.
snowleopard/hadrian#187 was superseded by snowleopard/hadrian#669, which has also been closed. So, optimistically, dropping this as a limitation issue.
We need to add support for running automated GHC tests when the build system is run with
test
target.Below are specific subtasks we identified in this thread (see discussions below):
validate
which simply runsmake fast
intestsuite/tests
.--test-hc=...
to allow specifying a Haskell compiler to use for running tests. Possible options could bestage0
(bootstrapping compiler),stage1
,stage2
(default),stage3
andpath/to/compiler
to specify any other compiler. We need to support paths with spaces and sometimes expand paths using environment variablePATH
.ghc-pkg
,hpc
,runghc
,haddock
,hsc2hs
,hp2ps
in accordance with the chosen--test-hc
. Seetestsuite/mk/boilerplate.mk
.getLibraryWays
in the build system during testing. Instead probe the file system to see which ways are actually there. SeeHAVE_PROFILING
intestsuite/mk/test.mk
. Other options can be found viaghc --info
andghc +RTS --info
. Seetestsuite/mk/ghc-config.hs
, which generates aMakefile
with options passed to the Python driver fromtestsuite/mk/test.mk
.getPackages
to generate all--rootdir
flags for passing to the pythonruntests.py
script.build.sh test --only=...
.build.sh test --local-only
. If possible detect this automatically, so--local-only
flag is not required.--way=...
flag. Example:make TEST='tc002 tc002' WAY='normal optasm'
The text was updated successfully, but these errors were encountered: