Commit 66693401 authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel 🕺

Fold testsuite.git into ghc.git (re #8545)

This commit performs a subtree merge of testsuite.git into ghc.git;
The next commit will adapt `sync-all` et al. to the new situation.

At the time of merge, testsuite.git was at commit
[998a816ae89c4fd573f4abd7c6abb346cf7ee9af/testsuite]

The following steps have been used to accomplish this merge:

1. Clone a fresh testsuite.git copy (& cd into)

2. Remove accidentally committed binary files from history

 git filter-branch \
  --index-filter "git rm -r --cached --ignore-unmatch \
    tests/haddock/should_compile_flag_nohaddock/a.out \
    tests/haddock/should_compile_noflag_nohaddock/a.out \
    tests/ghc-regress/haddock/should_compile_flag_nohaddock/a.out \
    tests/ghc-regress/haddock/should_compile_noflag_nohaddock/a.out \
    tests/ghc-regress/dph/diophantine/dph-diophantine-fast \
    tests/ghc-regress/dph/diophantine/dph-diophantine-opt \
    tests/ghc-regress/dph/primespj/dph-primespj-fast \
    tests/ghc-regress/dph/quickhull/dph-quickhull-fast \
    tests/ghc-regress/dph/smvm/dph-smvm \
    tests/ghc-regress/dph/sumnats/dph-sumnats \
    tests/ghc-regress/dph/words/dph-words-fast \
    tests/ghc-regress/plugins/plugins01" \
   HEAD

3. Rename all paths in testsuite.git to be prefixed with `testsuite/`

 git filter-branch -f --prune-empty --tree-filter \
  "mkdir -p testsuite; \
   git ls-tree --name-only \$GIT_COMMIT | xargs -I files mv files testsuite/"

4. cd into ghc/ checkout, and perform subtree merge of testsuite into ghc
   (see also http://nuclearsquid.com/writings/subtree-merging-and-you/)

 cd ../ghc/
 git remote add -f testsuite ../testsuite/.git
 git merge -s ours --no-commit testsuite/master
 git read-tree --prefix=/ -u testsuite/master
 git commit
Signed-off-by: Herbert Valerio Riedel's avatarHerbert Valerio Riedel <hvr@gnu.org>
parents a924debc ad233cf6

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -68,7 +68,6 @@ _darcs/
/libraries/unix/
/libraries/utf8-string/
/nofib/
/testsuite/
/utils/haddock/
/utils/hsc2hs/
......
This diff is collapsed.
The Glasgow Haskell Compiler License
Copyright 2002, The University Court of the University of Glasgow.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
- Neither name of the University nor the names of its contributors may be
used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
================================================================================
The GHC testsuite contains several files under different licenses, explained
here:
The following tests are under the GPLv3, or (at your option) any later version:
- tests/indexed-types/should_compile/T3787.hs
- tests/typecheck/should_compile/T4524.hs
- tests/simplCore/should_run/T3591.hs
You should have received a copy of the GNU General Public License along with
the GHC testsuite, in LICENSE.GPL
This diff is collapsed.
TOP = .
# If we're cleaning then we don't want to do all the GHC detection hardwork,
# and we certainly don't want to fail if GHC etc can't be found!
# However, we can't just put this conditional in boilerplate.mk, as
# some of the tests have a "clean" makefile target that relies on GHC_PKG
# being defined.
ifneq "$(MAKECMDGOALS)" "clean"
ifneq "$(MAKECMDGOALS)" "distclean"
ifneq "$(MAKECMDGOALS)" "maintainer-clean"
include $(TOP)/mk/boilerplate.mk
boot:
$(MAKE) -C $(TOP)/timeout all
all:
$(MAKE) -C $(TOP)/tests all
fast:
$(MAKE) -C $(TOP)/tests fast
endif
endif
endif
clean distclean maintainer-clean:
$(MAKE) -C $(TOP)/timeout $@
$(RM) -f mk/*.o
$(RM) -f mk/*.hi
$(RM) -f mk/ghcconfig*.mk
$(RM) -f mk/ghc-config mk/ghc-config.exe
$(RM) -f driver/*.pyc
@echo
@echo "NOTICE: To clean up test files, try running 'make CLEANUP=1 CLEAN_ONLY=YES'"
@echo
GHC Testsuite Readme
====================
For the full testsuite documentation, please see [here][1].
## Quick Guide
Commands to run testsuite:
* Full testsuite: `make`
* Using more threads: `make THREADS=12`
* Reduced (fast) testsuite: `make fast`
* Run a specific test: `make TEST=tc054`
* Test a specific 'way': `make WAY=optllvm`
* Test a specifc stage of GHC: `make stage=1`
* Skip performance tests: `make SKIP_PERF_TESTS=YES`
* Set verbosity: `make VERBOSE=n`
where n=0: No per-test ouput, n=1: Only failures,
n=2: Progress output, n=3: Include commands called (default)
* Pass in extra GHC options: `make EXTRA_HC_OPTS=-fvectorize`
You can also change directory to a specific test folder to run that
individual test or group of tests. For example:
``` .sh
$ cd tests/array
$ make
```
## Testsuite Ways
The testsuite can be run in a variety of 'ways'. This concept refers
to different ways that GHC can compile the code. For example, using
the native code generator (`-fasm`) is one way, while using the LLVM
code generator (`-fllvm`) is another way.
The various ways that GHC supports are defined in `config/ghc`
## Adding Tests
Please see the more extensive documentation [here][1].
[1]: http://hackage.haskell.org/trac/ghc/wiki/Building/RunningTests
This is a bad postscript file
import os
import re
# Testsuite configuration setup for GHC
#
# This file is Python source
#
config.compiler_type = 'ghc'
config.compiler = 'ghc'
config.compiler_always_flags = ghc_compiler_always_flags.split()
config.hp2ps = 'hp2ps'
config.hpc = 'hpc'
config.gs = 'gs'
config.confdir = '.'
# By default, we test the 'normal', 'opt' and 'hpc' ways.
# 'optasm' is added by mk/test.mk if the compiler has a native code gen,
# 'prof' is added by mk/test.mk if the profiling way is enabled.
config.compile_ways = ['normal', 'hpc']
config.run_ways = ['normal', 'hpc']
# ways that are not enabled by default, but can always be invoked explicitly
config.other_ways = ['extcore','optextcore',
'prof',
'prof_hc_hb','prof_hb',
'prof_hd','prof_hy','prof_hr',
'threaded1_ls', 'threaded2_hT',
'llvm', 'debugllvm',
'profllvm', 'profoptllvm', 'profthreadedllvm',
'threaded1llvm', 'threaded2llvm',
'dynllvm']
if (ghc_with_native_codegen == 1):
config.compile_ways.append('optasm')
config.run_ways.append('optasm')
config.compiler_debugged = ghc_debugged
if (ghc_with_vanilla == 1):
config.have_vanilla = True
if (ghc_with_dynamic == 1):
config.have_dynamic = True
if (ghc_with_profiling == 1):
config.have_profiling = True
config.compile_ways.append('profasm')
config.run_ways.append('profasm')
if (ghc_with_interpreter == 1):
config.have_interp = True